Re: [AMBER-Developers] Goals for AMBER code format/style?

From: Joe Krahn <krahn.niehs.nih.gov>
Date: Fri, 27 Mar 2009 16:14:14 +0000

Ross Walker wrote:
> Hi Joe,
>
>>> I'm not sure I understand what you mean here. Do you really want to
>>> *disable* implicit none? what is wrong with it?
>> Oops, the 2nd sentence above is wrong. I meant to say that the compiler
>> flags should set the default implicit to "implicit none".
>
> You can certainly do this and I think everybody would applaud you for doing
> it. My suggestion would be though that if you want to volunteer to do it
> that you get a big pot of coffee since I have tried it several times and
> almost driven myself mad going through some of the old Perlman code that is
> in there. The problem is that you go through and update a chunk of stuff,
> make a mistake making something int instead of real or vice versa and then
> all the test cases fail and you don't know why.
>
> Thus I would suggest doing this one subroutine at a time as and when you
> have time. In fact I would encourage everyone to always update any
> subroutines that don't have implicit none when they come across them. Just
> make sure you run all the test cases since it can be very easy to make a
> mistake and not realize it.
>
> All the best
> Ross
>
>
I have a Perl script that runs ifort with implicit warnings enabled,
parses the warning messages, and auto-generates declaration code. It is
not fully automatic; you have to do one routine at a time, and manually
insert the result into the source.

In about 3 hrs, I was able to convert all code in src/sander to implicit
none, and found some bugs in the process:

relax_mat.f, subroutine remhet: This was using THIRD and SIXTH, but they
were left out of the "use constants" statement, and were undefined.

pupildata.f, deleting_qm_atoms: did not include "md.h", so NSPM, TMASS,
TMASSINV were all undefined implicit vars.

Joe

_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers
Received on Sun Mar 29 2009 - 01:09:11 PDT
Custom Search