Shared memory and dev/shm directory

Questions regarding the compilation of VASP on various platforms: hardware, compilers and libraries, etc.

Moderators: Global Moderator, Moderator

Post Reply
Message
Author
marpunk
Newbie
Newbie
Posts: 1
Joined: Mon Jan 23, 2023 7:40 am

Shared memory and dev/shm directory

#1 Post by marpunk » Fri Nov 24, 2023 11:38 am

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!
You do not have the required permissions to view the files attached to this post.

andreas.singraber
Global Moderator
Global Moderator
Posts: 235
Joined: Mon Apr 26, 2021 7:40 am

Re: Shared memory and dev/shm directory

#2 Post by andreas.singraber » Wed Nov 29, 2023 10:28 am

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

Post Reply