Re: [AMBER] Trouble compiling cuda, need help.

From: Jonathan Gough <jonathan.d.gough.gmail.com>
Date: Wed, 30 May 2012 14:27:08 -0400

Thanks David....

So if I understand what your saying this:

NVCC=$(CUDA_HOME)/bin/nvcc -use_fast_math -O3 -gencode
arch=compute_13,code=sm_13 -gencode arch=compute_20,code=sm_20
PMEMD_CU_INCLUDES=-I$(CUDA_HOME)/include -IB40C -IB40C/KernelCommon
PMEMD_CU_LIBS=-L$(CUDA_HOME)/lib64 -L$(CUDA_HOME)/lib -lcurand -lcufft
-lcudart ./cuda/cuda.a
PMEMD_CU_DEFINES=-DCUDA


Will be made to look like this:

PMEMD_CU_LIBS=-L$(CUDA_HOME)/lib64 -L$(CUDA_HOME)/lib -lcurand -lcufft
-lcudart ./cuda/cuda.aNVCC=$(CUDA_HOME)/bin/nvcc -use_fast_math -O3
-gencode arch=compute_13,code=sm_13 -gencode arch=compute_20,code=sm_20
PMEMD_CU_INCLUDES=-I$(CUDA_HOME)/include -IB40C -IB40C/KernelCommon
PMEMD_CU_DEFINES=-DCUDA

If so, that did not work..... stink.

On Wed, May 30, 2012 at 2:09 PM, David A Case <case.biomaps.rutgers.edu>wrote:

> On Wed, May 30, 2012, Jonathan Gough wrote:
> >
> > jonathan.jonathan-M-601A:~$ echo $LD_LIBRARY_PATH
> > /usr/local/cuda/lib64:/usr/local/cuda/lib:
>
> (Others can correct me, but I don't think LD_LIBRARY_PATH is relevant
> here.)
>
> One thing that looks suspicious is the weird order of linking: (from the
> log file):
>
> gfortran -O3 -mtune=native -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 nbips.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
> 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 \
> -L/usr/local/cuda/lib64 -L/usr/local/cuda/lib -lcurand -lcufft
> -lcudart
> ./cuda/cuda.a -L/home/jonathan/amber12/lib -L/home/jonathan/amber12/lib
> -lnetcdf
>
> For machines that link based on order, it may be that the ./cuda/cuda.a
> reference should come *before* the cuda libs, not after them. Try
> editing the PMEMD_CU_LIBS variable in your config.h file to but the
> "./cuda/cuda.a" part first rather than last.
>
> No guarantees at all, but it's a simple thing to try, and might help.
>
> ....dac
>
>
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber
>
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Wed May 30 2012 - 11:30:04 PDT
Custom Search