Re: [AMBER-Developers] ptraj_comprehensive test

From: Jason Swails <jason.swails.gmail.com>
Date: Fri, 11 Dec 2009 11:49:12 -0500

Hi Ross,

On Fri, Dec 11, 2009 at 11:37 AM, Ross Walker <ross.rosswalker.co.uk> wrote:
> Hi Jason,
>
>> Something about the ptraj_comprehensive test is confusing to me.  How
>> exactly is netcdf presence tested for?  Is NETCDF an environment
>> variable the user is supposed to set if they compiled with netcdf
>> support, or is the Makefile supposed to figure that out by looking at
>> the config.h in the src directory?  At the present, it does not test
>> netcdf by default, even though I have compiled with it (and indeed
>> when I manually set NETCDF="yes" or anything, the tests for netcdf
>> begin and succeed).
>
> The test case should simply look at whether the argument $1 is blank or not.
> This is passed in from the master Makefile_at makefile in the test
> directory:
>
>        cd ptraj_comprehensive && ./Run.comprehensive $(NETCDF)
>
> $(NETCDF) is set inside $AMBERHOME/src/config.h which is included in
> Makefile_at.

I did not think to look for this variable here...

> config.h is also included in Makefile in the test directory which is a real
> pain if you are just building pmemd like I have been and forget to run the
> master amber configure script, but that is another story I hope to address
> by making pmemd part of the master AMBER build.
>
> Thus if you supplied -bintraj as an argument to ./configure - or let it use
> it as the default then inside config.h you should have NETCDF=YES

This is true, however, only for serial builds. For parallel builds,
NETCDF is null and PNETCDF=YES. Thus, for the test.ptraj.MPI, it
should be checking for PNETCDF rather than NETCDF (this was my
problem, as I was running test.ptraj.MPI after building a parallel
system).

> Thus inside Makefile_at the variable NETCDF should = YES and thus the $1
> argument to the ptraj comprehensive run script should not be null and hence
> it should run the netcdf tests.
>
> Is this not what you are seeing?

This is what I was seeing for serial builds. However, I have changed
the Makefile_at to use PNETCDF for test.ptraj.MPI instead of NETCDF
(and committed to CVS). Another option would be to set both NETCDF
and PNETCDF to YES whenever -bintraj (or the default) is chosen,
though I think the fix I suggested is the better route. Ultimately,
this is not a big deal, but worth addressing since it's such a fast,
easy fix.

> Of course things can go wrong if you were to re-run configure without
> bintraj support (to build sander for example) after you built AMBERTools
> with bintraj support.

This is clear now that I know where that environment variable is coming from.

Thanks!
Jason

-- 
---------------------------------------
Jason M. Swails
Quantum Theory Project,
University of Florida
Ph.D. Graduate Student
352-392-4032
_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers
Received on Fri Dec 11 2009 - 09:00:03 PST
Custom Search