universe = parallel
executable = openmpiscript
arguments = mpi_wrapper.sh
transfer_input_files = a.out, mpi_wrapper.sh
getenv = true
should_transfer_files = yes
when_to_transfer_output = on_exit_or_evict
+ParallelShutdownPolicy = "WAIT_FOR_ALL"
output = out.$(NODE)
error = err.$(NODE)
log = log
request_cpus = 1
machine_count = 4
queue
#!/bin/sh
if [ "$_CONDOR_PROCNO" -lt 2 ]; then
exec ./a.out '_CONDOR_PROCNO='$_CONDOR_PROCNO args1
else
exec ./a.out '_CONDOR_PROCNO='$_CONDOR_PROCNO args2
fi
I'm using $_CONDOR_PROCNO to figure out which node of my MPI job is running and passing arguments to my MPI application (a.out) based on its value.