Error calling mpirun from bash script

I’m having problems on calling “mpirun” from inside a bash script on CentOS7. When I call mpirun from the shell command line all is OK, but when I try to automate the process and put the commands inside a bash script I get an error when trying to execute “mpirun -np 32 ./wrf.exe”:

[proxy:0:0@calima-wrf] HYDU_create_process (utils/launch/launch.c:74): execvp error on file –np (No such file or directory)

===================================================================================
=   BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
=   PID 28110 RUNNING AT calima-wrf
=   EXIT CODE: 255
=   CLEANING UP REMAINING PROCESSES
=   YOU CAN IGNORE THE BELOW CLEANUP MESSAGES
===================================================================================

Previously to “mpirun” call, in the script I do a “cd /path_that_contains_wrf.exe”, like when I execute mpirun from command line.

It seems that mpirun is trying to find “-np” as executable instead of “wrf.exe” so parallel execution doesn’t start, mpirun is not treating “-np” as a parameter as should be, a very strange issue. Environment variables are setted in the same way as when I run mpirun from the shell command line (using “source set_env.sh”), which sets LD_LIBRARY_PATH, PATH, etc… variables. Any idea of what could be happening?

The content of $LD_LIBRARY_PATH environment var:

/opt/intel/Compiler/11.1/080/icc/lib/intel64:/opt/intel/Compiler/11.1/080/ifortran/lib/intel64:/calima/libs/netcdf/lib:/calima/libs/jasper/lib:/calima/libs/zlib/lib:/calima/libs/libpng/lib:/calima/libs/hdf5/lib:/calima/libs/mpich/lib

(I’m using mpich-3.1.4 and wrf3.6.1 compiled using icc and ifort compilers).

Thanks in advance,

Oriol.


Source: shell

Leave a Reply