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

From: Daniel Roe <>
Date: Fri, 14 Jan 2011 08:43:19 -0500

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.>
 <You don't have netcdf, stop trying to use it.>
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


AMBER-Developers mailing list
Received on Fri Jan 14 2011 - 06:00:04 PST
Custom Search