Page 1 of 1

Shared memory and dev/shm directory

Posted: Fri Nov 24, 2023 11:38 am
by marpunk
I would like to use vasp compiled by option -Duse_shmem to reduce memory comsumption of machine
learning training calculations. Vaspwiki reports problems encountered in some occasions, when
shared memory has been used. I was told from our supercomputer centre that I can use vasp compiled
by -Duse_shmem, if vasp uses /dev/shm directory, because that is cleaned after batch job is ended.
I would like to ask, whether vasp compiled using vasp.6.4.1.tgz uses /dev/shm directory and if not, what
should be done that it would do so. Thank you!

Re: Shared memory and dev/shm directory

Posted: Wed Nov 29, 2023 10:28 am
by andreas.singraber
Hello!

Welcome to the VASP forum! Which MPI implementation do you intend to use?

If you use OpenMPI then our recommendation for your case is to use only -Duse_shmem and to avoid "System V" shared memory (-Dsysv). Normally, we would actually recommend the opposite but because your HPC administrators have a way to clean up /dev/shm after each job this seems to be the safe way.

However, from your attached files I would assume you rather intend to use Intel MPI. Here, we do not have as much experience connected to shared memory problems as with OpenMPI but our recommendation for you would be the same. If you compile only with -Duse_shmem then it seems /dev/shm is used. Unfortunately, the processes behind Intel's MPI library are opaque to us, so we cannot be entirely sure whether some other technique besides /dev/shm is used under the hood.

I hope this helps, please let us know if you experience problems regarding shared memory usage.

All the best,
Andreas Singraber