[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: portability



Hi John,

> Zabinsky took great care to keep the non-standard extensions
> in FEFF to a tolerable minimum: e.g., from the FEFF6 doc: "FEFF
> is written in ANSI FORTRAN 77, with the non-standard extension
> of double precision complex (complex*16) variables." Thus, the
> distributed code never had include files, nor end of line
> comments; they were allowed only for development purposes. I
> have tried to insist on keeping Steve's standards in subsequent
> developments of the code, and they have served us well.

What is "a tolerable minimum"?  It seems that complex*16 is required
and include files and end-of-line comments are not tolerated.  Why?
Zabinsky wrote that in (or before) 1993, before g77 was stable or
included with gcc.  So, how long will this definition be valid?

Why are there different 'developers' and 'distributed' versions?

> In my view portability concerns override strict adherence to the
> "standard," so as compilers improve past restrictions can be
> eliminated.  Only a year or so ago, we did release an
> experimental beta-version of feff8x with the include file dim.h,
> and quickly got complaints from a few users with compilers that
> didn't tolerate it. There is also a great temptation to use
> architecture specific utilities, but in my view this should be
> discouraged in view of the extra effort required to debug
> eventual problems. Thus I think it's preferable for everyone to
> work with the same set of codes.

Hmmm, not sure what you mean by 'architecture specific utilities'.
One might interpret that as wanting to avoid code that is sensitive
to the machine specifics like how many processor are available in a
machine.  Is that what you meant?

> In future developments of the code and derivatives (e.g., for
> components of a solid state toolkit) these portability concerns
> will continue to be important. Thus as a goal, I think it is
> desirable to be able to have build and compile Makefiles that
> are portable,

Makefiles are not portable.  Make is a Unix program, and assumes a
Unix-like development environment, and does not address portability
between different Unixes. Configure addresses portability between
different Unixes, but may not help with VMS, OS2, Amiga, Win32 or
Mac (unless you count CYGWIN and Mac OS X).

If portability is the main goal, and the ANSI F77 standard the only
route to that end, then you may want to abandon make and provide
compilation instructions for every machine or expect the user to
know how to use their Fortran compiler (and assume they have one!).
Then the code would be portable just like Feff6.  <wink>.

I think portability is a poorly defined and overemphasized goal.
Feff should work on all Unix-like systems, and ports to Win32, Mac
and VMS should be straightforward (and should DEFINITELY use
OS-specific code to avoid the ridiculous 'standard F77' behavior
that currently has to be tolerated on Macs).  I would not assume
that getting Feff to work on CP/M, AS/400, VxWorks, PalmOS, or
Playstation2 is a priority, but I've been wrong before.

--Matt

|= Matthew Newville        email: newville@cars.uchicago.edu
|= GSECARS, Bldg 434A      voice: (630) 252-0431
|= Argonne Natl Lab        fax:   (630) 252-0443
|= 9700 South Cass Ave     http://cars.uchicago.edu/~newville/
|= Argonne, IL 60439 USA