> On Jun 12, 2015, at 11:08 AM, borno_bo...@gmx.de wrote: > > Hey there, > > I know that variable export in general can be done with the -x option of > mpirun, but I guess that won't help me. > More precisely I have a heterogeneous cluster (number of cores per cpu) and > one process for each node. The application I need to launch uses hybrid > MPI+OpenMP parallelization an I have to set the OMP_NUM_THREADS variable such > that it fits the number of cores on each node. > > I have no access to the application to get the number of cores from within > the process. I just can launch it. > > Is there any chance to do this?
You could wrap the executable in a shell script that gets the number of cores (from /proc/cpuinfo?), setenv OMP_NUM_THREADS, and execs the executable passing $* command line arguments. Then you mpirun the script you created. Noam
smime.p7s
Description: S/MIME cryptographic signature