LAPACK Archives

[Lapack] Installing problem

Gaurav
You are not doing anything wrong.
The problems come from the fact that MAC OS is not case sensitive  
(not same timing test) and that you are using a old version of LAPACK  
(timing stalls). You do not have to worry about theses problems.

As Mac OS is not case sensitive if you type:
/xlintims < stime.in > stime.out 2>&1
it will run in fact:
/xlintims < STIME.in > stime.out 2>&1

To solve the timing test difference, the best is to rename the input  
files you want to use.
For example rename
stime.in in small_stime.in
STIME.in in large_stime.in

and you run something like:
/xlintims < small_stime.in > small_stime.out 2>&1
/xlintims < largel_stime.in > large_stime.out 2>&1


For you information CLAPACK is no longer maintained since 2000 and  
moreover this is just a f2c'ed version of LAPACK.
If you want the latest LAPACK release, you need to get LAPACK-3.1.1  
that is written in Fortran from http://www.netlib.org/lapack.

You just have to compile it in Fortran (g77 or gfortran are available  
for free), after you can link you C program to that Fortran Library.
Here are a number of points we need to keep in mind:

[1] Fortran types must match C types.

     The variable type in C must match the Fortran type. Once one has  
determined the Fortran type, the translation to C is straightforward,  
but may depend on local hardware and compiler conventions.

     REAL, REAL*4       float
     REAL*8, DOUBLE PRECISION   double
     INTEGER    int
     COMPLEX, COMPLEX*8         float[2] (an array of two floats)
     COMPLEX*16         double[2] (an array of two doubles)

[2] Global name of Fortran compiled object

     The Fortran compiled object module is usually given a lower case  
name. With many Fortran compilers by default, an extra suffix  
underscore character is also attached. If you find this happening,  
you have to add it to the name you call, as we did, or change the  
Fortran compilation options, if possible.

[3] Fortran 77 arguments are pointers.

     All Fortran arguments are passed as pointers, whether they are  
input or output values.

[4] Fortran array indexing is base 1.

     An array in C  is indexed starting from 0. In Fortran the index  
starts at 1. This is not a problem for passing simple arrays, because  
we just hand the Fortran routine the address of the first element,  
which we think of as element 0 and Fortran thinks of as element 1.  
But the distinction is important in interpreting the documentation.

[5] Fortran presents multiple array subscripts backwards from C

     Fortran matrix element A(3,5) translates to C matrix element a[4] 
[2]. (Subtract 1 for zero base indexing and reverse the order of the  
subscripts.)

     The Fortran declaration REAL A(10,20) translates to the C  
declaration float a[20][10]. Note that Fortran documentation  
referring to the "leading" dimension of an array should be translated  
as the "last" dimension of an array: 10 in this example.

You can find some additional info on the LAPACK forum at http:// 
icl.cs.utk.edu/lapack-forum
Hope it helps
Julie

On Jul 26, 2007, at 3:54 PM, Gaurav Pranami wrote:

Hi,

  I am trying to use LAPACK for the first time and I am trying to  
install
CLAPACK on Apple G5 using the BLAS included with CLAPACK.  
Everything went fine
until executed step 7 in README.install:

---------------------------------------------------------------------- 
-----------
(7) Build the archive containing the eigensystem routines, compile
    eigenroutine TIMING code, and the linear system TIMING code
    by doing:
      cd CLAPACK/TIMING; make
---------------------------------------------------------------------- 
-----------

  Doing so I got the following message:

---------------------------------------------------------------------- 
---------
Timing square REAL LAPACK linear equations routines
/xlintims < stime.in > stime.out 2>&1
---------------------------------------------------------------------- 
---------

   After this the program kept writing the file stime.out for a  
long time and
then exited with the make error.

   For the sake of trying I tried installing it on a LINUX system  
and everything
 went like a breeze. Then I compared stime.out generated on G5 and  
