0

For a parallel program managed by slurm, I'm using the pattern described here https://slurm.schedmd.com/sbatch.html#lbAH to form the output files with the job name and job ids. However, I'm also running analysis on the program's runtime with the number of processors, and I need to add the number of tasks used to the filename to keep track.

I currently have the program (in MPI) printing how many processes are running, but that requires opening each file to inspect the contents and doesn't lend itself to easier manipulation by the shell. How can I encode the number of tasks that %J.%T.%j (for example) gives the job name, the number of tasks, and the job id separated by dots respectively?

rigel
  • 485
  • 1
  • 6
  • 12
  • Are you asking if you can access the values used in %J.%T.%j programatically within the code / environment ? – tomgalpin Feb 13 '23 at 17:05
  • Not the code, and not the environment per se, more to the --output and --error patterns I pass to slurm. I'm using a fictional pattern %T to represent the number of processes so that a job name of FEM and job id of 19 with 4 processes and --output=%J.%T.%j.out.txt creates a file like FEM.4.19.out.txt – rigel Feb 14 '23 at 18:10

0 Answers0