CSC across multiple nodes with Slurm #136
|
Hi, I'm trying to run a CSC calculation on a HPC system managed with Slurm, but I'm running into issues with resource allocation. My dmft_config.toml file is attached (as a .txt file because I can't upload a .toml). I'm using VASP for the DFT with PLO for the projection. I'm on a very recent version of the unstable branch, compiled from source. I can provide the git hashes if necessary. There are a series of issues I'm running into. I've already performed a one-shot calculation across multiple nodes, so I know that the QMC side of things can handle allocation across multiple nodes with no issues. 1: The resource allocation in the slurm job submission script is given by Here I use srun to launch solid_dmft and pass the path to the srun command in the dmft_config.toml file, so that solid_dmft launches VASP using srun also. In this case, the output stalls after reporting that VASP is being launched. The Slurm error file contains the final line, "srun: error: Invalid numeric value "p" for --ntasks." This looks like solid_dmft has done something like "/path/to/srun -np Y /path/to/vasp", but srun takes -n as input and has interpreted p as the number of cores, not Y. So I switched to 2: Using mpirun to launch VASP but srun to launch solid_dmft. In this case, the output still stalls after reporting that VASP is being launched, but the error file says, "There are not enough slots available in the system to satisfy the 4 slots that were requested by the application: /path/to/vasp". I'm definitely requesting fewer cores for VASP than I am using to launch solid_dmft (in this specific case I used 8 for solid_dmft and 4 for VASP). 3: Using "#SBATCH --ntasks=8" and running solid_dmft with "srun -n 4 solid_dmft" in hopes that the other 4 cores are reserved for VASP. This had the same result as the previous attempt. 4: Restricting to a single node by using In this case VASP launches with mpirun and everything works as intended. The problem is that the calculations I want to do can't really be done in a reasonable time on one node. I have a set of 5 d-orbitals with all the off-diagonal terms included, and I want to go to fairly low temperatures with CTHYB. Even running VASP on one CPU, that leaves only 95 CPUs to do the QMC on my system, which would take far too long. Is there a way to get solid_dmft to do a CSC calculation across multiple nodes with VASP? |
Replies: 1 comment 15 replies
|
Hi Ethan, yes I understand this has to work of course. I also was running jobs like this frequently via slurm in the past with QMC across multiple nodes. However, I usually restricted VASP to run on a single node. This is for the following reason: slurm does not like to run two mpi executables at the same time inside of one slurm job. But of course only either VASP or triqs use CPUs at the same time so technically this is possible. But only the first launched MPI job will be able to get a fast comm layer between nodes. The second one will have none or TCP at best. Let's do this point by point:
this should then pass correctly to srun the arguments, but I never could really try this. It looks like this in so it uses and then in the solid_dmft config toml: then VASP sould run on a single node (make sure that it does otherwise performance will be poor), which should be fine for VASP. And TRIQS/QMC should use all 8 nodes 32 cores each.
I will not go into detail for 3) and 4). Let's first see if one of these works for you. I think we should be able to get this working! Let me know how this goes. Best, |

It seemed like the second option was running on all 4 cores I requested. A hostfile was generated that listed 4 CPUs. The slowdown was also much more that I would expect from reducing the CPUs from 4 to 1.
The test that worked was:
#SBATCH --nodes=2#SBATCH --cpus-per-node=4#SBATCH --ntasks-per-cpu=1Then I set
mpi_env = openmpi-intra,n_cores=4for DFT anddft_exec=mpirunwith no additional tags. This grabbed CPUs all from one node automatically for VASP.Thanks for your help!
Regards,
Ethan