LINUX. In the
G5 stime.out, the following text was written in the beginning:

---------------------------------------------------------------------- 
---------
 LAPACK VERSION 3.0, released June 30, 1999

 LAPACK timing, REAL square matrices

 The following parameter values will be used:
    M:          50   100   200   300   400   500
    N:          50   100   200   300   400   500
    K:           1     2    16   100
    NB:          1    16    32    48    64
    NX:          0    48   128   128   128
    LDA:       513

 The minimum time a subroutine will be timed =   .000 seconds
---------------------------------------------------------------------- 
---------

while the stime.out generated by LINUX had:

---------------------------------------------------------------------- 
---------
 LAPACK VERSION 3.0, released June 30, 1999

 LAPACK timing, REAL square matrices

 The following parameter values will be used:
    M:          10    20    40    60    80
    N:          10    20    40    60    80
    K:          20    80
    NB:          1     8
    NX:          0     8
    LDA:        81

 The minimum time a subroutine will be timed =   .050 seconds
---------------------------------------------------------------------- 
---------

   Seems like issuing the command "cd CLAPACK/TIMING; make" on G5  
runs the
timing on the large test systems systems. So I tried doing it  
explicitly, i.e.
issue "make small" but it still ran the timing for large test  
system and I got
the same result with "make large".

   Below if the make.inc file that I used without the optimization  
flags

---------------------------------------------------------------------- 
---------
#  LAPACK make include file.                                       #
#  LAPACK, Version 3.0                                             #
#  June 30, 1999                                                   #
####################################################################
#
#  The machine (platform) identifier to append to the library names
#
PLAT = _OSX-070724
#
#  Modify the CC and CFLAGS 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.
#
#######################################################
# This is used to compile C libary
CC        = gcc
CFLAGS    =
LOADER    = gcc
LOADOPTS  = $(CFLAGS)
NOOPT     =
DRVCFLAGS = $(CFLAGS)
F2CCFLAGS = $(CFLAGS)
###################################################################### 
#
#
#  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
#
#  The location of the libraries to which you will link.  (The
#  machine-specific, optimized BLAS library should be used whenever
#  possible.)
#

BLASLIB      = ../../blas$(PLAT).a
#BLASLIB      = ../../libfblaswr.a -L/usr/sww/opt/SUNWspro/lib - 
xlic_lib=sunperf
#BLASLIB      = -L/usr/sww/opt/SUNWspro/lib -Bstatic - 
xlic_lib=sunperf -Bdynamic
#BLASLIB      = -L/home/eecs/dbindel/work/ATLAS/lib/SunOS_SunUSX  \
#               ../../libcblaswr.a -lcblas -latlas
LAPACKLIB    = lapack$(PLAT).a
F2CLIB       = ../../F2CLIBS/libF77.a ../../F2CLIBS/libI77.a
TMGLIB       = tmglib$(PLAT).a
EIGSRCLIB    = eigsrc$(PLAT).a
LINSRCLIB    = linsrc$(PLAT).a
---------------------------------------------------------------------- 
---------

   I also tried installing with -funroll-all-loops -O3 flags but  
with same result.

   Please help me figure out what I am doing wrong.

Thanks

Gaurav Pranami

Graduate Student
Chemical Engineering Dept.
Iowa State University




_______________________________________________
Lapack mailing list
Lapack@Domain.Removed
http://lists.cs.utk.edu/listinfo/lapack

******************************
Julie Langou; Innovative Computing Laboratory; Computer Science Dept;
University of Tennessee from Denver, Colorado ;-)
julie@Domain.Removed; http://www.cs.utk.edu/~julie/




-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://lists.cs.utk.edu/private/lapack/attachments/20070727/bf21b977/attachment-0001.htm
 

<Prev in Thread] Current Thread [Next in Thread>


For additional information you may use the LAPACK/ScaLAPACK Forum.
Or one of the mailing lists, or