Beginner: Trouble setting up LAPACK & BLAS with pgf90

Post here if you have having problem using the Makefile build process.

Beginner: Trouble setting up LAPACK & BLAS with pgf90

Postby -TOPE- » Wed Jul 11, 2012 4:37 pm

Hello to who ever is reading this :)

I am having trouble with getting LAPACK and BLAS to work. I have tried my best to search around the interweb for step by step install that I could tweak for my own. However, I am new to this install/building process with make files.

If this question is handled in an existing post i must have missed it or been to naive to understand what it was i was reading. If this is the case please let me know.

To start, I believe that I must create a make file specifically for the pgf90 compiler. So... next step model one of the make.inc.* files?

####################################################################
# LAPACK make include file. #
# LAPACK, Version 3.4.0 #
# November 2011 #
####################################################################
#
SHELL = /bin/sh
#
# Modify the FORTRAN and OPTS definitions to refer to the
# compiler and desired compiler options for your machine. NOOPT
# refers to the compiler options desired when NO OPTIMIZATION is
# selected. Define LOADER and LOADOPTS to refer to the loader and
# desired load options for your machine.
#
FORTRAN = gfortran
OPTS = -O2
DRVOPTS = $(OPTS)
NOOPT = -O0
LOADER = gfortran
LOADOPTS =
#
# Timer for the SECOND and DSECND routines
#
# Default : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME
#TIMER = EXT_ETIME
# For RS6K : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME_
# TIMER = EXT_ETIME_
# For gfortran compiler: SECOND and DSECND will use a call to the INTERNAL FUNCTION ETIME
TIMER = INT_ETIME
# If your Fortran compiler does not provide etime (like Nag Fortran Compiler, etc...)
# SECOND and DSECND will use a call to the INTERNAL FUNCTION CPU_TIME
# TIMER = INT_CPU_TIME
# If neither of this works...you can use the NONE value... In that case, SECOND and DSECND will always return 0
# TIMER = NONE
#
# The archiver and the flag(s) to use when building archive (library)
# If you system has no ranlib, set RANLIB = echo.
#
ARCH = ar
ARCHFLAGS= cr
RANLIB = ranlib
#
# Location of the extended-precision BLAS (XBLAS) Fortran library
# used for building and testing extended-precision routines. The
# relevant routines will be compiled and XBLAS will be linked only if
# USEXBLAS is defined.
#
# USEXBLAS = Yes
XBLASLIB =
# XBLASLIB = -lxblas
#
# The location of the libraries to which you will link. (The
# machine-specific, optimized BLAS library should be used whenever
# possible.)
#
BLASLIB = ../../librefblas.a
LAPACKLIB = liblapack.a
TMGLIB = libtmglib.a

I am not sure what I should change and or not change with respect to the pgf90 compiler. I have searched around for a knowledge base to answer these questions as well, but alas I have not been succesful.

Any help will be appreciated greatly :)
-TOPE-
 
Posts: 2
Joined: Wed Jul 11, 2012 3:59 pm

Re: Beginner: Trouble setting up LAPACK & BLAS with pgf90

Postby admin » Wed Jul 11, 2012 4:44 pm

Hey,
did you try the make.inc.pghpf that is in the INSTALL directory?
Julie
admin
Site Admin
 
Posts: 504
Joined: Wed Dec 08, 2004 7:07 pm

Re: Beginner: Trouble setting up LAPACK & BLAS with pgf90

Postby -TOPE- » Wed Jul 11, 2012 5:08 pm

Yes i tried that while following your instructions from this post:
How to Copy and edit the file LAPACK/make.inc.example, viewtopic.php?f=7&t=3025

I recevied several errors and this the complete result, starting with your first instruction:

