问题描述
我正在尝试在 OpenMDAO 中使用 MPI。我收到以下错误。它似乎来自this。但我不明白是什么导致了这个错误或如何解决它。
Traceback (most recent call last):
File "/home/users/RBMDO/Power_Subsystem.py",line 494,in <module>
prob.setup()
File "/home/users/.conda/envs/my-fastenv/lib/python3.8/site-packages/openmdao/core/problem.py",line 874,in setup
raise ValueError(self.msginfo +
ValueError: Problem: Attempting to run in parallel under MPI but PETScVector Could not be imported.
Traceback (most recent call last):
File "/home/users/RBMDO/Power_Subsystem.py",in setup
raise ValueError(self.msginfo +
ValueError: Problem: Attempting to run in parallel under MPI but PETScVector Could not be imported.
Traceback (most recent call last):
File "/home/users/rpandi/RBMDO/Power_Subsystem.py",in setup
raise ValueError(self.msginfo +
ValueError: Problem: Attempting to run in parallel under MPI but PETScVector Could not be imported.
--------------------------------------------------------------------------
Primary job terminated normally,but 1 process returned
a non-zero exit code. Per user-direction,the job has been aborted.
--------------------------------------------------------------------------
--------------------------------------------------------------------------
mpirun detected that one or more processes exited with non-zero status,thus causing
the job to be terminated. The first process to do so was:
我验证了 MPI 和 petsc 在我的环境中工作,我运行了给定 here 的小 petsc4py 脚本。它运行成功并给出了预期的结果。
为了完整起见,我正在使用 AMIEGO 运行 MINLP 优化,我的作业脚本如下。
#SBATCH -N 1
#SBATCH --ntasks-per-node=4
#SBATCH -c 1
#SBATCH -p batch
#SBATCH -C skylake
print_error_and_exit() { echo "***ERROR*** $*"; exit 1; }
module purge || print_error_and_exit "No 'module' command"
module load lang/Anaconda3/2020.02
module load mpI/OpenMPI/3.1.4-GCC-8.3.0
conda activate my-fastenv
mpirun -n $SLURM_NTASKS python /RBMDO/Power_Subsystem.py
是否知道可能导致此错误的原因?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)