Hi,
On Tue, Jul 14, 2009 at 11:53:04AM -0400, Daniel Roe wrote:
> Hi Ben,
>
> I think that the MPI def you are referring to is on line 670 in sander.f,
> after the 'masterwork'. The confusion stems from all of the nested ifdefs
> that are in-between that and the endif you refer to. Does anyone else know
> why there are nested ifdef MPIs? My assumption is they are leftover from a
> code reorganization or something.
I doubt your last sentence, and i believe they are due to programmers
that did not read the file before modifying it.
The style that we've used is to indent preprocessor statements like this:
#ifdef MPI
# include "parallel.h"
# include "mpif.h"
# ifdef LES
_REAL_ :: fbead(3,natomCL), xbead(3,natomCL)
integer :: mm, n
# endif
_REAL_ mpitmp(8) !Use for temporary packing of mpi messages.
integer ist(MPI_STATUS_SIZE), partner, ierr
#endif
ie, the # must be in column 1 and indentation is used.
This example is from runmd.f; sander.f is so screwed up on this point
that it is not a useful template.
The golden rule on style is to follow the existing style.
Unfortunately, a consistent style state no longer exists.
Someone could look at the tools in amber11/tools to see if we have one
for this. One issue is doubly nested preprocessor statements:
how exactly should it be indented; a few minutes of grepping showed
inconsistencies.
If you cannot find a style plurality here then make a rule and
advertise it.
thanks,
Scott
> -Dan
>
> On Tue, Jul 14, 2009 at 11:22 AM, Ben Roberts <roberts.qtp.ufl.edu> wrote:
>
> > Hi,
> >
> > Perhaps someone can help me here - I was going through sander.f for an
> > unrelated purpose, and discovered an #else and an #endif /* MPI */ on lines
> > 994 and 1003 respectively. But I can't see the opening #ifdef for these;
> > further up, the immediately previous pre-processor statement is an #endif /*
> > MPI */ on line 910. Can anyone tell me what the implications of no #ifdef
> > corresponding to the first-mentioned statements are, whether I should put
> > such an #ifdef in, and where it should go if it's needed?
> >
> > Thanks,
> > Ben
> >
> > --
> > Benjamin P. Roberts
> > Postdoctoral Research Associate
> > Quantum Theory Project
> > University of Florida
> >
> > 2301 New Physics Building #92
> > PO Box 118435
> > Gainesville FL 32611-8435
> > USA
> >
> > Phone: +1 352 392 6712
> > Cell: +1 352 222 3677
> >
> > Member of the Royal Australian Chemical Institute
> > and of the American Chemical Society
> >
> >
> > _______________________________________________
> > AMBER-Developers mailing list
> > AMBER-Developers.ambermd.org
> > http://lists.ambermd.org/mailman/listinfo/amber-developers
> >
>
>
>
> --
> Daniel R. Roe, Ph.D.
> Research Chemist
> National Institute of Standards and Technology
> 100 Bureau Drive, Stop 8443
> Gaithersburg, MD 20899-8443
> (301) 975-8741
> _______________________________________________
> AMBER-Developers mailing list
> AMBER-Developers.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber-developers
_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers
Received on Tue Jul 14 2009 - 18:07:42 PDT