Subject: Compiling g98 A11 with ATLAS:Summary

From: "Georg Schmeer" <[email-masked]>
Date: Fri, 3 May 2002 22:14:58 +0200

Dear all,
thanks to Malcolm Gillies, Dr. Peter Burger, and Philipp Matz for 
their answers concerning my problems with gaussian98 compiling.
My original mail from Friday, May 2 2002 was:
***********
Dear G98-users,
I need some help for the compiling of gaussian98 Rev.A11.
I got Gaussian98 Rev.A11 from Gaussian,Inc on one CD containing two 
directories. One directory contains the gaussian98 Rev.A11 tar file 
and the other the tar file of the ATLAS-linear algebra system and 
also blas- and f77blas-libraries for IBM AIX-Systems. After 
dearchiving the two tar-files I compiled the ATLAS-library according 
to the appropriate instructions on a Pentium III processor under Suse-
LINUX 7.2. The compilers are gcc and PGF90. After a rather long time 
the compilation finished without error messages and produced 7 
libraries in the directory ATLAS/lib/Linux_PIIISSE1_2:
libatlas.a
libcblas.a
libf77blas.a
liblapack.a
libptcblas.a
libptf77blas.a
libtstatlas.a

In order to compile g98 I copied these libraries in the directory 
$g98root/g98/lib and made the following modifications in the file 
g98.make:
BLAS = $g98root/g98/lib/libatlas.a \
       $g98root/g98/lib/libcblas.a \
       $g98root/g98/lib/libf77blas.a \
       $g98root/g98/lib/liblapack.a \
       $g98root/g98/lib/libptcblas.a \
       $g98root/g98/lib/libptf77blas.a \
       $g98root/g98/lib/libtstatlas.a 
The compilation of g98 via "bsd/bldg98 >& bldg98.log &" stops shortly 
before the end with the following lines in bldg98.log:
>.
>.
if ( 1 ) then
>.
>.
make[1]: Leaving directory `&g98root/g98´
pgf90    -O2 -tp p6 -Munroll -Mvect=cachesize:524288 -o g98 ml0.o     
     util.so
util.so: undefined reference to `atl_f77wrap_dspmv_´
util.so: undefined reference to `atl_f77wrap_dgemm_´
make: *** [g98] Error 1
endif

The error message is the same when compiling with pgf77.
In the directory ATLAS/interfaces/blas/F77/src/f77wrap I found the 
generic routines atl_F77wrap_gemm.c and atl_F77wrap_spmv.c but no 
hint for the double-precison routines respectively.
The Gaussian 98 Release Notes Revisions A.11.2 and A.11.3 give  
instructions for Fortran Compiler and Libraries for Building the 
Intel Linux Version on page 14, these instructions are useless, 
however, since the appropriate libraries are lacking.
Therefore any help to locate the error which I made, would be 
appreciated.
Is there any people familiar with compiling of gaussian98 together 
with ATLAS?
********************

But all answers are not really valuable to solve my problem and by 
accident I found the solution, outlined in the following:

1. Instead of atlas3.2.1.tar.gz I downloaded atlas3.3.15.tar.gz.
   After 
gunzip atlas3.3.15.tar.gz     and 
tar -xvf atlas3.3.15.tar 
   making a directory ATLAS with several files and subdirectories
   the compiling procedure is the following in the directory ATLAS/
   according to INSTALL.txt:
2. make
   answer to all questions with the default values until
> use express setup?
3. answer with n
   and then answer to all questions with the default values until
> Enter f77 compiler [/usr/bin/g77]:
   Here the appropriate Fortran-compiler with complete path must be   
   given ( In my case it is PGF77 or PGF90 with the appropriate path)
   The resulting questions can be replied by the default values.
4. the command
   make install arch=<arch> may take some hours. 
   It produces 7 libraries in the directory ATLAS/<arch>/lib/
5. The libraries are copied into g98root/lib/ and
 
6. in g98root/g98/bsd/g98.make the lines 51 and 52 are commented and  
   then the following line is inserted
BLAS = $g98root/g98/lib/libstsatlas.a \
       $g98root/g98/lib/libf77blas.a \
       $g98root/g98/lib/libcblas.a \
       $g98root/g98/lib/liblatlas.a \
       $g98root/g98/lib/libptcblas.a \
       $g98root/g98/lib/libptf77blas.a 
7. After setting g98root and making sure that the appropriate         
   pgi-compiler is available start the g98-compilation in the    
directory g98root/g98:
8. bsd/bldg98 >& bldg98.log & 
   The compilation worked well until the end without error messages.

A test-run with test429.com (to find in the subdirectory 
g98root(g98/tests/com/) yields the following results:

Gaussian98 Rev.A.11 with ATLAS-routines         Job CPU time: 
  2 minutes and 42.8 seconds 
Gaussian98 Rev.A.11 with standard BLAS-routine  Job CPU time: 
 11 minutes and 59.7 seconds

The difference in time is remarkable but naturally one test is not 
enough to calculate a mean gain in computer time.
Obviously there is a problem in the release 3.2.1 of atlas, which is 
provided as stable version, whereas the release 3.3.15 is marked as 
unstable developper version. However this version seems to give good 
and reliable results in conjunction with gaussian98.
I hope this information can also help other users of gaussian98 even 
with lower releases than A.11.

Sincerely yours

Georg Schmeer 

Prof. Dr. Georg Schmeer
Institut fuer Physikalische und Theoretische Chemie
Universitaet Regensburg
D-93040 Regensburg
[email-masked]
Tel: 0941-943-4745
Fax: 0941-943-1690