计算化学公社

标题: 求助安装Gromacs时 仍有error [打印本页]

作者
Author:
张一手大哥    时间: 2020-3-14 01:10
标题: 求助安装Gromacs时 仍有error
求助帖

本人新手,在Linux 下安装gromacs 2020.1时,make过程出错。求大神指教。。。非常感谢!
安装过程:
tar xfz gromacs-2020.1.tar.gz
cd gromacs-2020.1
mkdir build
cd build
cmake .. -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=ON -DCMAKE_C_COMPILER=cc -DCMAKE_CXX_COMPILER=g++
make
make check
sudo make install
source /usr/local/gromacs/bin/GMXRC
  



目前的错误:
src/gromacs/CMakeFiles/lmfit_objlib.dir/build.make:79: recipe for target 'src/gromacs/CMakeFiles/lmfit_objlib.dir/__/external/lmfit/lmmin.cpp.o' failed
make[2]: *** [src/gromacs/CMakeFiles/lmfit_objlib.dir/__/external/lmfit/lmmin.cpp.o] Error 1
CMakeFiles/Makefile2:4229: recipe for target 'src/gromacs/CMakeFiles/lmfit_objlib.dir/all' failed
make[1]: *** [src/gromacs/CMakeFiles/lmfit_objlib.dir/all] Error 2
Makefile:179: recipe for target 'all' failed
make: *** [all] Error 2




以下是之前cmake的错误,已经修改成功了,谢谢各位指导。

**********/gromacs-2020.1/build$ cmake .. -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=ON
CMake Error at cmake/FindLibStdCpp.cmake:162 (message):
  GROMACS requires C++14, but a test of such functionality in the C++
  standard library failed to compile.  The g++ found at /usr/bin/g++ had a
  suitable version, so ;something else must be the problem
Call Stack (most recent call first):
  CMakeLists.txt:69 (find_package)


-- Configuring incomplete, errors occurred!
See also "/data16/XUAN/gromacs-2020.1/build/CMakeFiles/CMakeOutput.log".
See also "/data16/XUAN/gromacs-2020.1/build/CMakeFiles/CMakeError.log".
#cmakeerror.log内容如下


Performing C++ SOURCE FILE Test CXX14_COMPILES failed with the following output:
Change Dir: /data16/XUAN/gromacs-2020.1/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make cmTC_203a2/fast && /usr/bin/make -f CMakeFiles/cmTC_203a2.dir/build.make CMakeFiles/cmTC_203a2.dir/build
make[1]: Entering directory '/data16/XUAN/gromacs-2020.1/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_203a2.dir/src.cxx.o
/sw/workstations/apps/linux-ubuntu16.04-x86_64/openmpi/3.1.1/intel-18.0.1/lqdls6jj3oauixvl4rbbpnljxr6sd6zs/bin/mpic++    -gcc-name=/usr/bin/g++ -DCXX14_COMPILES   -std=c++14 -o CMakeFiles/cmTC_203a2.dir/src.cxx.o -c /data16/XUAN/gromacs-2020.1/build/CMakeFiles/CMakeTmp/src.cxx
/data16/XUAN/gromacs-2020.1/build/CMakeFiles/CMakeTmp/src.cxx(2): error: namespace "std" has no member "cbegin"
  int main() { int a[2]; std::cbegin(a); }
                              ^

compilation aborted for /data16/XUAN/gromacs-2020.1/build/CMakeFiles/CMakeTmp/src.cxx (code 2)
CMakeFiles/cmTC_203a2.dir/build.make:82: recipe for target 'CMakeFiles/cmTC_203a2.dir/src.cxx.o' failed
make[1]: *** [CMakeFiles/cmTC_203a2.dir/src.cxx.o] Error 2
make[1]: Leaving directory '/data16/XUAN/gromacs-2020.1/build/CMakeFiles/CMakeTmp'
Makefile:138: recipe for target 'cmTC_203a2/fast' failed
make: *** [cmTC_203a2/fast] Error 2


Source file was:
#include <iterator>
int main() { int a[2]; std::cbegin(a); }






作者
Author:
wuzhiyi    时间: 2020-3-14 03:15
要么c++版本太久 要么你加了乱七八糟的cxx flag
作者
Author:
张一手大哥    时间: 2020-3-14 03:28
wuzhiyi 发表于 2020-3-14 03:15
要么c++版本太久 要么你加了乱七八糟的cxx flag

谢谢。
但是请问一下怎么去检查或者修改呢?
作者
Author:
liuyuje714    时间: 2020-3-14 03:53
用-DGMX_MPI=OFF再试,看报错好像mpi有毛病。看样子你系统的openmpi是使用intel编译器编译的,你在这里有用gcc编译gmx,并调用了该openmpi。你也可以直接用intel编译器编译gmx
作者
Author:
张一手大哥    时间: 2020-3-14 05:13
liuyuje714 发表于 2020-3-14 03:53
用-DGMX_MPI=OFF再试,看报错好像mpi有毛病。看样子你系统的openmpi是使用intel编译器编译的,你在这里有用 ...

谢谢 确实是编译器的问题 好像是能解决了
作者
Author:
hhhnano    时间: 2020-3-14 08:28
-DCMAKE_C_COMPILER=cc 修改为-DCMAKE_C_COMPILER=gcc,    2020版对GCC和intel openmpi版本有要求,设置估计出现不兼容问题,GCC要用5以上版本。
作者
Author:
hikun    时间: 2022-2-26 10:50
hhhnano 发表于 2020-3-14 08:28
-DCMAKE_C_COMPILER=cc 修改为-DCMAKE_C_COMPILER=gcc,    2020版对GCC和intel openmpi版本有要求,设置估 ...

谢谢了,这个方法有效 应该置顶的
作者
Author:
Gaussian-Caio    时间: 2024-12-17 15:09
hikun 发表于 2022-2-26 10:50
**** 作者被禁止或删除 内容自动屏蔽 ****

太关键了啊




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