Okay, I tried this whole thing simpler. What I now have is:
$AMBERHOME/Makefile - standard install target, calls src/Makefile
install:
cd AmberTools/src && $(MAKE) install
.(if [ -n "$(BUILDAMBER)" ] ; then \
cd src && $(MAKE) install; \
else \
echo "==============================================================" ;\
echo "$(AMBERHOME)/src/Makefile not found, or -noamber was set." ;\
echo "This is expected if you do not have Amber14." ;\
echo "==============================================================" ;\
fi ;\
)
$AMBERHOME/src/Makefile
install: $(INSTALLTYPE)
cuda: configured_cuda
.echo "Starting installation of ${AMBER} (cuda) at `date`".
cd pmemd && $(MAKE) cuda
#So the install target, calls the cuda target which calls Make cuda under pmemd Makefile
$AMBERHOME/src/pmemd/Makefile
cuda: configured_cuda
$(MAKE) -C src/ cuda
.echo "Installation of pmemd.cuda complete"
#so this just calls make cuda under pmemd/src - although this is the target that echos Installation of pmemd.cuda complete.
$AMBERHOME/src/pmemd/src/Makefile
.NOTPARALLEL: configured_cuda cuda_SPFP cuda_DPFP cuda_SPXP cuda_lib_clean pmemd.cuda_SPFP$(SFX) pmemd.cuda_DPFP$(SFX) pmemd.cuda_SPXP$(SFX)
cuda: configured_cuda cuda_SPFP cuda_DPFP
cuda_SPFP: cuda_lib_clean pmemd.cuda_SPFP$(SFX)
.( \
mv pmemd.cuda_SPFP$(SFX) $(BINDIR)/pmemd.cuda_SPFP$(SFX) ;\
cd $(BINDIR) ; ln -f -s pmemd.cuda_SPFP$(SFX) pmemd.cuda$(SFX);\
)
cuda_DPFP: cuda_lib_clean pmemd.cuda_DPFP$(SFX)
.( \
mv pmemd.cuda_DPFP$(SFX) $(BINDIR)/pmemd.cuda_DPFP$(SFX) ;\
)
pmemd.cuda_SPFP$(SFX): $(OBJS) cuda_spfp_libs $(EMIL)
$(PMEMD_LD) $(PMEMD_FOPTFLAGS) $(PMEMD_CU_DEFINES) $(LDOUT)$. $(OBJS) \
$(PMEMD_CU_LIBS) -L$(LIBDIR) $(NETCDFLIBF) $(LDFLAGS) $(PMEMD_FLIBSF)
pmemd.cuda_DPFP$(SFX): $(OBJS) cuda_dpfp_libs $(EMIL)
$(PMEMD_LD) $(PMEMD_FOPTFLAGS) $(PMEMD_CU_DEFINES) $(LDOUT)$. $(OBJS) \
$(PMEMD_CU_LIBS) -L$(LIBDIR) $(NETCDFLIBF) $(LDFLAGS) $(PMEMD_FLIBSF)
cuda_lib_clean:
$(MAKE) -C ./cuda clean
This to me looks like it should work fine. The pmemd Makefile calls Make cuda for pmemd/src/Makefile - this target then calls cuda_SPFP and cuda_DPFP
The cuda_SPFP target should then call cuda_lib_clean and then pmemd.cuda_SPFP and move the executable and create a link to pmemd.cuda. Then the cuda_DPFP target should be called and again call cuda_lib_clean and then pmemd.cuda_DPFP.
However...
cd $AMBERHOME
make distclean
./configure -cuda gnu
make install
#So a serial build...
cd AmberTools/src && /Library/Developer/CommandLineTools/usr/bin/make install
AmberTools14 has no CUDA-enabled components
(cd ../../src && /Library/Developer/CommandLineTools/usr/bin/make cuda )
Starting installation of Amber14 (cuda) at Thu Feb 4 15:54:32 PST 2016.
cd pmemd && /Library/Developer/CommandLineTools/usr/bin/make cuda
/Library/Developer/CommandLineTools/usr/bin/make -C src/ cuda
/Library/Developer/CommandLineTools/usr/bin/make -C ./cuda clean
rm -f *.o *.linkinfo cuda.a *.mod
gfortran -DBINTRAJ -DEMIL -DPUBFFT -O3 -mtune=native -DCUDA -I/Users/rcw/Desktop/amber_master/include -c gbl_constants.F90
...
#starts out okay.
...
gfortran -DBINTRAJ -DEMIL -DPUBFFT -O3 -mtune=native -DCUDA -I/Users/rcw/Desktop/amber_master/include -c charmm_gold.F90
/Library/Developer/CommandLineTools/usr/bin/make -C ./cuda PREC_MODEL=-Duse_SPFP
gfortran -DBINTRAJ -DEMIL -DPUBFFT -Duse_SPFP -O3 -mtune=native -DCUDA -I/Developer/NVIDIA/CUDA-7.5/include -IB40C -c cuda_info.F90
gcc -Duse_SPFP -O3 -mtune=native -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DBINTRAJ -DCUDA -I/Developer/NVIDIA/CUDA-7.5/include -IB40C -c gpu.cpp
...
#looks good at this point
...
#but then
ranlib /Users/rcw/Desktop/amber_master/lib/libemil.a
gfortran -O3 -mtune=native -DCUDA -o pmemd.cuda_SPFP gbl_constants.o gbl_datatypes.o state_info.o file_io_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 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 AmberNetcdf.o bintraj.o binrestart.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 findmask.o remd.o multipmemd.o remd_exchg.o
amd.o gamd.o ti.o gbsa.o barostats.o scaledMD.o constantph.o energy_records.o constantph_dat.o relaxmd.o sgld.o emap.o \
./cuda/cuda.a -L/Developer/NVIDIA/CUDA-7.5/lib64 -L/Developer/NVIDIA/CUDA-7.5/lib -lcurand -lcufft -lcudart -lstdc++ -L/Users/rcw/Desktop/amber_master/lib /Users/rcw/Desktop/amber_master/lib/libnetcdff.a /Users/rcw/Desktop/amber_master/lib/libnetcdf.a /Users/rcw/Desktop/amber_master/lib/libemil.a -lstdc++
ld: warning: directory not found for option '-L/Developer/NVIDIA/CUDA-7.5/lib64'
#Okay good but then it just soldiers into the DPFP build without running the clean...
/Library/Developer/CommandLineTools/usr/bin/make -C ./cuda PREC_MODEL=-Duse_DPFP
make[5]: `cuda.a' is up to date.
gfortran -O3 -mtune=native -DCUDA -o pmemd.cuda_DPFP gbl_constants.o gbl_datatypes.o state_info.o file_io_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 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 AmberNetcdf.o bintraj.o binrestart.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 findmask.o remd.o multipmemd.o remd_exchg.o
amd.o gamd.o ti.o gbsa.o barostats.o scaledMD.o constantph.o energy_records.o constantph_dat.o relaxmd.o sgld.o emap.o \
./cuda/cuda.a -L/Developer/NVIDIA/CUDA-7.5/lib64 -L/Developer/NVIDIA/CUDA-7.5/lib -lcurand -lcufft -lcudart -lstdc++ -L/Users/rcw/Desktop/amber_master/lib /Users/rcw/Desktop/amber_master/lib/libnetcdff.a /Users/rcw/Desktop/amber_master/lib/libnetcdf.a /Users/rcw/Desktop/amber_master/lib/libemil.a -lstdc++
ld: warning: directory not found for option '-L/Developer/NVIDIA/CUDA-7.5/lib64'
Installation of pmemd.cuda complete
#An of course reports cuda.a as being up to date and builds the SPFP version labelled as DPFP.
#Then. After stating Installation of pmemd.cuda is complete - which can ONLY come from $AMBERHOME/src/pmemd/Makefile it proceeds to build everything again... ARGGHH!!! WTF???
Starting installation of Amber14 (cuda) at Thu Feb 4 16:01:13 PST 2016.
cd pmemd && /Library/Developer/CommandLineTools/usr/bin/make cuda
/Library/Developer/CommandLineTools/usr/bin/make -C src/ cuda
/Library/Developer/CommandLineTools/usr/bin/make -C ./cuda clean
rm -f *.o *.linkinfo cuda.a *.mod
/Library/Developer/CommandLineTools/usr/bin/make -C ./cuda PREC_MODEL=-Duse_SPFP
gfortran -DBINTRAJ -DEMIL -DPUBFFT -Duse_SPFP -O3 -mtune=native -DCUDA -I/Developer/NVIDIA/CUDA-7.5/include -IB40C -c cuda_info.F90
gcc -Duse_SPFP -O3 -mtune=native -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DBINTRAJ -DCUDA -I/Developer/NVIDIA/CUDA-7.5/include -IB40C -c gpu.cpp
...
...
WHY? What on earth is going on here!!!???
All the best
Ross
/\
\/
|\oss Walker
---------------------------------------------------------
| Associate Research Professor |
| San Diego Supercomputer Center |
| Adjunct Associate Professor |
| Dept. of Chemistry and Biochemistry |
| University of California San Diego |
| NVIDIA Fellow |
|
http://www.rosswalker.co.uk <
http://www.rosswalker.co.uk/> |
http://www.wmd-lab.org <
http://www.wmd-lab.org/> |
| Tel: +1 858 822 0854 | EMail:- ross.rosswalker.co.uk <mailto:ross.rosswalker.co.uk> |
---------------------------------------------------------
Note: Electronic Mail is not secure, has no guarantee of delivery, may not be read every day, and should not be used for urgent or sensitive issues.
_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers
Received on Thu Feb 04 2016 - 16:30:03 PST