Re: [AMBER] separate build and install dirs?

From: Michael Sternberg <sternberg.anl.gov>
Date: Wed, 9 Nov 2011 11:31:02 -0600

On Nov 7, 2011, at 17:18 , Ben Roberts wrote:
> On 7/11/2011, at 6:01 p.m., Michael Sternberg wrote:
>> I am new to Amber and am struck by the rather non-canonical install procedure.
>
> If it's any comfort to you, you aren't the first to be bewildered by Amber's installation procedure. I believe the reasons why it's this way are chiefly historical - Amber is a complicated package that arose before install procedures from source became standardised.

Thanks Ben!

OK the reasons are evident, from the history and the complexity of the packages included. Given the lemons life handed here, I do like the lemonade of the rather straightforward Makefiles.


Speaking of which - I noted a few instances where "LOCALFLAGS = $(FREEFORMAT_FLAG)" was set but is was not actually passed on to the Fortran compiler because there were rule overrides either in the Makefile or in ./depend. This was on the following platform:

$ cat /etc/redhat-release
CentOS release 5.6 (Final)

$ gmake --version
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.

$ ifort --version
ifort (IFORT) 11.1 20100806
Copyright (C) 1985-2010 Intel Corporation. All rights reserved.


I attach a patch below which I found necessary for a successful compilation.



>> Is there a way to coax Amber into this pattern or am I bumping against the old-school assumptions? For one thing, the auxiliary python gets hardwired with the source tree location.
>
> As far as I know, if you want multiple different builds of Amber to coexist on the same system, you'll need corresponding copies of the source tree. Alternatively, you could perhaps achieve the same goal by renaming your binaries (in $AMBERHOME/bin), running "make clean" and rebuilding with a different set of options; but I can't say for sure that that approach will work, and it certainly seems like a lot of trouble to go to.

Getting the hang of it. I wrote my install script to construct, in my normal build location, pristine Amber source trees as unpacked and patched, respectively. I consider these the "installable" files and rsync them into the install dir for compilation there. Afterwards, src/, test/, and benchmarks/ dirs can be removed from there.


Best,
Michael



--- amber11/src/sander/Makefile.orig 2011-11-08 21:47:52.000000000 -0600
+++ amber11/src/sander/Makefile 2011-11-09 00:13:40.000000000 -0600
.. -26,7 +26,15 ..
 PARALLEL_TOKEN=DMPI
 
 # Sander Fortran source files are free format
-LOCALFLAGS = $(FREEFORMAT_FLAG)
+#LOCALFLAGS = $(FREEFORMAT_FLAG)
+#
+# The above does not work since ./depend stipulates to compile in one of two
+# ways:
+# $(FC) -c $(FOPTFLAGS) -o $. _state.f
+# $(FC) -c $(FFLAGS) -o $. _memory_module.f
+# stern, 2011-11-07
+FFLAGS += $(FREEFORMAT_FLAG)
+FOPTFLAGS += $(FREEFORMAT_FLAG)
 
 SHELL=/bin/sh
 VPATH=
--- amber11/src/nmode/Makefile.orig 2010-04-26 07:21:23.000000000 -0500
+++ amber11/src/nmode/Makefile 2011-11-09 00:12:32.000000000 -0600
.. -22,7 +22,12 ..
 include ../config.h
 
 # Nmode Fortran source files are free format
-LOCALFLAGS = $(FREEFORMAT_FLAG)
+#LOCALFLAGS = $(FREEFORMAT_FLAG)
+# The above does not work because of (a) the suffix rule and (b) the exceptions
+# for some objects. Apply same fix as in ../sander/.
+# stern, 2011-11-07
+FFLAGS += $(FREEFORMAT_FLAG)
+FOPTFLAGS += $(FREEFORMAT_FLAG)
 
 # NMODE is always double precision
 
--- amber11/src/pmemd/src/Makefile.orig 2011-08-17 11:19:09.000000000 -0500
+++ amber11/src/pmemd/src/Makefile 2011-11-09 00:29:25.000000000 -0600
.. -29,6 +29,8 ..
 
 # Platform-specific info should be found in ../../config.h
 include $(CONFIG_FILE)
+# forgotten in config.h (?) stern, 2011-11-09
+PMEMD_NETCDFLIB = $(NETCDFLIB)
 
 OBJS= gbl_constants$(OSFX) gbl_datatypes$(OSFX) state_info$(OSFX) file_io_dat$(OSFX) \
         mdin_ctrl_dat$(OSFX) mdin_ewald_dat$(OSFX) mdin_debugf_dat$(OSFX) prmtop_dat$(OSFX) \



_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Wed Nov 09 2011 - 10:00:03 PST
Custom Search