ClimaComms.context() checks whether the environmental variable PMI_RANK is defined. If it exists, ClimaComms will assume that we are in a MPI job. This is breaks when running interactively in a slurm system, as the variable is created even if the user has requested one task and has no intention on using MPI.
To reproduce, just ask for a thread with srun and run ClimaComms.context().
I don't know what's the cleanest way to fix this.
ClimaComms.context()checks whether the environmental variablePMI_RANKis defined. If it exists,ClimaCommswill assume that we are in a MPI job. This is breaks when running interactively in a slurm system, as the variable is created even if the user has requested one task and has no intention on using MPI.To reproduce, just ask for a thread with
srunand runClimaComms.context().I don't know what's the cleanest way to fix this.