Re: [AMBER] Undefined reference netcdf in 'patched'/updated AmberTools 1.5/ pmemd.cuda compilation.

From: Jason Swails <jason.swails.gmail.com>
Date: Wed, 28 Dec 2011 19:42:25 -0500

On Wed, Dec 28, 2011 at 5:26 PM, Danni L Harris
<danniharris.sbcglobal.net>wrote:

> Hi,
>
> I'd appreciate a 'push' in the right direction for troubleshooting a
> pmemd.cuda
> compilation.
>
> I have ---updated to AmberTools 1.5, applied the AT15_Amber11.py, applied
> the
> most recent bugfix.all.tar.bz2, successfully built the Ambertools 1.5
> version,
> the AMBER-serial versions, but am having an issue at the final stage of
> compilation of the pmemd -cuda version.
>
> The prerequeisites established on Ross's ambermd page are all satisfied
> ---and
> the earlier (prep-patched version worked fine on my Quad-Tesla system).
>
> The pmemd.cuda compilation is choking with an underfined reference to a
> netcdf
> routine---and I am not sure about what to look into.
> This looks like a missing routine (was their a netcdf update that I am
> missing?).
>
> An ASIDE:
>
> ________________________________________________________________________________
> I noted one pecularity even in compiling the pmemd serial version in that
> it was
> not finding the *.mod files:
>
> $(NETCDF):
> $(MAKE) -C ../netcdf/src install
> # cp ../netcdf/include/*.mod ./src
> # DLH-this path doesn't exist guys.
> # I think we want the include under AmberTools
> cp ../../AmberTools/include/*.mod ./src
>
> when I made this small pathchange to me pmemd Makefile the serial version
> compiled fine.
>
> _______________________________________________________________________________
> This is the issue I am running into with attempts to compile (gnu
> compilers) the
> CUDA enabled version--thanks for pointing me in some possible directions
> for
> trouble shooting this. Danni
>
> ERROR UPON ATTEMPT TO COMPILE THE GPU/CUDA VERSION.
>
> make[3]: Leaving directory `/usr/local/lib/amber11/src/pmemd/src/cuda'
> gfortran -O3 -DCUDA -o pmemd.cuda gbl_constants.o gbl_datatypes.o
> state_info.o
> file_io_dat.o mdin_ctrl_dat.o mdin_ewald_dat.o mdin_debugf_dat.o
> prmtop_dat.o
> inpcrd_dat.o dynamics_dat.o img.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 pme_force.o pbc.o
> nb_pairlist.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 gb_force.o timers.o pmemd_lib.o
> runfiles.o
> file_io.o bintraj.o pmemd_clib.o pmemd.o random.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 -L/usr/local/cuda/lib64
> -L/usr/local/cuda/lib -lcufft -lcudart ./cuda/cuda.a
>

This is weird. I don't see the NetCDF library being linked in at all
(/usr/local/lib/amber11/lib/libnetcdf.a or something that effect -- it can
be a path relative to $AMBERHOME/src/pmemd/src as well).

The src/pmemd/src/Makefile should have the lines:

pmemd$(SFX): $(NETCDF) $(OBJS)
   $(PMEMD_LD) $(PMEMD_FOPTFLAGS) $(LDOUT)$. $(OBJS) $(PMEMD_NETCDFLIB)
$(LDFLAGS) $(PMEMD_FLIBSF)

where you can see the $(PMEMD_NETCDFLIB) is being linked into the final
executable. This variable is defined in the config.h, but was removed
after Amber11 was released (but before AmberTools 1.5 was released). Thus,
that's one of the changes that AT15_Amber11.py has to make to the config.h
file. Do you see PMEMD_NETCDFLIB defined in your config.h? If not, I
suggest re-running configure and making sure that AT15_Amber11.py was run
before trying to build.

Note that bugfix.24 for AmberTools 1.5 applies this script automatically
after configure is complete.

HTH,
Jason


> bintraj.o: In function `__bintraj_mod__checkerror':
> bintraj.f90:(.text+0xae): undefined reference to `__netcdf__nf90_strerror'
> bintraj.o: In function `__bintraj_mod__open_binary_files':
> bintraj.f90:(.text+0x1db): undefined reference to `__netcdf__nf90_create'
> bintraj.f90:(.text+0x234): undefined reference to `__netcdf__nf90_def_dim'
> bintraj.f90:(.text+0x279): undefined reference to `__netcdf__nf90_def_dim'
> bintraj.f90:(.text+0x2ae): undefined reference to `__netcdf__nf90_def_dim'
> bintraj.f90:(.text+0x2e3): undefined reference to `__netcdf__nf90_def_dim'
> bintraj.f90:(.text+0x31b): undefined reference to
> `__netcdf__nf90_put_att_text'
> bintraj.f90:(.text+0x359): undefined reference to
> `__netcdf__nf90_put_att_text'
> bintraj.f90:(.text+0x397): undefined reference to
> `__netcdf__nf90_put_att_text'
> bintraj.f90:(.text+0x3d5): undefined reference to
> `__netcdf__nf90_put_att_text'
> bintraj.f90:(.text+0x413): undefined reference to
> `__netcdf__nf90_put_att_text'
> bintraj.o:bintraj.f90:(.text+0x451): more undefined references to
> `__netcdf__nf90_put_att_text' follow
> bintraj.o: In function `__bintraj_mod__open_binary_files':
> bintraj.f90:(.text+0x4f0): undefined reference to
> `__netcdf__nf90_def_var_manydims'
> bintraj.f90:(.text+0x587): undefined reference to
> `__netcdf__nf90_def_var_manydims'
> bintraj.f90:(.text+0x5bf): undefined reference to
> `__netcdf__nf90_put_att_text'
> bintraj.f90:(.text+0x686): undefined reference to
> `__netcdf__nf90_def_var_manydims'
> bintraj.f90:(.text+0x6c4): undefined reference to
> `__netcdf__nf90_put_att_text'
> bintraj.f90:(.text+0x717): undefined reference to `__netcdf__nf90_def_dim'
> bintraj.f90:(.text+0x75a): undefined reference to `__netcdf__nf90_def_dim'
> bintraj.f90:(.text+0x7f9): undefined reference to
> `__netcdf__nf90_def_var_manydims'
> bintraj.f90:(.text+0x8a5): undefined reference to
> `__netcdf__nf90_def_var_manydims'
> bintraj.f90:(.text+0x94f): undefined reference to
> `__netcdf__nf90_def_var_manydims'
> bintraj.f90:(.text+0x98d): undefined reference to
> `__netcdf__nf90_put_att_text'
> bintraj.f90:(.text+0xa37): undefined reference to
> `__netcdf__nf90_def_var_manydims'
> bintraj.f90:(.text+0xa75): undefined reference to
> `__netcdf__nf90_put_att_text'
> bintraj.f90:(.text+0xacd): undefined reference to `__netcdf__nf90_set_fill'
> bintraj.f90:(.text+0xb01): undefined reference to `__netcdf__nf90_enddef'
> bintraj.f90:(.text+0xc9f): undefined reference to
> `__netcdf__nf90_put_var_1d_text'
> bintraj.f90:(.text+0xe43): undefined reference to
> `__netcdf__nf90_put_var_1d_text'
> bintraj.f90:(.text+0x103c): undefined reference to
> `__netcdf__nf90_put_var_1d_text'
> bintraj.f90:(.text+0x108f): undefined reference to `__netcdf__nf90_create'
> bintraj.f90:(.text+0x10e6): undefined reference to `__netcdf__nf90_def_dim'
> bintraj.f90:(.text+0x1133): undefined reference to `__netcdf__nf90_def_dim'
> bintraj.f90:(.text+0x1170): undefined reference to `__netcdf__nf90_def_dim'
> bintraj.f90:(.text+0x11a5): undefined reference to `__netcdf__nf90_def_dim'
> bintraj.f90:(.text+0x11dd): undefined reference to
> `__netcdf__nf90_put_att_text'
> bintraj.f90:(.text+0x121b): undefined reference to
> `__netcdf__nf90_put_att_text'
> bintraj.f90:(.text+0x1259): undefined reference to
> `__netcdf__nf90_put_att_text'
> bintraj.f90:(.text+0x1297): undefined reference to
> `__netcdf__nf90_put_att_text'
> bintraj.f90:(.text+0x12d5): undefined reference to
> `__netcdf__nf90_put_att_text'
> bintraj.o:bintraj.f90:(.text+0x1313): more undefined references to
> `__netcdf__nf90_put_att_text' follow
> bintraj.o: In function `__bintraj_mod__open_binary_files':
> bintraj.f90:(.text+0x13a5): undefined reference to
> `__netcdf__nf90_def_var_manydims'
> bintraj.f90:(.text+0x1434): undefined reference to
> `__netcdf__nf90_def_var_manydims'
> bintraj.f90:(.text+0x146c): undefined reference to
> `__netcdf__nf90_put_att_text'
> bintraj.f90:(.text+0x1533): undefined reference to
> `__netcdf__nf90_def_var_manydims'
>
> bintraj.f90:(.text+0x1571): undefined reference to
> `__netcdf__nf90_put_att_text'
> bintraj.f90:(.text+0x15a9): undefined reference to
> `__netcdf__nf90_put_att_one_fourbytereal'
> bintraj.f90:(.text+0x15d9): undefined reference to
> `__netcdf__nf90_set_fill'
> bintraj.f90:(.text+0x1605): undefined reference to `__netcdf__nf90_enddef'
> bintraj.f90:(.text+0x17a8): undefined reference to
> `__netcdf__nf90_put_var_1d_text'
> bintraj.f90:(.text+0x1992): undefined reference to
> `__netcdf__nf90_def_var_manydims'
> bintraj.f90:(.text+0x19d0): undefined reference to
> `__netcdf__nf90_put_att_text'
> bintraj.f90:(.text+0x1a08): undefined reference to
> `__netcdf__nf90_put_att_one_fourbytereal'
> bintraj.o: In function `__bintraj_mod__close_binary_files':
> bintraj.f90:(.text+0x1a44): undefined reference to `__netcdf__nf90_close'
> bintraj.f90:(.text+0x1a6a): undefined reference to `__netcdf__nf90_close'
> bintraj.o: In function `__bintraj_mod__write_binary_crds_axis_flipped':
> bintraj.f90:(.text+0x1cf1): undefined reference to
> `__netcdf__nf90_put_var_2d_fourbytereal'
> bintraj.o: In function `__bintraj_mod__write_binary_crds':
> bintraj.f90:(.text+0x1f0f): undefined reference to
> `__netcdf__nf90_put_var_2d_eightbytereal'
> bintraj.o: In function `__bintraj_mod__write_binary_vels_axis_flipped':
> bintraj.f90:(.text+0x2192): undefined reference to
> `__netcdf__nf90_put_var_2d_fourbytereal'
> bintraj.o: In function `__bintraj_mod__write_binary_vels':
> bintraj.f90:(.text+0x2391): undefined reference to
> `__netcdf__nf90_put_var_2d_eightbytereal'
> bintraj.o: In function `__bintraj_mod__write_binary_cell_dat':
> bintraj.f90:(.text+0x25b4): undefined reference to
> `__netcdf__nf90_put_var_1d_eightbytereal'
> bintraj.f90:(.text+0x2735): undefined reference to
> `__netcdf__nf90_put_var_1d_eightbytereal'
> bintraj.o: In function `__bintraj_mod__end_binary_frame':
> bintraj.f90:(.text+0x295b): undefined reference to
> `__netcdf__nf90_put_var_1d_eightbytereal'
> bintraj.f90:(.text+0x297e): undefined reference to `__netcdf__nf90_sync'
> bintraj.f90:(.text+0x2b01): undefined reference to
> `__netcdf__nf90_put_var_1d_eightbytereal'
> bintraj.f90:(.text+0x2b24): undefined reference to `__netcdf__nf90_sync'
> ./cuda/cuda.a(gpu.o): In function `gpu_amrset_':
> gpu.cpp:(.text+0x2438): undefined reference to `curandCreateGenerator'
> gpu.cpp:(.text+0x244e): undefined reference to
> `curandSetPseudoRandomGeneratorSeed'
> ./cuda/cuda.a(kForcesUpdate.o): In function `kRandom':
>
> tmpxft_00006c7e_00000000-4_kForcesUpdate.compute_20.cudafe1.cpp:(.text+0x3b56):
> undefined reference to `curandGenerateNormalDouble'
> collect2: ld returned 1 exit status
> make[2]: *** [pmemd.cuda] Error 1
> make[2]: Leaving directory `/usr/local/lib/amber11/src/pmemd/src'
> make[1]: *** [cuda] Error 2
> make[1]: Leaving directory `/usr/local/lib/amber11/src/pmemd'
> make: *** [cuda] Error 2
>
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber
>



-- 
Jason M. Swails
Quantum Theory Project,
University of Florida
Ph.D. Candidate
352-392-4032
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Wed Dec 28 2011 - 17:00:04 PST
Custom Search