Re: [AMBER-Developers] sander/getcor.f

From: Jason Swails <jason.swails.gmail.com>
Date: Fri, 14 Jan 2011 08:57:46 -0500

That makes a lot more sense. The changing lengths, while it should probably
still be avoided, has been done in the past and hasn't caused this kind of
headache. -nobintraj seems to be a poorly tested option...

All the best,
Jason

On Fri, Jan 14, 2011 at 8:43 AM, Daniel Roe <daniel.r.roe.gmail.com> wrote:

> OK, so the actual issue with getcor() and read_nc_restart() had to do
> with the placement of #ifdefs and the way fortran likes to declare
> variables. Previously the code had looked something like this:
>
> subroutine netcdf_routine(filename)
> #ifdef BINTRAJ
> character(len=*), intent(in) :: filename
>
> <Do some netcdf stuff.>
> #else
> <You don't have netcdf, stop trying to use it.>
> #endif
> end subroutine netcdf_routine
>
> The problem here is that when BINTRAJ is not specified the subroutine
> loses the specific definition of the filename variable and the
> compiler defaults to something which may or may not match the actual
> variable. Oops.
>
> I've fixed all the #ifdefs so that if a subroutine is declared it
> retains all variables that are part of the subroutine call no matter
> what.
>
> -Dan
>
> _______________________________________________
> AMBER-Developers mailing list
> AMBER-Developers.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber-developers
>



-- 
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 Jan 14 2011 - 06:00:07 PST
Custom Search