| 查看: 1977 | 回复: 6 | ||
| 【奖励】 本帖被评价5次,作者ggdh增加金币 3.6 个 | ||
| 当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖 | ||
[资源]
Dalton2011 编译心得
|
||
|
小结:安装Dalton2011的关键点:1,一个较高版本的编译器。2,如果是装64位的dalton,那么就需要64位的数学库以及64位的openmpi。32的亦然。本文中没有包括数学库的安装。3,编译openmpi的编译器和编译dalton的编译器要保持一致。 编译Dalton失败,在网上一查。还没有完整的Dalton2011的编译过程 于是打算写一篇方便后来人: 编译Dalton时出错: cc1: error: unrecognized command line option "-fbacktrace"* 上dalton官网的用户邮件列表看到回答说可能是gcc版本过低 Dear Ivan, since it does not seem very likely that you changed the F90 compiler between the initial compilation (until you hit the cc1 error) and the continuation, which would render any first round-compiled module file unreadable, my best guess is that your gfortran compiler is too old (your gcc line in the previous mail said 4.1.2). you need at least version 4.3 to work properly with module files. the latest stable version of gfortran is 4.7 if I am not mistaken. hope this helps. with best regards, stefan sent from my iPad 用gcc -v 命令查看本机gcc版本 gcc version 3.4.6 20060404 于是开始安装gcc 安装gcc之前先得安装三个依赖包 gmp 安装 GMP is a free library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating point numbers. 去http://gmplib.org/下载gmp-5.0.2.tar.bz2 拷贝到服务器上 解压 tar -jxvf gmp-5.0.2.tar.bz2 cd ./gmp-5.0.2 创建安装目录 mkdir ../../local/gmp-5.0.2 ./configure --prefix=/home/qin/local/gmp-5.0.2 开始编译 make make install make check 编译成功后在~/.bashrc里面写入环境变量 export LD_LIBRARY_PATH=/home/qin/local/gmp-5.0.2/lib:$LD_LIBRARY_PATH mpfr 安装 The MPFR library is a C library for multiple-precision floating-point computations with correct rounding 去http://www.mpfr.org/下载mpfr-3.1.0.tar.bz2 拷贝到服务器上 解压 tar -jxvf mpfr-3.1.0 cd mpfr-3.1.0 创建安装目录 mkdir ../../local/mpfr-3.1.0 ./configure --prefix=/home/qin/local/mpfr-3.1.0 开始编译 make make check make install 编译成功后在~/.bashrc里面写入环境变量 export LD_LIBRARY_PATH=/home/qin/local/mpfr-3.1.0/lib:$LD_LIBRARY_PATH mpc安装 Mpc is a C library for the arithmetic of complex numbers with arbitrarily high precision and correct rounding of the result. 去http://www.multiprecision.org/下载mpc-0.9.tar.gz 拷贝到服务器上 解压 tar -xzvf mpc-0.9.tar.gz cd mpc-0.9 mkdir ../../local/mpc-0.9 ./configure --prefix=/home/qin/local/mpc-0.9 --with-gmp=/home/qin/local/gmp-5.0.2 --with-mpfr=/home/qin/local/mpfr-3.1.0 make make install 编译成功后在~/.bashrc里面写入环境变量 export LD_LIBRARY_PATH=/home/qin/local/mpc-0.9/lib:$LD_LIBRARY_PATH gcc安装 从gcc官网下载最新gcc-4.6.2.tar.gz 解压后新建两个目录,一个用来编译,一个用来放编好的gcc mkdir ~/local/gcc-4.6.2 mkdir ~/local/gcc-temp cd ~/local/gcc-temp ./configure --prefix=/home/qin/local/gcc-4.6.2 --with-gmp=/home/qin/local/gmp-5.0.2 --with-mpfr=/home/qin/local/mpfr-3.1.0 --with-mpc=/home/qin/local/mpc-0.9 make make install 漫长等待2小时 安装好之后 在~/.bashrc中改环境变量 export LD_LIBRARY_PATH=/home/qin/local/gcc-4.6.2/lib:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=/home/qin/local/gcc-4.6.2/lib64:$LD_LIBRARY_PATH export PATH=/home/qin/local/gcc-4.6.2/bin:$PATH 然后 source ~/.bashrc 然后 which gcc 显示 ~/local/gcc-4.6.2/bin/gcc 大功告成了。 接下来安装dalton Dalton2011安装 先解压 tar -jxvf Dalton2011_release_v0.tbz cd Dalton2011_release/DALTON ./configure 出现一堆是非问答题。一般选默认即可 但是数学库的选择要注意一下 ~/local/gcc-4.6.2/bin/gccFound /opt/intel/mkl/10.0.2.018/lib/32/libmkl.so, use it? [Y/n] n Found /opt/intel/mkl/10.0.2.018/lib/64/libmkl.so, use it? [Y/n] n Found /opt/intel/mkl/10.0.2.018/lib/em64t/libmkl.so, use it? [Y/n] n Found /opt/intel/mkl/10.1.1.019/lib/32/libmkl.so, use it? [Y/n] n Found /opt/intel/mkl/10.1.1.019/lib/64/libmkl.so, use it? [Y/n] y 显然服务器上装了不少数学库,我选了一个版本较高的64位的。 然后开始编译 make 不幸又出错了 make[1]: Entering directory `/home/qin/Dalton2011_release/DALTON/lucita' make --no-print-directory dalton_mpi.o lucita_mcscf_ci_cfg.o lucita_cfg.o lucita_orbitalspaces.o par_sync_cw.o par_io.o par_communication_model.o par_io_fh.o mpif90 -I../include -J../modules -DVAR_GFORTRAN -DSYS_LINUX -DVAR_MFDS -D'INSTALL_WRKMEM=1048000000' -D'INSTALL_MMWORK=1' -D_FILE_OFFSET_BITS=64 -DVAR_MPI -DGFORTRAN=462 -DVAR_INT64 -DIMPLICIT_NONE -march=x86-64 -O3 -ffast-math -funroll-loops -ftree-vectorize -fbacktrace -fdefault-integer-8 -c dalton_mpi.F90 dalton_mpi.F90:16.9: use mpi 1 Fatal Error: Parse error when checking module version for file 'mpi.mod' opened at (1) 查原因,可能是openmpi编译用的gcc和现在gcc版本不同造成的。 于是去下openmpi openmpi的安装 去http://www.open-mpi.org/下载openmpi-1.4.4.tar.bz2 tar -jxvf openmpi-1.4.4.tar.bz2 建立目标目录 mkdir ./local/openmpi-1.4.4 cd ./openmpi-1.4.4 配置 ./configure --prefix=/home/qin/local/openmpi-1.4.4 开始编译 make make install 写入环境变量 export MPI_ROOT=/home/qin/local/openmpi-1.4.4 export LD_LIBRARY_PATH=$MPI_ROOT/lib:$LD_LIBRARY_PATH export PATH=$MPI_ROOT/bin:$PATH source ~/.bashrc 重新安装Dalton2011 。。。。 又出错了: mpif90 -I../include -J../modules -DVAR_GFORTRAN -DSYS_LINUX -DVAR_MFDS -D'INSTALL_WRKMEM=1048000000' -D'INSTALL_MMWORK=1' -D_FILE_OFFSET_BITS=64 -DVAR_MPI -DGFORTRAN=462 -DVAR_INT64 -DIMPLICIT_NONE -march=x86-64 -O3 -ffast-math -funroll-loops -ftree-vectorize -fbacktrace -fdefault-integer-8 -c par_sync_cw.F90 par_sync_cw.F90:244.68: call dalton_mpi_bcast(set_sync_default_val, 0, mpi_comm_world) 1 Error: There is no specific subroutine for the generic 'dalton_mpi_bcast' at (1) par_sync_cw.F90:223.64: ......... Error: There is no specific subroutine for the generic 'dalton_mpi_bcast' at (1) par_sync_cw.F90:142.78: call dalton_mpi_bcast(lucita_cfg_max_batch_size, 0, mpi_comm_world) 1 Error: There is no specific subroutine for the generic 'dalton_mpi_bcast' at (1) Fatal Error: Error count reached limit of 25. 这次又在Dalton邮件列表上找到了类似错误 Hi Nikolai, this is indeed a bit puzzling. Your Makefile.config seems OK at first glance wrt the MPI settings. You are using OpenMPI, right? If so, could you please send me the output of ompi_info -a ? Wrt your MKL problem i note that you compile with 64-bit integers, i.e. the -i8 flag for ifort. In this case you have to use the 64-bit version of the MKL libs as well! The following line should do it: LIBS = -L/site/VERSIONS/intel-11.1/mkl/lib/em64t -Wl,--rpath=/site/VERSIONS/intel-11.1/mkl/lib/em64t -lmkl_lapack -lmkl_intel_ilp64 -lmkl_solver_ilp64 -lmkl_intel_thread -lmkl_core -lguide -lpthread Your MPI problem could also be related to a 64-bit/32-bit issue. Note that OpenMPI has to be configured with 64-bit integers if you want to use it with a 64-bit Dalton. You can check this in the ompi_info -a output by grepping for the line 'Fort integer size', i.e.: ompi_info -a | grep 'Fort integer size' should yield Fort integer size: 8 with best regards, stefan openmpi 64位安装 意思就是不能用32为的openmpi去编译64位的Dalton 运行这个命令 ompi_info -a | grep 'Fort integer size' 得到 Fort integer size: 4 说明我的openmpi是32位的 于是要重新编译openmpi 回到openmpi 安装哪一步 在配置的地方写上 ./configure --prefix=/home/qin/local/openmpi-1.4.4 CXX=g++ CC=gcc F77=gfortran FC=gfortran FFLAGS="-m64 -fdefault-integer-8" FCFLAGS="-m64 -fdefault-integer-8" CFLAGS=-m64 CXXFLAGS=-m64 删掉之前的安装 rm -r ~/local/openmpi-1.4.4/* make make install ompi_info -a | grep 'Fort integer size' 得到 Fort integer size: 8 说明64位openmpi编译成功(在此感谢大漠孤狼,天外来客热心帮助) Dalton TEST 在回到前面Dalton的安装,这次make成功了。 开始测试 cd /home/qin/Dalton2011_release/DALTON/test ./TEST -keep -benchmark all > TEST_all.log 2>&1 & |
» 猜你喜欢
研究发现一个新的临界系数,独立于临界压缩因子
已经有7人回复
PbS量子点如何确定浓度
已经有11人回复
物理化学论文润色/翻译怎么收费?
已经有144人回复
200年来人们一直无法破解的难题: 气液临界点状态方程
已经有7人回复
关于引力延迟下双星系统角动量不守恒的疑惑---求高手解答!
已经有10人回复
大湾区大学刘天辉课题组招收2026级博士生(与中山大学物理学院联合培养)
已经有22人回复
PbS量子点紫外吸收
已经有0人回复
比利时鲁汶大学与国家留学基金委共同资助博士研究生CSC-KU Leuven PhD Scholarship
已经有0人回复
请问四氢呋喃溶解的聚合物用甲醇沉淀时,如何使沉淀过程加速?
已经有2人回复
» 本主题相关价值贴推荐,对您同样有帮助:
求助VASP用的Intel ifort icc 编译器
已经有9人回复
mac上安装使用fortran
已经有5人回复
pwscf并行计算错误
已经有7人回复
vasp5.3.3并行编译出错
已经有10人回复
module无法编译?
已经有4人回复
你用的编译器是什么,求推荐
已经有28人回复
请问单机装VASP,装并行好还是串行好?
已经有15人回复
lev00编译出错
已经有4人回复
Dalton2011编译问题请教专家
已经有10人回复
Error in opening the compiled module file. Check INCLUDE paths.
已经有7人回复
intel visual fortran中MKL如何使用,是用use module还是include?
已经有4人回复
求助elk并行编译!
已经有5人回复
用ICC还是GCC编译?
已经有3人回复
小语种(日语)要求是N2,旧2级行吗?
已经有11人回复
ifort(10.1.012) + MKL(10.0.2.018) + OpenMPI(1.4.4)编译并行vasp-5.2.2
已经有85人回复
Dalton2011并行编译详记
已经有33人回复
【交流】Compile Dalton2011 program
已经有3人回复
【分享】MKL程序编译与连接:Lapack篇
已经有6人回复
【求助】linux下lapack库编译测试错误
已经有3人回复
【求助】dalton-2.0编译及测试问题【完结】
已经有18人回复
5楼2012-03-10 16:21:35
2楼2011-11-10 14:35:18
3楼2012-02-25 19:14:44
7楼2014-10-11 09:07:10















回复此楼

