modules are way more friendly that manually setting and exporting your environment. the issue here is you are setting your environment in your .bashrc, and that cannot work if your account is used with various MPI implementations. (unless your .bashrc checks a third party variable to select the appropriate mpi, in this case, simply extend the logic to select openmpi)
if you configure'd with --enable-mpirun-prefix-by-default, you should not need anything in your environment. Cheers, Gilles On Monday, May 23, 2016, Andy Riebs <andy.ri...@hpe.com> wrote: > Hi, > > The short answer: Environment module files are probably the best solution > for your problem. > > The long answer: See > <http://www.admin-magazine.com/HPC/Articles/Environment-Modules> > <http://www.admin-magazine.com/HPC/Articles/Environment-Modules>, which > pretty much addresses your question. > > Andy > > On 05/23/2016 07:40 AM, Megdich Islem wrote: > > Hi, > > I am using 2 software, one is called Open Foam and the other called EMPIRE > that need to run together at the same time. > Open Foam uses Open MPI implementation and EMPIRE uses either MPICH or > intel mpi. > The version of Open MPI that comes with Open Foam is 1.6.5. > I am using Intel (R) MPI Library for linux * OS, version 5.1.3 and MPICH > 3.0.4. > > My problem is when I have the environment variables of either mpich or > Intel MPI sourced to bashrc, I fail to run a case of Open Foam with > parallel processing ( You find attached a picture of the error I got ) > This is an example of a command line I use to run Open Foam > mpirun -np 4 interFoam -parallel > > Once I keep the environment variable of OpenFoam only, the parallel > processing works without any problem, so I won't be able to run EMPIRE. > > I am sourcing the environment variables in this way: > > For Open Foam: > source /opt/openfoam30/etc/bashrc > > For MPICH 3.0.4 > > export PATH=/home/islem/Desktop/mpich/bin:$PATH > export LD_LIBRARY_PATH="/home/islem/Desktop/mpich/lib/:$LD_LIBRARY_PATH" > export MPICH_F90=gfortran > export MPICH_CC=/opt/intel/bin/icc > export MPICH_CXX=/opt/intel/bin/icpc > export MPICH-LINK_CXX="-L/home/islem/Desktop/mpich/lib/ -Wl,-rpath > -Wl,/home/islem/Desktop/mpich/lib -lmpichcxx -lmpich -lopa -lmpl -lrt > -lpthread" > > For intel > > export PATH=$PATH:/opt/intel/bin/ > LD_LIBRARY_PATH="/opt/intel/lib/intel64:$LD_LIBRARY_PATH" > export LD_LIBRARY_PATH > source > /opt/intel/compilers_and_libraries_2016.3.210/linux/mpi/intel64/bin/mpivars.sh > intel64 > > If Only Open Foam is sourced, mpirun --version gives OPEN MPI (1.6.5) > If Open Foam and MPICH are sourced, mpirun --version gives mpich 3.0.1 > If Open Foam and intel MPI are sourced, mpirun --version gives intel (R) > MPI libarary for linux, version 5.1.3 > > My question is why I can't have two MPI implementation installed and > sourced together. How can I solve the problem ? > > Regards, > Islem Megdiche > > > > > > > _______________________________________________ > users mailing listus...@open-mpi.org > <javascript:_e(%7B%7D,'cvml','us...@open-mpi.org');> > Subscription: https://www.open-mpi.org/mailman/listinfo.cgi/users > Link to this post: > http://www.open-mpi.org/community/lists/users/2016/05/29279.php > > >