[AMBER] Compiling Amber 12 using IBM XL compilers - fixed versus free format Fortran

From: Ben Roberts <ben.roberts.geek.nz>
Date: Wed, 22 Jan 2014 14:49:10 +1300

Hi all,

I’m trying to compile Amber on a BlueGene using the IBM XL compilers. I get errors such as this one:

xlf -WF,-DBINTRAJ -c -k -O0 -qfixed -qextname -I/hpc/home/bpr22/amber12/include -I/bgp/local/pkg/netcdf/4.1.3parallel/include -o ambpdb.o ambpdb.F90
COMMAND LINE 1520-022 (W) The FREE option has been replaced by the option FREE(F90).
"ambpdb.F90", line 4.0: 1515-005 (S) Continuation line is not permitted at beginning of program or after INCLUDE, EJECT, .PROCESS statements or comment directive. Line is ignored.
"ambpdb.F90", line 8.0: 1515-005 (S) Continuation line is not permitted at beginning of program or after INCLUDE, EJECT, .PROCESS statements or comment directive. Line is ignored.
"ambpdb.F90", line 9.0: 1515-005 (S) Continuation line is not permitted at beginning of program or after INCLUDE, EJECT, .PROCESS statements or comment directive. Line is ignored.

and so on and so forth, including syntax errors.


This seems to be related to the XL compilers’ way of handling different versions of Fortran. If the source were all fixed-format F77 style, it would be easy, and conversely if all free-format F90. It might even be handleable if there were different extensions on the files, so that programmatically we could distinguish one from the other.

As far as I can tell, though, there’s no way in the Amber 12 / AmberTools 13 configure script to say the following:

“If the file is F77 format (or is called <name>.[Ff]77), use this compiler with these flags. If F90, use that compiler with those flags.”

Is there such an option, that I’ve just overlooked? Or an alternative solution, besides, “Don’t use the XL compiler suite”?

I know that about three years ago the idea to rename the source files with standardised extensions was brought up (back when I was an active developer), but came to a standstill after discussion (see http://dev-archive.ambermd.org/201110/0007.html and linked pages). Right now, although I could perhaps with a degree of pain go through the source files and Makefiles and rename them in my local copy, then provide Configure-script logic to deal with the situation, that sounds like a lot of work, and before I embark on it I’d like to know whether anyone else has had better luck with alternative approaches.

Thanks,
Ben

_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Tue Jan 21 2014 - 18:00:02 PST
Custom Search