2 years ago
#46894
Andrey Buglak
Problems compiling Amber'18 molecular dynamics code in Ubuntu 20
I'm trying to compile Amber'18 molecular dynamic simulation program.
One can find some installation instructions here: https://ambermd.org/InstUbuntu.php
and in Amber's manual.
I have a problem with the 'sudo ./configure -mpi gnu' step.
It gives the following error message:
Checking NetCDF...
Using bundled NetCDF library.
Starting NetCDF build.
Configuring NetCDF C interface (may be time-consuming)...
Compiling the NetCDF C interface (may be time-consuming)...
Configuring NetCDF Fortran interface (may be time-consuming)...
Error: NetCDF Fortran configure returned 1
NetCDF configure failed! Check the netcdf_config.log file
in the /home/andre/amber18/AmberTools/src directory.
Configure failed due to the errors above!
The log file is 383 lines long. It ends with the following 80 lines:
# NetCDF C Configuration Summary
==============================
# General
-------
NetCDF Version: 4.6.1
Configured On: Wed Jan 12 20:38:41 MSK 2022
Host System: x86_64-pc-linux-gnu
Build Directory: /home/Amber/amber18/AmberTools/src/netcdf-4.6.1
Install Prefix: /home/Amber/amber18
# Compiling Options
-----------------
C Compiler: /usr/bin/gcc
CFLAGS: -fPIC -DSYSV -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DBINTRAJ
CPPFLAGS:
LDFLAGS:
AM_CFLAGS:
AM_CPPFLAGS:
AM_LDFLAGS:
Shared Library: no
Static Library: yes
Extra libraries: -lm
# Features
--------
NetCDF-2 API: yes
HDF4 Support: no
NetCDF-4 API: no
NC-4 Parallel Support: no
PNetCDF Support: no
DAP2 Support: no
DAP4 Support: no
Diskless Support: yes
MMap Support: no
JNA Support: no
CDF5 Support: yes
ERANGE fill Support: no
configure: netCDF-Fortran 4.4.4
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
configure: checking user options
checking whether extra valgrind tests should be run... no
checking whether parallel IO tests should be run... no
checking whether netCDF extra tests should be run (developers only)... no
checking for doxygen... no
configure: WARNING: Doxygen not found - documentation will not be built
checking for dot... no
configure: WARNING: dot not found - will use simple charts in documentation
configure: finding C compiler
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for an ANSI C-conforming const... yes
configure: finding Fortran compiler
checking whether we are using the GNU Fortran compiler... no
checking whether gfortran accepts -g... yes
checking whether we are using the GNU Fortran 77 compiler... no
checking whether gfortran accepts -g... yes
checking whether Fortran compiler is checked for ISO_C_BINDING support... yes
checking for Fortran flag to compile .f90 files... unknown
configure: error: Fortran could not compile .f90 files
'which gcc' gives:
/usr/bin/gcc
'gcc version' gives
gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
So I guess there should be no problen with Fortran. 'gfortran -v' gives:
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.3.0-17ubuntu1~20.04' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-HskZEa/gcc-9-9.3.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)
Here is './configure --help':
Usage: ./configure [flags] compiler
where compiler is one of: [[ gnu, intel, pgi, clang, or cray ]]
COMPILERS
-------------------------------------------------------------
Compiler Set | C | C++ | Fortran | tested versions
--------------------------------------------------------------------------
gnu | gcc | g++ | gfortran | 4.4.7, 4.8.4 +
intel | icc | icpc | ifort | 12 - 17
pgi | pgcc | pgc++ | pgf90 | 14.9, 15.4, 16.5
clang | clang | clang++ | gfortran |
cray | cc | CC | ftn | 8.4.6*
--------------------------------------------------------------------------
* See ./configure --full-help for details on flags required for 'cray'.
Most common flags:
-mpi Use MPI for parallelization
-cuda Builds the NVIDIA GPU version of pmemd (pmemd.cuda or
pmemd.cuda.MPI) with default SPFP mixed single/double/
fixed-point precision. Also builds the DPFP version
for debugging purposes.
(Note: Set CUDA_HOME to your cuda build tools installation
path; this is typically /usr/local/cuda.)
-openmp Use OpenMP pragmas to parallelize cpptraj, NAB, SAXS and
paramfit.
Type "make clean; make openmp" after setting this flag.
(Note: -openmp with -mpi or -intelmpi builds MPI+OpenMP
code in pmemd.MPI only with intel & gnu compilers)
-cygwin Include modifications for cygwin on Windows;
this automatically sets some optional flags.
-windows Compile natively for windows using MinGW and msys2.
-noX11 Do not build programs that require X11 libraries
-macAccelerate Use optimized blas/lapack bundled with Mac OS X
Some influential environment variables:
MKL_HOME If set then link in Intel's MKL libraries (intel, gnu)
For information on less-common flags, type "./configure --full-help"
Please, help me to surpass this error and install Amber.
ubuntu
gcc
compiler-errors
fortran
fortran90
0 Answers
Your Answer