Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
6 mars 2012, 10:55 UTC−5
Here is a script that can be customised to your needs. It works fine with PBS on our RH5 LINUX cluster.
Best regards,
Alain Glière
#!/bin/bash
#
# submit a parallel COMSOL job on SUMMER cluster
# ##############################################################################
if [ $# -ne 3 -o "$1" = "-help" ]
then
echo " "
echo "Usage: qCOMSOL4parallel nn np comsolFile[.mph]"
echo " nn is the number of computer nodes"
echo " np is the number of cores per computer node"
echo " comsolFile.mph is the input file name"
echo " "
exit
fi
# process the command line arguments
export nn=$1
export perhost=$2
export input_file=$3
# job parameters
export queue_name=yourQueue
export output_file=out_${input_file}
export basename=${input_file%.mph}
export job_name=${basename}
export tmp_dir=~/tmp
export work_dir=~/COMSOL4
export comsol_dir=/opt/comsol/comsol42a/bin
# submit the job
qsub -V -l nodes=${nn}:ppn=${perhost} -q ${queue_name} -N ${job_name} -r n -o ${tmp_dir}/${basename}_$$.log -e ${tmp_dir}/${basename}_$$.err <<\[EOF]
echo "------------------------------------------------------------------------------"
echo "--- Starting job at: `date`"
echo
cd ${work_dir}
echo "--- Current working directory is: `pwd`"
# run COMSOL in parallel (i.e. boot mpd, run comsol and exit mpd)
total=$(wc -l < $PBS_NODEFILE)
echo "--- Running on ${total} processes (cores) on the following nodes:"
uniq -c $PBS_NODEFILE
echo "--- mpd BOOT"
${comsol_dir}/comsol -nn ${nn} mpd boot -f $PBS_NODEFILE -mpirsh ssh --verbose
echo "--- mpd TRACE"
${comsol_dir}/comsol mpd trace -l
echo "--- Parallel COMSOL RUN"
${comsol_dir}/comsol -nn ${nn} -np ${perhost} batch -inputfile ${input_file} -outputfile ${output_file} -batchlog ${basename}.log
echo "--- mpd ALLEXIT"
${comsol_dir}/comsol mpd allexit
echo
echo "--- Job finished at: `date`"
echo "------------------------------------------------------------------------------"
[EOF]
Here is a script that can be customised to your needs. It works fine with PBS on our RH5 LINUX cluster.
Best regards,
Alain Glière
#!/bin/bash
#
# submit a parallel COMSOL job on SUMMER cluster
# ##############################################################################
if [ $# -ne 3 -o "$1" = "-help" ]
then
echo " "
echo "Usage: qCOMSOL4parallel nn np comsolFile[.mph]"
echo " nn is the number of computer nodes"
echo " np is the number of cores per computer node"
echo " comsolFile.mph is the input file name"
echo " "
exit
fi
# process the command line arguments
export nn=$1
export perhost=$2
export input_file=$3
# job parameters
export queue_name=yourQueue
export output_file=out_${input_file}
export basename=${input_file%.mph}
export job_name=${basename}
export tmp_dir=~/tmp
export work_dir=~/COMSOL4
export comsol_dir=/opt/comsol/comsol42a/bin
# submit the job
qsub -V -l nodes=${nn}:ppn=${perhost} -q ${queue_name} -N ${job_name} -r n -o ${tmp_dir}/${basename}_$$.log -e ${tmp_dir}/${basename}_$$.err
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
6 mars 2012, 11:03 UTC−5
thank you very much
i will try it
thank you very much
i will try it