[AMBER] Compilation error

From: Ruibin Liu <ruibinliuphd.gmail.com>
Date: Tue, 16 Nov 2021 10:03:23 -0500


I am trying to base our CpHMD method on the master branch and created
the phmd_NL branch. When I tried to compile, I got the serial and MPI
version work but failed in the cuda serial step. The commands in order I
used were:

./configure -noX11 --skip-python gnu && make install
./configure -noX11 --skip-python -mpi gnu && make install
./configure -noX11 --skip-python -cuda gnu && make install

And I got the error messages as:


[PMEMD]  CC wallclock.c
cc1: warning: command line option ‘-std=c++11’ is valid for C++/ObjC++
but not for C
gfortran  -O3 -mtune=native  -DCUDA -DGTI -o
/data/home/rliu/tmp/test_amber_phmdNL/amber/bin/pmemd.cuda_SPFP random.o
resamplekin.o gbl_constants.o gbl_datatypes.o state_info.o file_io_dat.o
boost-gamma-distribution.o external_dat.o mdin_ctrl_dat.o
mdin_emil_dat.o mdin_ewald_dat.o mdin_debugf_dat.o prmtop_dat.o
inpcrd_dat.o dynamics_dat.o emil.o img.o nbips.o offload_allocation.o
parallel_dat.o parallel.o gb_parallel.o pme_direct.o pme_recip_dat.o
pme_slab_recip.o pme_blk_recip.o pme_slab_fft.o pme_blk_fft.o
pme_fft_dat.o fft1d.o bspline.o nebread.o neb.o pme_force.o pbc.o
nb_pairlist.o gb_ene_hybrid.o nb_exclusions.o cit.o dynamics.o bonds.o
angles.o dihedrals.o extra_pnts_nb14.o runmd.o loadbal.o shake.o prfs.o
mol_list.o runmin.o constraints.o axis_optimize.o gb_ene.o veclib.o
phmd.o gb_force.o timers.o pmemd_lib.o runfiles.o file_io.o
AmberNetcdf.o bintraj.o binrestart.o pmemd_clib.o pmemd.o degcnt.o
erfcfun.o nmr_calls.o nmr_lib.o get_cmdline.o master_setup.o
pme_alltasks_setup.o pme_setup.o ene_frc_splines.o gb_alltasks_setup.o
nextprmtop_section.o angles_ub.o dihedrals_imp.o cmap.o charmm.o
charmm_gold.o findmask.o remd.o multipmemd.o remd_exchg.o amd.o gamd.o
ti.o gbsa.o barostats.o scaledMD.o constantph.o constante.o
energy_records.o constantph_dat.o constante_dat.o external.o relaxmd.o
sgld.o emap.o get_efield_energy.o gti.o processor.o parallel_processor.o
pme_fft_midpoint.o pme_recip_midpoint.o dihedrals_midpoint.o
angles_midpoint.o bonds_midpoint.o dbg_arrays.o mcres.o ensure_alloc.o
reservoir.o sams.o ramd.o runreweight.o hybridsolvent_remd.o \
     xray_fourier.o xray_globals.o xray_interface.o xray_utils.o
xray_reciprocal_space.o assert.o wallclock.o bulk_solvent.o \
     ./cuda/cuda.a -L/usr/local/cuda-10.0/lib64
-L/usr/local/cuda-10.0/lib -lcurand -lcufft -lcudart -lcudadevrt
-lgfortran -lstdc++ -L/data/home/rliu/tmp/test_amber_phmdNL/amber/lib
/data/home/rliu/tmp/test_amber_phmdNL/amber/lib/libnetcdf.a -llapack
-lblas /data/home/rliu/tmp/test_amber_phmdNL/amber/lib/libemil.a -lstdc++ \
     nfe_lib.o nfe_setup.o nfe_colvar.o nfe_smd.o nfe_abmd.o nfe_pmd.o
nfe_bbmd.o nfe_stsm.o Plumed.o -ldl -Wl,-export-dynamic
phmd.o: In function `__phmd_mod_MOD_updatephmd':
phmd.F90:(.text+0x71af): undefined reference to `gpu_download_phmd_theta_'
collect2: error: ld returned 1 exit status
Makefile:140: recipe for target
'/data/home/rliu/tmp/test_amber_phmdNL/amber/bin/pmemd.cuda_SPFP' failed
make[4]: ***
[/data/home/rliu/tmp/test_amber_phmdNL/amber/bin/pmemd.cuda_SPFP] Error 1
make[4]: Leaving directory
Makefile:86: recipe for target 'cuda_SPFP' failed
make[3]: *** [cuda_SPFP] Error 2
make[3]: Leaving directory
Makefile:33: recipe for target 'cuda_serial' failed
make[2]: *** [cuda_serial] Error 2
make[2]: Leaving directory
Makefile:42: recipe for target 'cuda_serial' failed
make[1]: *** [cuda_serial] Error 2
make[1]: Leaving directory '/data/home/rliu/tmp/test_amber_phmdNL/amber/src'
Makefile:9: recipe for target 'amber' failed
make: *** [amber] Error 2

I am new in serious Amber compilation but it seems there is a link issue
between Fortran and c++/cuda code. As to the gpu_download_phmd_theta_
function, it's declared in gpu.cpp and defined in gpu.h and invoked as 
gpu_download_phmd_theta in phmd.F90. Can anyone help me figure it out?



AMBER mailing list
Received on Tue Nov 16 2021 - 07:30:02 PST
Custom Search