Submit job with python code (mpi4py) on HPC cluster

a 夏天 提交于 2019-12-05 12:11:29

Didn't need to change my code. This is the pbs script that worked. =)

Apparently, I needed to call the appropriate mpirun in the job script, so that when the code runs in the clusters, it uses the same mpirun as that was being used in head node.

This is the line which made the difference: /opt/intel/impi/4.1.1.036/intel64/bin/mpirun

This is the job script which worked.

#!/bin/sh

#PBS -l nodes=3:ppn=16
#PBS -N phy
#PBS -m abe
#PBS -l walltime=23:00:00
#PBS -j eo
#PBS -q queue_name

cd $PBS_O_WORKDIR
export OMP_NUM_THREADS=16
export I_MPI_PIN=off
echo 'This job started on: ' `date`

/opt/intel/impi/4.1.1.036/intel64/bin/mpirun -np 48 python codename.py
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!