计算化学公社

标题: 请教下CFOUR编译碰到的问题,已经指定了ifort,为什么后面仍然用到的是gfortran? [打印本页]

作者
Author:
413    时间: 2026-4-28 00:43
标题: 请教下CFOUR编译碰到的问题,已经指定了ifort,为什么后面仍然用到的是gfortran?
在configure的时候,已经指定了ifort,请问为什么后面仍然用到的是gfortran呢?


./configure FC=ifort CC=icc MPIFC=mpif90 --with-blas="$MKLPATH/libmkl_solver_ilp64.a -Wl,--start-group $MKLPATH/libmkl_intel_ilp64.a $MKLPATH/libmkl_intel_thread.a $MKLPATH/libmkl_core.a -Wl,--end-group -openmp -lpthread" --prefix=/home/share/software/cfour --enable-mpi=openmpi --with-mpirun="mpirun -np \$CFOUR_NUM_CORES" --with-exenodes="mpirun -np \$CFOUR_NUM_CORES" --with-blas --with-lapack

是因为openmpi没有用ifort编译吗?

mpif90 -O3 -fp-model precise -cpp -assume byterecl -assume buffered_io -extend_source -i8 -DINT64 -DMPI -I.. -I.././include -c aoladlst.f
mpif90 -O3 -fp-model precise -cpp -assume byterecl -assume buffered_io -extend_source -i8 -DINT64 -DMPI -I.. -I.././include -c aoladmp.f
mpif90 -O3 -fp-model precise -cpp -assume byterecl -assume buffered_io -extend_source -i8 -DINT64 -DMPI -I.. -I.././include -c aosymvc2.f
mpif90 -O3 -fp-model precise -cpp -assume byterecl -assume buffered_io -extend_source -i8 -DINT64 -DMPI -I.. -I.././include -c aosymvec.f
mpif90 -O3 -fp-model precise -cpp -assume byterecl -assume buffered_io -extend_source -i8 -DINT64 -DMPI -I.. -I.././include -c assirr.f
gfortran: 错误:precise:没有那个文件或目录
mpif90 -O3 -fp-model precise -cpp -assume byterecl -assume buffered_io -extend_source -i8 -DINT64 -DMPI -I.. -I.././include -c assym.f
gfortran: 错误:byterecl:没有那个文件或目录
gfortran: 错误:buffered_io:没有那个文件或目录
mpif90 -O3 -fp-model precise -cpp -assume byterecl -assume buffered_io -extend_source -i8 -DINT64 -DMPI -I.. -I.././include -c assym2.f
gfortran: 错误:precise:没有那个文件或目录
gfortran: 错误:byterecl:没有那个文件或目录
gfortran: 错误:buffered_io:没有那个文件或目录
mpif90 -O3 -fp-model precise -cpp -assume byterecl -assume buffered_io -extend_source -i8 -DINT64 -DMPI -I.. -I.././include -c assym2a.f
gfortran: 错误:precise:没有那个文件或目录
gfortran: 错误:byterecl:没有那个文件或目录
gfortran: 错误:buffered_io:没有那个文件或目录
gfortran: 错误:precise:没有那个文件或目录
gfortran: 错误:byterecl:没有那个文件或目录
gfortran: 错误:buffered_io:没有那个文件或目录



作者
Author:
wjc404    时间: 2026-4-28 04:44
mpif90可能背后是gfortran。你安装openmpi时匹配的编译器是gnu系列的。
用cc=gcc和fc=gfortran,然后mkl的链接方式使用gnu编译器对应的方式,看看行不行。
作者
Author:
413    时间: 2026-4-28 10:01
wjc404 发表于 2026-4-28 04:44
mpif90可能背后是gfortran。你安装openmpi时匹配的编译器是gnu系列的。
用cc=gcc和fc=gfortran,然后mkl的 ...

好像确实是这样的,用ifort重新编译了openmpi后再编译cfour就过了。

但是运行时报了另外的错,看起来mpi没有被正确调用。请问这是什么问题?是mpi版本的问题吗?我用的ompi4.1.6

*** The MPI_Comm_f2c() function was called before MPI_INIT was invoked.
*** This is disallowed by the MPI standard.
*** Your MPI job will now abort.
[localhost.localdomain:3392593] Local abort before MPI_INIT completed completed successfully, but am not able to aggregate error messages, and not able to guarantee that all other processes were kill
ed!

export CFOUR_NUM_CORES=12
export MKL_NUM_THREADS=1
export OMP_NUM_THREADS=1

xcfour > test.out &

作者
Author:
wjc404    时间: 2026-4-28 10:41
我没用intel编译器试过。我用GNU编译器结合openmpi-4.1.x是能顺畅执行cfour_v2.1最新代码的(CCSD(T)解析频率)
作者
Author:
413    时间: 2026-4-28 10:51
wjc404 发表于 2026-4-28 10:41
我没用intel编译器试过。我用GNU编译器结合openmpi-4.1.x是能顺畅执行cfour_v2.1最新代码的(CCSD(T)解析频 ...

感谢感谢。解决了,要清理文件夹上次跑的临时文件好像。我清理的很干净,只剩ZMAT,basis文件就能跑上了。CFOUR挺玄幻的。
作者
Author:
413    时间: 2026-4-28 10:52
wjc404 发表于 2026-4-28 10:41
我没用intel编译器试过。我用GNU编译器结合openmpi-4.1.x是能顺畅执行cfour_v2.1最新代码的(CCSD(T)解析频 ...

大佬,你几点睡的?几点起的?
作者
Author:
wjc404    时间: 2026-4-28 10:55
哈哈,CFOUR就是比较原始,习惯就好。
我只是个业余爱好者,不是业内人士~




欢迎光临 计算化学公社 (http://bbs.keinsci.com/) Powered by Discuz! X3.3