Re: [AMBER-Developers] Help with Makefiles for pmemd.cuda

From: Jason Swails <jason.swails.gmail.com>
Date: Thu, 4 Feb 2016 19:48:19 -0500

On Thu, Feb 4, 2016 at 7:07 PM, Ross Walker <ross.rosswalker.co.uk> wrote:

> 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)
>

​configured_cuda does not need to be here.



>
> cuda: configured_cuda cuda_SPFP cuda_DPFP
>

T
​ry either doing "cuda::" (two :s) or renaming this rule. The second :
will label the cuda target as phony (you can also do this with a .PHONY
line just like you used .NOTPARALLEL, I think). Don't forget that cuda is
a directory, and make will check the directory (possibly recursively?) for
any changes. I'm not sure what to expect in this case, but since the cuda
rule is not intended to correspond to the cuda directory in the way make
thinks it should, you should change cuda to a phony target.


-- 
Jason M. Swails
BioMaPS,
Rutgers University
Postdoctoral Researcher
_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers
Received on Thu Feb 04 2016 - 17:00:03 PST
Custom Search