miniconda環境でsun grid engine で投入したmpirun のpython+fortranジョブが遅い(solved)

mpirun コマンド直打ち:

time mpirun -np 10 qens_qselected_using_class_fort_mpi_test.py  6203 0000025io 80 1 Boxcar

real    0m5.214s
user    0m43.772s
sys     0m5.316s

 

qsub で投げるファイル(job_test.sh)の中身:

#$ -cwd
#$ -V -S /bin/bash
#$ -N  testqens
#$ -pe x32 32
#$ -q all.q@nova5
#$ -e err-testqens.log
#$ -o std-testqens.log
time mpirun -np 10 qens_qselected_using_class_fort_mpi_test.py  6203 0000025io 80 1 Boxcar

qsub job_test.sh

real    0m29.295s
user    4m40.258s
sys     0m5.609s

シングルジョブの時間とほぼ同じぐらい遅い。

 

mpirunの場所を明示的に示す:

#$ -cwd
#$ -V -S /bin/bash
#$ -N  testqens
#$ -pe x32 32
#$ -q all.q@nova5
#$ -e err-testqens.log
#$ -o std-testqens.log
export PATH=~/miniconda3/bin:$PATH

time mpirun -np 10 qens_qselected_using_class_fort_mpi_test.py  6203 0000025io 80 1 Boxcar

real    0m5.189s
user    0m44.064s
sys     0m5.183s

 

あるいは、bashrcのconda initializeの部分をコメントアウトし、export PATH="/home/kazu/miniconda3/bin:$PATH"のみ活かす。

# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
###__conda_setup="$('/home/kazu/miniconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
###if [ $? -eq 0 ]; then
###    eval "$__conda_setup"
###else
###    if [ -f "/home/kazu/miniconda3/etc/profile.d/conda.sh" ]; then
###        . "/home/kazu/miniconda3/etc/profile.d/conda.sh"
###    else
###        export PATH="/home/kazu/miniconda3/bin:$PATH"
###    fi
###fi
###conda activate
###unset __conda_setup
# <<< conda initialize <<<
export PATH="/home/kazu/miniconda3/bin:$PATH"

 

すると、同様に、

#$ -cwd
#$ -V -S /bin/bash
#$ -N  testqens
#$ -pe x32 32
#$ -q all.q@nova5
#$ -e err-testqens.log
#$ -o std-testqens.log
time mpirun -np 10 qens_qselected_using_class_fort_mpi_test.py  6203 0000025io 80 1 Boxcar

real    0m5.294s
user    0m44.960s
sys     0m5.171s

となり、速くなった模様。

もう少し長いジョブでも検証する。