Page 1 of 1
Vasp.6.2.1 multi core performance issues
Posted: Tue Nov 02, 2021 1:49 pm
by Ingrid Švajger
Hello, everyone,
I have successfully compiled VASP.6.2.1 (makefile.include attached). But I noticed that the simulation is faster on computers with less cores. It also does not help if I prescribe the number of cores in the input. What could be the reason for this?
I thank you for any suggestion.
Respectfully.
Re: Vasp.6.2.1 multi core performance issues
Posted: Tue Nov 02, 2021 2:33 pm
by martin.schlipf
Is it faster on the same machine, if you use less MPI threads, or do you compare two different machines with a different number of cores here?
I can only give some general advice regarding this, because I lack more detailed information about your physical and computational setup:
- Make sure that OMP_NUM_THREADS is set as you expect this, from your makefile I guess you want 1 OMP thread. This may impact the performance of your LAPACK/BLAS layer.
- Check that the MPI threads match your setup. If you have a system with few atoms, don't use too many cores. If you use more than one node, align the processes with the layout of the chip (more details in the documentation of
NPAR and
NCORE).
- If you haven't done so already, check a simple example from the tutorials and verify that the same behavior occurs.
Re: Vasp.6.2.1 multi core performance issues
Posted: Wed Nov 03, 2021 12:29 pm
by Ingrid Švajger
I use the same physical model on two different computers, my personal computer and our cluster.
Personal computer: OS: Ubuntu 18.04 bionic; Kernel: x86_64 Linux 4.4.0-19041-Microsoft; Uptime: 1h 54m; Packages: 741; Shell: bash 4.4.20; CPU: Intel Core i7-7700 @ 8x 3.601GHz; RAM: 6742MiB / 8156MiB
Cluster: OS: Ubuntu 20.04 focal; Kernel: x86_64 Linux 5.4.0-86-generic; Uptime: 39d 23h 2m; Packages: 3368; Shell: bash 5.0.17; Disk: 20T / 32T (63%); CPU: Intel Xeon E5-2650 v4 @ 48x 2.9GHz [58.0°C]; RAM: 28419MiB / 64304MiB
If I use the same MPI threads (up to 2 threads), my personal computer is faster. However, if I use more than 2 threads (by setting -np 2) on our cluster, VASP uses all available cores (not just the prescribed number of cores) and the simulation becomes very slow.
I also tried command export OMP_NUM_THREADS = # (for different numbers #) but that had no effect on simulation speed.
Re: Vasp.6.2.1 multi core performance issues
Posted: Thu Nov 04, 2021 9:04 am
by martin.schlipf
Ingrid Švajger wrote: ↑Wed Nov 03, 2021 12:29 pmIf I use the same MPI threads (up to 2 threads), my personal computer is faster.
This is expected since your personal computer has a higher frequency. Ignoring every other aspect you would expect ~20% faster performance.
However, if I use more than 2 threads (by setting -np 2) on our cluster, VASP uses all available cores (not just the prescribed number of cores) and the simulation becomes very slow.
Okay there seems to be an error in the computational setup (either the jobfile or the mpi configuration). When you run VASP, you expect to see
X processes, where
X is the number you specify in your mpirun command
mpirun -np X /path/to/vasp/binary
If you compile with OpenMP (I think you don't), then each of these processes may consume more than one core and you can control this number by OMP_NUM_THREADS.
VASP will not spawn other processes, so if you see more than
X processes, you should ask your system administrator to have a look at your jobscript or the cluster setup.