Re: [AMBER-Developers] Amber coding standards

From: Joe Krahn <krahn.niehs.nih.gov>
Date: Mon, 30 Mar 2009 17:30:15 +0100

>
> So, where am I going with this...? I see these options:
>
> A) Request gcc.org to implement TR-15581 in gfortran 4.1 and release a
> bug fix as gfortran 4.1.3 .
>
> B) Revert my "fix" and modify AMBER's configure script to reject any
> version of gfortran prior to 4.2.0 .
>
> C) Keep the my current "fix" and allow versions of gfortran prior to
> 4.2.0 .
>

D) Convert them to allocatables, but don't use all allocation subroutine:

< call allint(nphih_new,iph2,jph2,kph2,lph2,icph2)

> allocate(iph2(nphih_new),jph2(nphih_new),kph2(nphih_new), &
> lph2(nphih_new),icph2(nphih_new),stat=statall)
> if ( statall /= 0 ) call allocate_error( &
> "iph2,jph2,kph2,lph2,icph2","get_bonded_params",nphih_new)

This avoids possible pointer aliasing slow-downs or leaks due to
reallocation without deallocation, and does not require TR-15581.

Joe


_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers
Received on Wed Apr 01 2009 - 01:09:07 PDT
Custom Search