我正在尝试安装 Scalable Parallel Random Number Generators Library (SPRNG) 但我遇到了问题。配置阶段运行良好,但是当我尝试进行配置时,我得到以下输出:
../../lib/libsprng.a(libsprng_a-communicate.o): In function `get_proc_info_mpi(int*, int*)':
/home/fangel/Downloads/sprng4.4/SRC/communicate.cpp:13: undefined reference to `MPI_Comm_rank'
../../lib/libsprng.a(libsprng_a-communicate.o): In function `make_new_seed_mpi()':
/home/fangel/Downloads/sprng4.4/SRC/communicate.cpp:28: undefined reference to `MPI_Comm_dup'
/home/fangel/Downloads/sprng4.4/SRC/communicate.cpp:30: undefined reference to `MPI_Comm_rank'
/home/fangel/Downloads/sprng4.4/SRC/communicate.cpp:31: undefined reference to `MPI_Comm_size'
/home/fangel/Downloads/sprng4.4/SRC/communicate.cpp:36: undefined reference to `MPI_Bcast'
/home/fangel/Downloads/sprng4.4/SRC/communicate.cpp:38: undefined reference to `MPI_Comm_free'
../../lib/libsprng.a(libsprng_a-communicate.o): In function `get_proc_info_mpi(int*, int*)':
/home/fangel/Downloads/sprng4.4/SRC/communicate.cpp:14: undefined reference to `MPI_Comm_size'
collect2: ld returned 1 exit status
make[4]: *** [check.clfg] Error 1
make[4]: Leaving directory `/home/fangel/Downloads/sprng4.4/check/lfg'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/fangel/Downloads/sprng4.4/check/lfg'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/fangel/Downloads/sprng4.4/check'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/fangel/Downloads/sprng4.4'
make: *** [all] Error 2
我想这与 MPI 的错误配置有关,但我无法解决问题。我将不胜感激任何帮助。
谢谢Hristo,后面好像更进一步:./configure CXX=mpicxx F77=mpif77
并在communication.cpp中更改为#include,但我仍然遇到错误。这是当前输出的结尾:
check_flfg-check_genf.o: /home/fangel/Downloads/sprng4.4/check/lfg/F77/check_genf.F:218: more undefined references to `ffree_rng_' follow
check_flfg-check_genf.o: In function `test_generator':
/home/fangel/Downloads/sprng4.4/check/lfg/F77/check_genf.F:26: undefined reference to `fmake_new_seed_'
/home/fangel/Downloads/sprng4.4/check/lfg/F77/check_genf.F:27: undefined reference to `fmake_new_seed_'
collect2: ld returned 1 exit status
make[5]: *** [check.flfg] Error 1
make[5]: Leaving directory ` /home/fangel/Downloads/sprng4.4/check/lfg/F77'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory ` /home/fangel/Downloads/sprng4.4/check/lfg/F77'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory ` /home/fangel/Downloads/sprng4.4/check/lfg'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory ` /home/fangel/Downloads/sprng4.4/check'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/fangel/Downloads/sprng4.4'
make: *** [all] Error 2
然后我将 fwrap.h 中所有行的结尾从“__”更改为“_”。现在的错误不同了。我收到与路径 /home/steve/... 相关的错误,该路径在我的计算机中不存在:
check_flcg-check_genf.o: In function `MAIN__':
/home/steve/sprng4.4/check/lcg/F77/<stdin>:26: undefined reference to `fmake_new_seed__'
但是,我能够成功地制作文件夹 TESTS 和EXAMPLES 的程序。问题仅在文件夹检查中...我看不到如何将路径从 /home/steve/... 移动到正确的路径。