I am currently using openmpi 1.6.4 and trying to do a parallel performance analysis for a parallel two-program mpirun. So what I have are two programs that are executed like this:
mpirun -np 4 my_prog1 : -np 1 my_prog2
my_prog1 and my_prog2 run sequentially, so when one program is actually doing something the other one idles. So ideally I would like my_prog1 to use all 4 available cores and my_prog2 could use any of those for but not an extra one! The command from above results in a run with 5 mpi processes, which run on 5 cores. But in order to compare it with another setup I have to restrict the run to 4 actual cores. I tried using a hostfile as suggested in the FAQ-examples:
mpirun -np 4 --hostfile my_host my_prog1 : -np 1 --hostfile my_host my_prog2
This solution works fine for a single program mpirun. But for the multiple program example from above it leads to a run on 5 cores again because of the duplicate use of the hostfile. Does anyone have an idea how to restrict such a mimd/mpmd mpirun to an overall number of cores?