kjswanson@quicksilver:~/Documents/Modules/PreMade/lapack-3.4.0> cp make.inc.pghpf make.inc
kjswanson@quicksilver:~/Documents/Modules/PreMade/lapack-3.4.0> make blaslib
( cd BLAS/SRC; make )
make[1]: Entering directory `/home/kjswanson/Documents/Modules/PreMade/lapack-3.4.0/BLAS/SRC'
pghpf -O4 -Mnohpfc -Mdclchk -c isamax.f -o isamax.o
pghpf -O4 -Mnohpfc -Mdclchk -c sasum.f -o sasum.o
pghpf -O4 -Mnohpfc -Mdclchk -c saxpy.f -o saxpy.o
pghpf -O4 -Mnohpfc -Mdclchk -c scopy.f -o scopy.o
pghpf -O4 -Mnohpfc -Mdclchk -c sdot.f -o sdot.o
pghpf -O4 -Mnohpfc -Mdclchk -c snrm2.f -o snrm2.o
pghpf -O4 -Mnohpfc -Mdclchk -c srot.f -o srot.o
pghpf -O4 -Mnohpfc -Mdclchk -c srotg.f -o srotg.o
pghpf -O4 -Mnohpfc -Mdclchk -c sscal.f -o sscal.o
pghpf -O4 -Mnohpfc -Mdclchk -c sswap.f -o sswap.o
pghpf -O4 -Mnohpfc -Mdclchk -c sdsdot.f -o sdsdot.o
pghpf -O4 -Mnohpfc -Mdclchk -c srotmg.f -o srotmg.o
pghpf -O4 -Mnohpfc -Mdclchk -c srotm.f -o srotm.o
pghpf -O4 -Mnohpfc -Mdclchk -c sgemv.f -o sgemv.o
pghpf -O4 -Mnohpfc -Mdclchk -c sgbmv.f -o sgbmv.o
pghpf -O4 -Mnohpfc -Mdclchk -c ssymv.f -o ssymv.o
pghpf -O4 -Mnohpfc -Mdclchk -c ssbmv.f -o ssbmv.o
pghpf -O4 -Mnohpfc -Mdclchk -c sspmv.f -o sspmv.o
pghpf -O4 -Mnohpfc -Mdclchk -c strmv.f -o strmv.o
pghpf -O4 -Mnohpfc -Mdclchk -c stbmv.f -o stbmv.o
pghpf -O4 -Mnohpfc -Mdclchk -c stpmv.f -o stpmv.o
pghpf -O4 -Mnohpfc -Mdclchk -c strsv.f -o strsv.o
pghpf -O4 -Mnohpfc -Mdclchk -c stbsv.f -o stbsv.o
pghpf -O4 -Mnohpfc -Mdclchk -c stpsv.f -o stpsv.o
pghpf -O4 -Mnohpfc -Mdclchk -c sger.f -o sger.o
pghpf -O4 -Mnohpfc -Mdclchk -c ssyr.f -o ssyr.o
pghpf -O4 -Mnohpfc -Mdclchk -c sspr.f -o sspr.o
pghpf -O4 -Mnohpfc -Mdclchk -c ssyr2.f -o ssyr2.o
pghpf -O4 -Mnohpfc -Mdclchk -c sspr2.f -o sspr2.o
pghpf -O4 -Mnohpfc -Mdclchk -c sgemm.f -o sgemm.o
pghpf -O4 -Mnohpfc -Mdclchk -c ssymm.f -o ssymm.o
pghpf -O4 -Mnohpfc -Mdclchk -c ssyrk.f -o ssyrk.o
pghpf -O4 -Mnohpfc -Mdclchk -c ssyr2k.f -o ssyr2k.o
pghpf -O4 -Mnohpfc -Mdclchk -c strmm.f -o strmm.o
pghpf -O4 -Mnohpfc -Mdclchk -c strsm.f -o strsm.o
pghpf -O4 -Mnohpfc -Mdclchk -c idamax.f -o idamax.o
pghpf -O4 -Mnohpfc -Mdclchk -c dasum.f -o dasum.o
pghpf -O4 -Mnohpfc -Mdclchk -c daxpy.f -o daxpy.o
pghpf -O4 -Mnohpfc -Mdclchk -c dcopy.f -o dcopy.o
pghpf -O4 -Mnohpfc -Mdclchk -c ddot.f -o ddot.o
pghpf -O4 -Mnohpfc -Mdclchk -c dnrm2.f -o dnrm2.o
pghpf -O4 -Mnohpfc -Mdclchk -c drot.f -o drot.o
pghpf -O4 -Mnohpfc -Mdclchk -c drotg.f -o drotg.o
pghpf -O4 -Mnohpfc -Mdclchk -c dscal.f -o dscal.o
pghpf -O4 -Mnohpfc -Mdclchk -c dsdot.f -o dsdot.o
pghpf -O4 -Mnohpfc -Mdclchk -c dswap.f -o dswap.o
pghpf -O4 -Mnohpfc -Mdclchk -c drotmg.f -o drotmg.o
pghpf -O4 -Mnohpfc -Mdclchk -c drotm.f -o drotm.o
pghpf -O4 -Mnohpfc -Mdclchk -c dgemv.f -o dgemv.o
pghpf -O4 -Mnohpfc -Mdclchk -c dgbmv.f -o dgbmv.o
pghpf -O4 -Mnohpfc -Mdclchk -c dsymv.f -o dsymv.o
pghpf -O4 -Mnohpfc -Mdclchk -c dsbmv.f -o dsbmv.o
pghpf -O4 -Mnohpfc -Mdclchk -c dspmv.f -o dspmv.o
pghpf -O4 -Mnohpfc -Mdclchk -c dtrmv.f -o dtrmv.o
pghpf -O4 -Mnohpfc -Mdclchk -c dtbmv.f -o dtbmv.o
pghpf -O4 -Mnohpfc -Mdclchk -c dtpmv.f -o dtpmv.o
pghpf -O4 -Mnohpfc -Mdclchk -c dtrsv.f -o dtrsv.o
pghpf -O4 -Mnohpfc -Mdclchk -c dtbsv.f -o dtbsv.o
pghpf -O4 -Mnohpfc -Mdclchk -c dtpsv.f -o dtpsv.o
pghpf -O4 -Mnohpfc -Mdclchk -c dger.f -o dger.o
pghpf -O4 -Mnohpfc -Mdclchk -c dsyr.f -o dsyr.o
pghpf -O4 -Mnohpfc -Mdclchk -c dspr.f -o dspr.o
pghpf -O4 -Mnohpfc -Mdclchk -c dsyr2.f -o dsyr2.o
pghpf -O4 -Mnohpfc -Mdclchk -c dspr2.f -o dspr2.o
pghpf -O4 -Mnohpfc -Mdclchk -c dgemm.f -o dgemm.o
pghpf -O4 -Mnohpfc -Mdclchk -c dsymm.f -o dsymm.o
pghpf -O4 -Mnohpfc -Mdclchk -c dsyrk.f -o dsyrk.o
pghpf -O4 -Mnohpfc -Mdclchk -c dsyr2k.f -o dsyr2k.o
pghpf -O4 -Mnohpfc -Mdclchk -c dtrmm.f -o dtrmm.o
pghpf -O4 -Mnohpfc -Mdclchk -c dtrsm.f -o dtrsm.o
pghpf -O4 -Mnohpfc -Mdclchk -c scabs1.f -o scabs1.o
pghpf -O4 -Mnohpfc -Mdclchk -c scasum.f -o scasum.o
pghpf -O4 -Mnohpfc -Mdclchk -c scnrm2.f -o scnrm2.o
pghpf -O4 -Mnohpfc -Mdclchk -c icamax.f -o icamax.o
pghpf -O4 -Mnohpfc -Mdclchk -c caxpy.f -o caxpy.o
pghpf -O4 -Mnohpfc -Mdclchk -c ccopy.f -o ccopy.o
pghpf -O4 -Mnohpfc -Mdclchk -c cdotc.f -o cdotc.o
pghpf -O4 -Mnohpfc -Mdclchk -c cdotu.f -o cdotu.o
pghpf -O4 -Mnohpfc -Mdclchk -c csscal.f -o csscal.o
pghpf -O4 -Mnohpfc -Mdclchk -c crotg.f -o crotg.o
pghpf -O4 -Mnohpfc -Mdclchk -c cscal.f -o cscal.o
pghpf -O4 -Mnohpfc -Mdclchk -c cswap.f -o cswap.o
pghpf -O4 -Mnohpfc -Mdclchk -c csrot.f -o csrot.o
pghpf -O4 -Mnohpfc -Mdclchk -c cgemv.f -o cgemv.o
pghpf -O4 -Mnohpfc -Mdclchk -c cgbmv.f -o cgbmv.o
pghpf -O4 -Mnohpfc -Mdclchk -c chemv.f -o chemv.o
pghpf -O4 -Mnohpfc -Mdclchk -c chbmv.f -o chbmv.o
pghpf -O4 -Mnohpfc -Mdclchk -c chpmv.f -o chpmv.o
pghpf -O4 -Mnohpfc -Mdclchk -c ctrmv.f -o ctrmv.o
pghpf -O4 -Mnohpfc -Mdclchk -c ctbmv.f -o ctbmv.o
pghpf -O4 -Mnohpfc -Mdclchk -c ctpmv.f -o ctpmv.o
pghpf -O4 -Mnohpfc -Mdclchk -c ctrsv.f -o ctrsv.o
pghpf -O4 -Mnohpfc -Mdclchk -c ctbsv.f -o ctbsv.o
pghpf -O4 -Mnohpfc -Mdclchk -c ctpsv.f -o ctpsv.o
pghpf -O4 -Mnohpfc -Mdclchk -c cgerc.f -o cgerc.o
pghpf -O4 -Mnohpfc -Mdclchk -c cgeru.f -o cgeru.o
pghpf -O4 -Mnohpfc -Mdclchk -c cher.f -o cher.o
pghpf -O4 -Mnohpfc -Mdclchk -c chpr.f -o chpr.o
pghpf -O4 -Mnohpfc -Mdclchk -c cher2.f -o cher2.o
pghpf -O4 -Mnohpfc -Mdclchk -c chpr2.f -o chpr2.o
pghpf -O4 -Mnohpfc -Mdclchk -c cgemm.f -o cgemm.o
pghpf -O4 -Mnohpfc -Mdclchk -c csymm.f -o csymm.o
pghpf -O4 -Mnohpfc -Mdclchk -c csyrk.f -o csyrk.o
pghpf -O4 -Mnohpfc -Mdclchk -c csyr2k.f -o csyr2k.o
pghpf -O4 -Mnohpfc -Mdclchk -c ctrmm.f -o ctrmm.o
pghpf -O4 -Mnohpfc -Mdclchk -c ctrsm.f -o ctrsm.o
pghpf -O4 -Mnohpfc -Mdclchk -c chemm.f -o chemm.o
pghpf -O4 -Mnohpfc -Mdclchk -c cherk.f -o cherk.o
pghpf -O4 -Mnohpfc -Mdclchk -c cher2k.f -o cher2k.o
pghpf -O4 -Mnohpfc -Mdclchk -c dcabs1.f -o dcabs1.o
pghpf -O4 -Mnohpfc -Mdclchk -c dzasum.f -o dzasum.o
pghpf -O4 -Mnohpfc -Mdclchk -c dznrm2.f -o dznrm2.o
pghpf -O4 -Mnohpfc -Mdclchk -c izamax.f -o izamax.o
pghpf -O4 -Mnohpfc -Mdclchk -c zaxpy.f -o zaxpy.o
pghpf -O4 -Mnohpfc -Mdclchk -c zcopy.f -o zcopy.o
pghpf -O4 -Mnohpfc -Mdclchk -c zdotc.f -o zdotc.o
pghpf -O4 -Mnohpfc -Mdclchk -c zdotu.f -o zdotu.o
pghpf -O4 -Mnohpfc -Mdclchk -c zdscal.f -o zdscal.o
pghpf -O4 -Mnohpfc -Mdclchk -c zrotg.f -o zrotg.o
pghpf -O4 -Mnohpfc -Mdclchk -c zscal.f -o zscal.o
pghpf -O4 -Mnohpfc -Mdclchk -c zswap.f -o zswap.o
pghpf -O4 -Mnohpfc -Mdclchk -c zdrot.f -o zdrot.o
pghpf -O4 -Mnohpfc -Mdclchk -c zgemv.f -o zgemv.o
pghpf -O4 -Mnohpfc -Mdclchk -c zgbmv.f -o zgbmv.o
pghpf -O4 -Mnohpfc -Mdclchk -c zhemv.f -o zhemv.o
pghpf -O4 -Mnohpfc -Mdclchk -c zhbmv.f -o zhbmv.o
pghpf -O4 -Mnohpfc -Mdclchk -c zhpmv.f -o zhpmv.o
pghpf -O4 -Mnohpfc -Mdclchk -c ztrmv.f -o ztrmv.o
pghpf -O4 -Mnohpfc -Mdclchk -c ztbmv.f -o ztbmv.o
pghpf -O4 -Mnohpfc -Mdclchk -c ztpmv.f -o ztpmv.o
pghpf -O4 -Mnohpfc -Mdclchk -c ztrsv.f -o ztrsv.o
pghpf -O4 -Mnohpfc -Mdclchk -c ztbsv.f -o ztbsv.o
pghpf -O4 -Mnohpfc -Mdclchk -c ztpsv.f -o ztpsv.o
pghpf -O4 -Mnohpfc -Mdclchk -c zgerc.f -o zgerc.o
pghpf -O4 -Mnohpfc -Mdclchk -c zgeru.f -o zgeru.o
pghpf -O4 -Mnohpfc -Mdclchk -c zher.f -o zher.o
pghpf -O4 -Mnohpfc -Mdclchk -c zhpr.f -o zhpr.o
pghpf -O4 -Mnohpfc -Mdclchk -c zher2.f -o zher2.o
pghpf -O4 -Mnohpfc -Mdclchk -c zhpr2.f -o zhpr2.o
pghpf -O4 -Mnohpfc -Mdclchk -c zgemm.f -o zgemm.o
pghpf -O4 -Mnohpfc -Mdclchk -c zsymm.f -o zsymm.o
pghpf -O4 -Mnohpfc -Mdclchk -c zsyrk.f -o zsyrk.o
pghpf -O4 -Mnohpfc -Mdclchk -c zsyr2k.f -o zsyr2k.o
pghpf -O4 -Mnohpfc -Mdclchk -c ztrmm.f -o ztrmm.o
pghpf -O4 -Mnohpfc -Mdclchk -c ztrsm.f -o ztrsm.o
pghpf -O4 -Mnohpfc -Mdclchk -c zhemm.f -o zhemm.o
pghpf -O4 -Mnohpfc -Mdclchk -c zherk.f -o zherk.o
pghpf -O4 -Mnohpfc -Mdclchk -c zher2k.f -o zher2k.o
pghpf -O4 -Mnohpfc -Mdclchk -c lsame.f -o lsame.o
pghpf -O4 -Mnohpfc -Mdclchk -c xerbla.f -o xerbla.o
PGFTN-S-0126-Name len_trim is not an intrinsic function (xerbla.f: 76)
PGFTN-S-0038-Symbol, len_trim, has not been explicitly declared (xerbla.f: 80)
0 inform, 0 warnings, 2 severes, 0 fatal for xerbla
PGFTN/x86-64 Linux 11.5-0: compilation completed with severe errors
make[1]: *** [xerbla.o] Error 2
make[1]: Leaving directory `/home/kjswanson/Documents/Modules/PreMade/lapack-3.4.0/BLAS/SRC'
make: *** [blaslib] Error 2
kjswanson@quicksilver:~/Documents/Modules/PreMade/lapack-3.4.0> make
( cd INSTALL; make; ./testlsame; ./testslamch; ./testdlamch; \
./testsecond; ./testdsecnd; ./testieee; ./testversion )
make[1]: Entering directory `/home/kjswanson/Documents/Modules/PreMade/lapack-3.4.0/INSTALL'
pghpf -O4 -Mnohpfc -Mdclchk -c lsame.f -o lsame.o
pghpf -O4 -Mnohpfc -Mdclchk -c lsametst.f -o lsametst.o
pghpf -o testlsame lsame.o lsametst.o
pghpf -Mnohpfc -Mdclchk -c slamch.f -o slamch.o
PGFTN-S-0126-Name digits is not an intrinsic function (slamch.f: 93)
PGFTN-S-0126-Name epsilon is not an intrinsic function (slamch.f: 93)
PGFTN-S-0126-Name huge is not an intrinsic function (slamch.f: 93)
PGFTN-S-0126-Name maxexponent is not an intrinsic function (slamch.f: 93)
PGFTN-S-0126-Name minexponent is not an intrinsic function (slamch.f: 93)
PGFTN-S-0126-Name radix is not an intrinsic function (slamch.f: 93)
PGFTN-S-0126-Name tiny is not an intrinsic function (slamch.f: 93)
PGFTN-S-0038-Symbol, epsilon, has not been explicitly declared (slamch.f: 104)
PGFTN-S-0038-Symbol, tiny, has not been explicitly declared (slamch.f: 112)
PGFTN-S-0038-Symbol, huge, has not been explicitly declared (slamch.f: 113)
PGFTN-S-0038-Symbol, radix, has not been explicitly declared (slamch.f: 123)
PGFTN-S-0038-Symbol, digits, has not been explicitly declared (slamch.f: 127)
PGFTN-S-0038-Symbol, minexponent, has not been explicitly declared (slamch.f: 131)
PGFTN-S-0038-Symbol, maxexponent, has not been explicitly declared (slamch.f: 135)
0 inform, 0 warnings, 14 severes, 0 fatal for slamch
make[1]: *** [slamch.o] Error 2
make[1]: Leaving directory `/home/kjswanson/Documents/Modules/PreMade/lapack-3.4.0/INSTALL'
ASCII character set
Tests completed
/bin/sh: ./testslamch: No such file or directory
/bin/sh: ./testdlamch: No such file or directory
/bin/sh: ./testsecond: No such file or directory
/bin/sh: ./testdsecnd: No such file or directory
/bin/sh: ./testieee: No such file or directory
/bin/sh: ./testversion: No such file or directory
make: *** [lapack_install] Error 127
kjswanson@quicksilver:~/Documents/Modules/PreMade/lapack-3.4.0>

