install on Apple G5 Xserve OSX.4

Open discussion regarding features, bugs, issues, vendors, etc.

install on Apple G5 Xserve OSX.4

Postby abarnes » Fri Jul 14, 2006 3:31 pm

I get the following error after running make

/usr/bin/ld: Undefined symbols:
_isamax
_sasum
_saxpy
_scopy
_sdot
_snrm2
_srot
_srotg
_sscal
_sswap
collect2: ld returned 1 exit status
make[1]: *** [../xblat1s] Error 1
make: *** [blas_testing] Error 2

My make.inc file I copied from one of the other posts and is as follows

####################################################################
# LAPACK make include file. #
# LAPACK, Version 3.0 #
# June 30, 1999 #
####################################################################
#
SHELL = /bin/sh
#
# The machine (platform) identifier to append to the library names
#
PLAT = _APPLE_G5_OSX
#
# 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 = g77
#OPTS = -O4 -u -f -mt
#OPTS = -u -f -dalign -native -xO5 -xarch=v8plusa
#OPTS = -u -f -dalign -native -xO5 -xarch=v8plusa
OPTS = -ffixed-form -fno-underscoring -Wall -fbounds-check -O3
DRVOPTS = $(OPTS)
NOOPT = -ffloat-store
#NOOPT = -u -f
#NOOPT = -u -f -mt
LOADER = g77
#LOADOPTS = -mt
#LOADOPTS = -f -dalign -native -xO5 -xarch=v8plusa
LOADOPTS= -lSystemStubs -Wall
#
# 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 = echo
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 = -xlic_lib=sunperf_mt
BLASLIB = -xlic_lib=sunperf
LAPACKLIB = lapack$(PLAT).a
TMGLIB = tmglib$(PLAT).a
EIGSRCLIB = eigsrc$(PLAT).a
LINSRCLIB = linsrc$(PLAT).a

Can someone let me know what needs correcting.

Thanks
Anna
abarnes
 
Posts: 6
Joined: Thu Jul 13, 2006 5:11 pm

Postby Julien Langou » Fri Jul 14, 2006 5:18 pm

Hello Anna,

you messed up a little bit in the make.inc with the variable BLASLIB, you first set it to
BLASLIB = ../../blas$(PLAT).a
and then overread the variable BLASLIB with
BLASLIB = -xlic_lib=sunperf
So that's not good.

You have two ways to go to test your installation.

Either set in the make.inc:
BLASLIB = ../../blas$(PLAT).a
and then
make blaslib
make testing
In this case you are going to test with your lapack library (named :
LAPACK/lapack_APPLE_G5_OSX.a ) with the reference BLAS library ( named:
LAPACK/blas_APPLE_G5_OSX.a )

Or you can give a try with Veclib but I forgot how to do it, you might want to have a look at Apple website.

Julien
Julien Langou
 
Posts: 832
Joined: Thu Dec 09, 2004 12:32 pm
Location: Denver, CO, USA

Postby abarnes » Fri Jul 14, 2006 5:36 pm

Thanks for the quick response. I realised after I sent the note what I had done. However, I still can't get it to make the xlintsts etc executables.

When I run make testing it tells me its uptodate but if I run make in LAPACK/TESTING/LIN I get the following error
../../tmglib_APPLE_G5_OSX.a ../../lapack_APPLE_G5_OSX.a ../../blas_APPLE_G5_OSX.a -o ../xlintsts
/usr/bin/ld: Undefined symbols:
_slamch
_etime
_slamc3
collect2: ld returned 1 exit status
make: *** [../xlintsts] Error 1

And indeed there is no xlintsts

Cheers
Anna
abarnes
 
Posts: 6
Joined: Thu Jul 13, 2006 5:11 pm

Postby Julien Langou » Fri Jul 14, 2006 6:05 pm

Ok that's weird, I have just tried on an Apple G5 and everyhting went smoothly but I was using gfortran compiler.

So you have two problems, ETIME and the xLAMCH.

Try to do make again in the INSTALL directory. What happens?
I guess you should observe the same problems at the link time in the INSTALL directory?

For etime, one thing you can do is take the file
INSTALL/second.f.RS6K
and put it instead of
INSTALL/second.f
(a good idea is also to keep an original of INSTALL/second.f for backup)
Then try to type make again in the INSTALL directory. Does it look any better? Same thing for dsecnd.f in that case.

If this trick does not work, we will use brute force ... Just edit the files second.f and dsecnd.f and copy paste the following code:
Code: Select all
*
* file dsecnd.f that does not return any time
*
      DOUBLE PRECISION FUNCTION DSECND( )
      DSECND = 0.0D+00
      RETURN
      END


Code: Select all
*
* file second.f that does not return any time
*
      REAL FUNCTION SECOND( )
      DSECND = 0.0E+00
      RETURN
      END


Keep in mind that both second.f and dsecnd.f are present in SRC and in INSTALL so you will need to update all four files and run make in SRC (and INSTALL if you wish).

