使用hipcc编译可执行文件时,出现undefined reference to `MPI_Init'等一系列找不到MPI库函数的错误导致编译中断
解决办法:在编译命令中加入MPI的path
/opt/rocm/bin/hipcc -I/opt/rocm/include -I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/opal/mca/event/libevent2022/libevent -I/usr/lib/x86_64-linugnu/openmpi/include/openmpi/opal/mca/event/libevent2022/libevent/include -I/usr/lib/x86_64-linux-gnu/openmpi/include -L/usr//lib -L/usr/lib/x86_64-linux-gnu/openmpi/lib -lmpi -lstdc++ muldcu_test_2.cpp -o muldcu_test