Perfect, thanks a lot!
> Gesendet: Freitag, 12. Juni 2015 um 17:13 Uhr > Von: "Noam Bernstein" <noam.bernst...@nrl.navy.mil> > An: "Open MPI Users" <us...@open-mpi.org> > Betreff: Re: [OMPI users] OpenMPI (1.8.3) and environment variable export > > > 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_______________________________________________ > users mailing list > us...@open-mpi.org > Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/users > Link to this post: > http://www.open-mpi.org/community/lists/users/2015/06/27126.php