Subject: Re: CCL:compile gaussian98 for Redhat 7.1 with pgf77

From: Brian Salter-Duke <[email-masked]>
Date: Mon, 9 Jul 2001 10:47:32 +0930

There have been several requests for information on compiling G98 on
Redhat 7.1 linux. I think all the answers have already been posted, but
here is a summary, followed by some questions:-

Add:-

#include <time.h>

in g98/bsd/mdutil.c after

#ifdef i386
#include <unistd.h>
#include <errno.h>

Alter these sections of i386.make, under the heading:-

# Exceptional link commands:

l402.exe: $(EXTRAS) l402.a
        $(RUNFSP) -e m$* $(BSDDIR)/main.F
        $(RUNMAKE) $(MAKELOC) OPTFLAG='$(OPTFLAG)' $(EXTRAS) $*.a m$*.o
        cp l402.a l402_save.a
        ar x l402.a bd0402.o
        ar d l402.a bd0402.o
        $(RUNF77) $(FFLAGS) -o $*.exe m$*.o $(EXTOBJ) $*.a bd0402.o \
            $(EXTRAS) $(GAULIB) $(LIBS)
        rm -f m$*.* bd0402.o
        mv l402_save.a l402.a

l609.exe: $(EXTRAS) l609.a
        $(RUNFSP) -e m$* $(BSDDIR)/main.F
        $(RUNMAKE) $(MAKELOC) OPTFLAG='$(OPTFLAG)' $(EXTRAS) $*.a m$*.o
        cp l609.a l609_save.a
        ar x l609.a bd0609.o
        ar d l609.a bd0609.o
        $(RUNF77) $(FFLAGS) -o $*.exe m$*.o $(EXTOBJ) $*.a bd0609.o \
            $(EXTRAS) $(GAULIB) $(LIBS)
        rm -f m$*.* bd0609.o
        mv l609_save.a l609.a

I have a few questions. The following flags are used:-

UNROLL = -Munroll
VECTOR = -Mvect=cachesize:524288
MACH = -tp p6

giving:-

pgf77    -O2 -tp p6  -Munroll -Mvect=cachesize:524288

'-tp p6' should be unnecessary as the compiler is supposed to select the
correct flag for the machine you are running on. 

Does -Munroll improve performance?

What does -Mvect=cachesize:524288 do? I used it for compiling Gamess(US)
and I got several errors including a total failure in a AM1 test. Would
altering the number help?

Would any other flags improve performance?

For Gamess(US), I tried '-fast' or its equivalent '-O2 -Munroll
-Munframe'. The results are a disaster - wrong energies, no SCF
convergence, etc. '-Munroll' is the problem.

Cheers, Brian.
-- 
Associate Professor Brian Salter-Duke (Brian Duke) [email-masked]  
Chemistry, School of BECS, SITE, NT University, Darwin, NT 0909, Australia.
Phone 08-89466702.     Fax 08-89466847.     http://www.smps.ntu.edu.au/