我们在ROCM2.9和MPICH3.3.2编写了两个程序,分别为testMatMul.cpp(用extern "C"修饰的核函数matrixMul和启动核函数的函数dgemm),MPI_Matrix.c(使用MPI分配计算任务,每个任务需调用testMatMul.cpp中的dgemm函数执行)。采用如下命令编译链接并编写slurm(srun启动):
hipcc -c testMatMul.cpp -o testMatMul.o
/public/home/ghfund_1_a8/linxinyuan/mpich3.3.2/bin/mpicc -c MPI_Matrix.c -o MPI_Matrix.o
/public/home/ghfund_1_a8/linxinyuan/mpich3.3.2/bin/mpicc -o testMatMul MPI_Matrix.o testMatMul.o -L/opt/rocm/lib -lhip_hcc -export-dynamic -ldl -lstdc++
(hipLaunchKernel)启动核函数时报错如图。
请问这个错误的原因是什么?ROCM2.9下,HIP+MPI应当如何编译?
![]()

暂无数据
您好,rocm2.9版本已不再维护,请使用dtk21.10.1版本吧