amber-developers: g95 build of Amber9 sander

From: Scott Brozell <sbrozell.scripps.edu>
Date: Thu, 2 Sep 2004 13:34:32 -0700

Hi,

I have just built Amber9's sander with g95 for linux from
http://g95.sourceforge.net/
Sander contains F90, F77, and probably still some F66.
http://amber.scripps.edu/

In summary, various g95 binaries are available, g95's interaction with
gnu libraries may not be mature, the resulting sander executable passed
the same tests as a sander built with ifort with one exception,
that exception has already probably corrected one bug in sander's
nmrred.f,
and the g95 sander is slow.

Scott Brozell
Scientific Software Consultant

Details:

The platform was bohr:
Linux bohr 2.4.26 #7 SMP Thu Jul 8 10:44:00 PDT 2004 i686 i686 i386
GNU/Linux
Red Hat Linux release 9 (Shrike)
model name : Intel(R) XEON(TM) CPU 2.00GHz
stepping : 4
cpu MHz : 1977.477
cache size : 512 KB

I used the config.h below.
fdate in src/lib/sys.f is in libg2c which is not found by g95 without
specifying -lg2c. Unfortunately, this load flag links getarg from
libg2c instead of g95's libf95 (even if preceded by -lf95 and with
mdfil.o before sys.a) and sander does not read the command line
arguments. Consequently, fdate was commented out (it apparently
is only used by pmemd) and the resulting sander worked fine.

Both ifort and g95 sanders fail two tests:
gb_rna/mdout.gbrna.ln.dif
trx/mdout.trx.cpln.dif
g95 initially complained about the umbrella test:
At line 1331 of file _nmrred.f
Fortran runtime error: Expected CHARACTER for item 1 in formatted
transfer, got
INTEGER
('******',/,1x,a4,'(',i5,')-',a4,'(',i5,')-',a4,'(',i5,')-',
a4,'(',i5,
                ^
  ./Run.umbrella: Program error
And indeed argument name of nmrred was declared integer and its format
specifier was a4. I have committed a bugfix, but it should be verified.

The factor_ix benchmark consumed 3183.5 sec of total time on bohr for
g95 and 1958.2 for ifort without MKL or p4 optimizations.

ifort -V
Intel(R) Fortran Compiler for 32-bit applications, Version 8.0 Build
20031016Z
 Package ID: l_fc_p_8.0.034
Copyright (C) 1985-2003 Intel Corporation. All rights reserved.
FOR NON-COMMERCIAL USE ONLY


# config.h
#=========================================================================
=====
# AMBER Makefile configuration for compiler/architecture: ifort
# Generated via command: configure ifort
#
# Configuration script written mainly by Joe Krahn, Scott Brozell, and
# Dave Case, with contributions from lots of people.
#=========================================================================
=====

#-------------------------------------------------------------------------
-----
# Main AMBER source root directory
#-------------------------------------------------------------------------
-----
AMBER_SRC=/usr/local/srb/9/src

#-------------------------------------------------------------------------
-----
# AMBERBUILDFLAGS provides a hook into the build process for installers;
# for example, to build debug versions of the amber programs
# make -e AMBERBUILDFLAGS="-DDEBUG -g"
#-------------------------------------------------------------------------
-----
AMBERBUILDFLAGS=

#-------------------------------------------------------------------------
-----
# LOCALFLAGS is intended for program specific modifications to the
# Fortran build process and may be modified by the program's local
makefile
#-------------------------------------------------------------------------
-----
LOCALFLAGS=

#-------------------------------------------------------------------------
-----
# Availability and method of delivery of math and optional libraries
#-------------------------------------------------------------------------
-----
USE_BLASLIB=$(SOURCE_COMPILED)
USE_LAPACKLIB=$(SOURCE_COMPILED)
USE_LMODLIB=$(LMOD_UNAVAILABLE)

#-------------------------------------------------------------------------
-----
# C compiler
#-------------------------------------------------------------------------
-----
CC= gcc
CPLUSPLUS=g++
ALTCC=gcc
CFLAGS=-O2 $(AMBERBUILDFLAGS)
ALTCFLAGS= $(AMBERBUILDFLAGS)
CPPFLAGS= $(AMBERBUILDFLAGS)

#-------------------------------------------------------------------------
-----
# Fortran preprocessing and compiler.
# FPPFLAGS holds the main Fortran options, such as whether MPI is used.
#-------------------------------------------------------------------------
-----
FPPFLAGS= -P -I$(AMBER_SRC)/include $(AMBERBUILDFLAGS)
FPP= cpp -traditional $(FPPFLAGS)
FC= g95
FFLAGS= -O0 $(LOCALFLAGS) $(AMBERBUILDFLAGS)
FOPTFLAGS= -O3 $(LOCALFLAGS) $(AMBERBUILDFLAGS)
FPP_PREFIX= _
FREEFORMAT_FLAG= -ffree-form

#-------------------------------------------------------------------------
-----
# Loader:
#-------------------------------------------------------------------------
-----
LOAD= g95 $(LOCALFLAGS) $(AMBERBUILDFLAGS)
LOADCC= gcc $(LOCALFLAGS) $(AMBERBUILDFLAGS)
LOADLIB=
LM= -lm
LOADPTRAJ= g95 -nofor_main $(LOCALFLAGS) $(AMBERBUILDFLAGS)
XHOME= /usr/X11R6

#-------------------------------------------------------------------------
-----
# Other stuff:
#-------------------------------------------------------------------------
-----
.SUFFIXES: .f90
SYSDIR=lib
AR=ar rv
M4=m4
RANLIB=ranlib
SFX=
MAKEDEPEND=$(AMBER_SRC)/../bin/amber_makedepend

# default rules for Fortran and C compilation:

.f.o: $<
        $(FPP) $< > $(FPP_PREFIX)$<
        $(FC) -c $(FFLAGS) -o $. $(FPP_PREFIX)$<

.f90.o: $<
        $(FPP) $< > $(FPP_PREFIX)$<
        $(FC) -c $(FFLAGS) -o $. $(FPP_PREFIX)$<

.c.o:
        $(CC) -c $(CFLAGS) $(CPPFLAGS) -o $. $<
Received on Wed Apr 05 2006 - 23:50:00 PDT
Custom Search