Kieran 发表于 2021-12-25 04:52:57

并行出错

大家好,

我编写了一个FORTRAN代码,里面用了MPI并行。编译可以正常通过。我把我的FORTRAN程序上传到附件里了。

但当我提交并运行程序时,却出现错误。好像与MPI的数据广播有关,但我没发现哪里不对。我报错文件粘贴在下面了。
Loading mkl-2021.3.0 version modulefiles
Loading compilers-2021.3.0 version modulefiles
Loading tbb-2021.3.0 version modulefiles
Loading tbb-2021.3.0 version modulefiles
Loading mpi-2021.3.0 version modulefiles
Abort(67706625) on node 1 (rank 1 in comm 0): Fatal error in PMPI_Bcast: Invalid buffer pointer, error stack:
PMPI_Bcast(451): MPI_Bcast(buf=(nil), count=12, MPI_DOUBLE, root=0, comm=MPI_COMM_WORLD) failed
PMPI_Bcast(428): Null buffer pointer


另外,我也把地交任务的脚本文件放在下面了。
#!/bin/bash
#SBATCH --partition=bansil
#SBATCH --job-name=code
#SBATCH --time=00:30:00
#SBATCH --err=std.err
#SBATCH --output=std.out
#SBATCH --nodes=2
#SBATCH --ntasks=2
#SBATCH --constraint=zen2
module load intel/mkl-2021.3.0
module load intel/mpi-2021.3.0
export OMP_NUM_THREADS=1
#----------------------------------------------------------#
echo "The job "${SLURM_JOB_ID}" is running on "${SLURM_JOB_NODELIST}
#----------------------------------------------------------#
mpirun ./BERRYCURVATURE


能麻烦大家帮我查看下,我的程序中哪里出了问题吗?又要如何修改呢?

谢谢大家。

Kieran
页: [1]
查看完整版本: 并行出错