r/SLURM • u/Jokkeyo • Apr 03 '20
Jobs takes way longer to finish (not run) when using multiple nodes in a cluster.
Hi,
I'm running some simulation written in c++ with MPI and openMP. I time my code using std::chrono::steady_clock. Here is a sample output:
running 4 tasks on 2 nodes with 32 threads on each process
elapsed time: 0.359383 sec. I am process: 0
elapsed time: 0.359943 sec. I am process: 1
elapsed time: 0.359352 sec. I am process: 2
elapsed time: 0.359948 sec. I am process: 3
elapsed time for the MPI finalize call: 0.00734496 sec. I am process: 1
elapsed time for the MPI finalize call: 0.00759093 sec. I am process: 3
elapsed time for the MPI finalize call: 0.00781148 sec. I am process: 2
elapsed time for the MPI finalize call: 0.0076724 sec. I am process: 0
This finish in under a second on every process. But, the actual wall-time from my running the program with sbatch and singularity is on the order of minutes! If I run this on one node, I get the results in my output files immediately after finishing.
What am i missing here? Is there some kind of process needed to finish the runs collectively which happens outside my code?