So this last solution is a bit extreme, you will have LAPACK with no timer in it. I guess it's not a big deal in particular if you just want ot test the library.

I hope running make in the INSTALL directoy will fix the xLAMCH problem.

Let me know if this works / does not work,
Julien
Julien Langou
 
Posts: 832
Joined: Thu Dec 09, 2004 12:32 pm
Location: Denver, CO, USA

Postby abarnes » Fri Jul 14, 2006 6:24 pm

Ok I'm tired now. None of those fixes worked.

When I did make in INSTALL I got
make
g77 -lSystemStubs -Wall -o testslamch slamch.o lsame.o slamchtst.o
/usr/bin/ld: Undefined symbols:
_lsame_
_slamch
collect2: ld returned 1 exit status
make: *** [testslamch] Error 1

then I made the changes ou suggested about replacing the second.f files and got

g77 -lSystemStubs -Wall -o testslamch slamch.o lsame.o slamchtst.o
/usr/bin/ld: Undefined symbols:
_lsame_
_slamch
collect2: ld returned 1 exit status
make: *** [testslamch] Error 1

Then I went in and pasted the lines of code. Was I supposed to replace or add these lines. Anyway regardless when I ran make in SRC I got
make
g77 -ffixed-form -fno-underscoring -Wall -fbounds-check -O3 -c second.f
second.f: In function `second':
second.f:1:
REAL FUNCTION SECOND( )
1
second.f:19: (continued):
REAL FUNCTION SECOND( )
2
Statement at (2) invalid in context established by statement at (1)
make: *** [second.o] Error 1


Can I do an uninstall and start again ? :)

Thanks so much for all your help.
abarnes
 
Posts: 6
Joined: Thu Jul 13, 2006 5:11 pm

Postby Julien Langou » Sat Jul 15, 2006 3:03 pm

Hello Anna,

so two points


  • to compile on MacOS with g77, the best thing is to take the INSTALL/make.inc.LINUX as the make.inc . Then our current makefile are not that great on non-case-sensitive OS (MacOS, Windows). So you need to go in TESTING yourself and type make, etc. And finally, yep taking into account the probable state of your LAPACK directory, just start the install again from scratch...
  • and why not using VecLib. I think they provide the whole LAPACK library on MacOS. Have good performance and is already installed....
    to link with VecLib: -Wl,-framework -Wl,vecLib .

Julien
Julien Langou
 
Posts: 832
Joined: Thu Dec 09, 2004 12:32 pm
Location: Denver, CO, USA

Postby abarnes » Sun Jul 16, 2006 10:20 am

Dear Julien
Thank you for all your help you realy are quite wonderful my computing super hero.

Best regards
Anna :)
abarnes
 
Posts: 6
Joined: Thu Jul 13, 2006 5:11 pm

Postby abarnes » Mon Jul 17, 2006 12:30 pm

Hi Julien
you wrote:
and why not using VecLib. I think they provide the whole LAPACK library on MacOS. Have good performance and is already installed....
to link with VecLib: -Wl,-framework -Wl,vecLib .

What do I have to link VecLib to ? The lapacklib ?

LAPACKLIB = /System/Library/Frameworks/vecLib.frameworks/A -WI,-framework -WI,veclib

Sorry I'm a bit confused again. Are you saying that in fact I needn't have downloaded LAPACK at all and that I could have done everything with VecLib instead :)

thanks
Anna
abarnes
 
Posts: 6
Joined: Thu Jul 13, 2006 5:11 pm

Postby Julien Langou » Mon Jul 17, 2006 12:39 pm

What do I have to link VecLib to ? The lapacklib ?
LAPACKLIB = /System/Library/Frameworks/vecLib.frameworks/A -WI,-framework -WI,veclib


Yes actually you can do something like this.

But this is only if you want to test if the VecLib library passes the LAPACK testing. VecLib is already compiled/installed on your machine, it is ready to use. Just write you own LAPACK code and use VecLib as it is.

There is some problem with the Makefile in the TESTING of LAPACK as they are set up right now. So I won't recommend you to do the testing of VecLib unless you really want to test VecLib, in which case you will need to do some edit, and debug some Makefile.

In the lapack directory I have created you have three directories. If you look inside the examples directory I show you how to link a simple code with lapack in one hand and with VecLib in the other hand. Timing shows that VecLib is better (for LU at least). That's all you should need to be able to do at this point.

So if you want to test if the VecLib passes the LAPACK testing, let me know. I can have a look.

Julien
Julien[/quote]
Julien Langou
 
Posts: 832
Joined: Thu Dec 09, 2004 12:32 pm
Location: Denver, CO, USA

Postby abarnes » Mon Jul 17, 2006 12:52 pm

Ahh now I understand sorry I didn't look at the results files just the output. So no I won't bother testing VecLib with LAPACK.

Thanks
Anna
abarnes
 
Posts: 6
Joined: Thu Jul 13, 2006 5:11 pm


Return to User Discussion

Who is online

Users browsing this forum: No registered users and 7 guests