I am convninced that my issues are due to my ignorance, it thats the case please point me to a knowdlege base that i can learn from.
-TOPE-
 
Posts: 2
Joined: Wed Jul 11, 2012 3:59 pm

Re: Beginner: Trouble setting up LAPACK & BLAS with pgf90

Postby admin » Wed Jul 11, 2012 6:53 pm

hum, seems that you do everything correctly so that sounds not very good.
For sure this is a compiler related problem, as some intrinsic procedures cannot be found by the compiler. The fix will certainly come from a compiler flag.
If I look at the pg Fortran Reference ( http://www.pgroup.com/doc/pgifortref.pdf ), on chapter 6, the intrinsic functions that we are calling are defined.

which version of pgf have you installed? and on which platform are you working?

Could you try to remove the –Mdclchk flag?
–Mdclchk flag: the compiler requires that all program variables be declared.

We have nightly build of LAPACK which different configuration. One is with pgf90, and everything goes fine.
You can try to use CMAKE to build LAPACK.
First, download the latest version of LAPACK 3.4.1
Then download cmake from http://www.cmake.org/cmake/resources/software.html if not already installed on your machine.
create a folder BUILD-LAPACK or whatever name you like
Code: Select all
mkdir BUILD-LAPACK; cd BUILD-LAPACK; ccmake "PATH TO THE LAPACK 3.4.1 FOLDER"; make; make test
admin
Site Admin
 
Posts: 504
Joined: Wed Dec 08, 2004 7:07 pm

Re: Beginner: Trouble setting up LAPACK & BLAS with pgf90

Postby rodney » Wed Jul 11, 2012 8:38 pm

It looks like you are using the HPF version of the compiler, which is not strictly compatible with F95, which is what LAPACK needs. You should try using pgf95 instead of pghpf as the fortran compiler.

--Rodney
rodney
 
Posts: 49
Joined: Thu Feb 10, 2011 8:20 pm
Location: Colorado College


Return to Makefile

Who is online

Users browsing this forum: No registered users and 1 guest