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

From: Jason Swails <>
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,

On Fri, Jan 14, 2011 at 8:43 AM, Daniel Roe <> 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

Jason M. Swails
Quantum Theory Project,
University of Florida
Ph.D. Graduate Student
AMBER-Developers mailing list
Received on Fri Jan 14 2011 - 06:00:07 PST
Custom Search