How to setup parallel calculations

Queries about input and output files, running specific calculations, etc.


Moderators: Global Moderator, Moderator

Locked
Message
Author
martin.schlipf
Global Moderator
Global Moderator
Posts: 542
Joined: Fri Nov 08, 2019 7:18 am

How to setup parallel calculations

#1 Post by martin.schlipf » Tue Nov 23, 2021 7:06 am

gu301purdue wrote: Fri Nov 19, 2021 12:58 amWe also try to see if more CPU cores utilized by the job can solve the problem. However, right now, we can only utilize one core, although we try to set up for 24 cores in our node. The input file is attached as follows. Is there any other parameters that we should include if we would like to use 24 cores? Such as NBANDS?

Input file:
LPLANE = .TRUE.
NPAR=1
NCORE=24
NSIM=1

Martin Schlipf
VASP developer


martin.schlipf
Global Moderator
Global Moderator
Posts: 542
Joined: Fri Nov 08, 2019 7:18 am

Re: How to setup parallel calculations

#2 Post by martin.schlipf » Tue Nov 23, 2021 7:15 am

I'm not sure if I follow exactly. There are two things you need to do in parallel
1) You need to use multiple CPUs to run VASP, which is typically achieved with
mpirun -np number of cores vasp_std
2) You need to tell VASP how to distribute the tasks over these CPUs. This is controlled mainly with NPAR or NCORE, but you can also use KPAR or NIMAGE if that is appropriate for you system.
From your comment it seems that you didn't do the first step, did you?

For your particular case, your jobscript should include a
mpirun -np 24 vasp_std
assuming you want to run on a single node. I would then suggest to run with NCORE = 4 or 6 and the rest would then be used to parallelize over bands. Typically using multiple levels of parallelism performs a bit better than putting everything into a single one.

One more comment, I don't think you should enforce NSIM=1. That is less efficient and less robust.

Martin Schlipf
VASP developer


Locked