Please, could you explain this
hare said:
the LSF (Load Sharing Facility) cannot bear the command : mpirun.
in more details?
Do you see any error messages?
In general, mpirun utility is the part of an MPI distribution, not the LSF.
Please, check your $PATH variable and if your MPI is properly installed.
If you are using MPI-2, then you must use mpiexec instead of mpirun. You should read the respective manuals and correct the script, because it uses the different command line syntax.
I have the following in my run script:
# -------------------------------------------------------------------------
# Create processor count input files
# -------------------------------------------------------------------------
cd $EXEROOT/all
@ PROC = 0 # counts total number of tasks
#rm -rf mpirun.pgfile1 #Create new pgfile
#rm -rf mpirun.pgfile #Create new pgfile
#echo "0" >! mpirun.pgfile1;
rm -rf gforker.cmdline
foreach n (1 2 3 4 5)
set comp = $COMPONENTS[$n]
set model = $MODELS[$n]
set nthrd = $NTHRDS[$n]
set ntask = $NTASKS[$n]
@ M = 0
ln -s $EXEROOT/$model/$comp $EXEROOT/all/. # link binaries into all dir
echo -n "-n $ntask $EXEROOT/all/$comp " >>! gforker.cmdline
if ($n < 5) then
echo ": " >>! gforker.cmdline
endif
while ( $M < $ntask )
if (($n == 1) && ($M == 0)) then
# echo "skipping first model"
else
# echo "1 $EXEROOT/all/$comp" >>! mpirun.pgfile1;
endif
@ M++
@ PROC++
end
# ln -s $EXEROOT/$model/$comp $EXEROOT/all/. # link binaries into all dir
end
# -------------------------------------------------------------------------
# Run the model
# -------------------------------------------------------------------------
env | egrep '(MP_|LOADL|XLS|FPE|DSM|OMP|MPC)' # document env vars
cd $EXEROOT/all
#paste ${PBS_NODEFILE} mpirun.pgfile1 > mpirun.pgfile
#echo local $PROC > mpirun.pgfile
echo "`date` -- CSM EXECUTION BEGINS HERE"
#mpirun -p4pg mpirun.pgfile ./$COMPONENTS[1]
mpiexec `cat gforker.cmdline`
wait
echo "`date` -- CSM EXECUTION HAS FINISHED"
I didn't delete the initial lines, I have only commented them in order you can easily find the respective part of the script.
My script generates the file gforker.cmdline of the following format
-n 1 cpl :
-n 2 clm :
-n 4 pop :
-n 4 csim :
-n 16 cam
This file contains the command line for mpiexec (I use the gforker variant), which is substituted with the `cat` (in reverse quotes)