7
$\begingroup$

I have been using BURAI GUI for Quantum ESPRESSO for the calculation of optical properties of ZnSe. While running calculations I observed that my laptop's GPU was not even being used and I am a bit confused. I am currently using a gaming laptop, predator which has 4 cores, 8 logical processes, and 2 GPUs (Intel and Nvidia), 16GB RAM and a few other specifications (it's not even comparable to a cluster but it is the best I have at the moment). How do I utilize my GPUs for better and faster computations?

Thanks, this forum has been one of the most helpful things over the past couple of days.

$\endgroup$
12
  • $\begingroup$ +1. Just please take a careful look at all the edits I made, and the tags I added, so no one has to do this next time! $\endgroup$ Jun 11 at 23:33
  • $\begingroup$ Oh sorry, I will keep this all in mind next time before posting $\endgroup$ Jun 12 at 7:17
  • $\begingroup$ Note that there are two versions of quantum espresso, one is GPU-enabled and the other one isn't. Please check that the version you are using is GPU-enabled. Did you install it with an installer, or compile it yourself? $\endgroup$
    – S R Maiti
    Jun 12 at 14:33
  • $\begingroup$ I used the installer and did not compile it myself. I actually used the advanced soft corp one which gives the compiled binary. How do I know whether my version is gpu enabled or not? $\endgroup$ Jun 13 at 12:05
  • 2
    $\begingroup$ May I recommend installing Linux on a dual boot? It is generally faster than a virtual machine, because there is no virtualisation layer. $\endgroup$
    – S R Maiti
    Jun 17 at 20:27
5
$\begingroup$

I'm not a Quantum Espresso expert, but I'll try to answer this as best I can. There are two aspects to this answer: 1) whether you have a GPU-enabled version of Quantum Espresso; and 2) whether you should use your GPUs anyway.

GPU port of Quantum Espresso

Using GPUs effectively requires substantial changes to the source code (e.g. OpenACC, OpenMP5, CUDA-Fortran), and so you need to make sure you are using a version of Quantum Espresso which has those changes. You will also need a compiler which understands the GPU additions, which probably means the NVIDIA compiler.

The previous GPU project was led by Filippo Spiga and was very quick, but made heavy use of CUDA-Fortran (only supported by NVIDIA) and I think it evolved into a separate branch, and it and the "main" Quantum Espresso diverged significantly.

https://github.com/fspiga/qe-gpu

There is a new GPU port of Quantum Espresso which is intended to stay "in sync" with the main developments. This has been released, but I'm not sure what state it's in -- it may still be a test release.

https://gitlab.com/QEF/q-e-gpu/releases

Regardless, you will need the NVIDIA Fortran compiler and the CUDA toolkit (both are free). You will not be able to use Intel's compilers and I doubt that you can use GNU's either.

GPUs for DFT simulations

The GPUs which people usually use for DFT simulations are not graphics cards, they are dedicated compute-platforms (GPGPUs) which use technology based on graphics cards.

The "built-in" Intel GPU is unlikely to be useful; it has relatively low performance, it probably has no fast, dedicated RAM, and it is unlikely to be supported by your compiler. It is also very difficult to program for two different kinds of GPUs in the same system, and I doubt either QE or the compiler would cope.

The NVIDIA GPU probably has a good headline performance, and some fast, dedicated RAM, but I'm confident that it will only support up to single-precision arithmetic in hardware. Accurate DFT simulations rely on double-precision, and whilst the cards can emulate this in software it is extremely slow.

Much of the speed of a GPGPU is only attainable at all because they also have dedicated, high bandwidth memory (e.g. HBM2), which may not be true of a laptop model. You typically want a lot of dedicated RAM as well, which most consumer cards do not have.

If we look at the NVIDIA GPU-based offerings, you end up looking at a Titan or Tesla card before you have enough fast RAM and any significant double-precision performance for DFT simulations. Both of these have error-corrected (ECC) RAM, which I also consider important to getting reliable, publishable results (this goes for CPU calculations too, of course).

$\endgroup$
2
  • $\begingroup$ +1 You are right, the Intel iGPU is a part of the processor itself, so it shares the RAM with the processor, and there is little benefit in using it. $\endgroup$
    – S R Maiti
    Jun 22 at 14:23
  • 2
    $\begingroup$ Just to add to the confusion in case someone reads this: there is also the QE distribution based on the GPU-accelerated SIRIUS library. CP2K is also interfaced with SIRIUS, so you can now run a GPU-accelerated QE (SIRUS) calculation through CP2K ;-) $\endgroup$ Jun 27 at 21:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.