Commit 940deee68e04a3e134076924383b1e2d2a2071f1
1 parent
3cee84f227
Exists in
master
Added necessary flags to also build shared libraries.
git-svn-id: https://lxsd.femto-st.fr/svn/atlas@6 dff38a21-2163-4b57-a1b5-aae693bec1e4
Showing 3 changed files with 11 additions and 4 deletions Inline Diff
Makefile
# Makefile pour compiler lapack + atlas avec gfortran + gcc | 1 | 1 | # Makefile pour compiler lapack + atlas avec gfortran + gcc | |
# Il faut au préalable placer le processeur en mode performance | 2 | 2 | # Il faut au préalable placer le processeur en mode performance | |
3 | 3 | |||
all: | 4 | 4 | all: | |
( ./build.sh ) | 5 | 5 | ( ./build.sh ) | |
6 | 6 | |||
install: | 7 | 7 | install: | |
( cp ATLAS/install/lib/*.a $(BTREE)/lib ) | 8 | 8 | ( cp ATLAS/install/lib/* $(BTREE)/lib ) | |
9 | 9 | |||
clean: | 10 | 10 | clean: |
build.sh
#!/bin/bash | 1 | 1 | #!/bin/bash | |
2 | 2 | |||
echo "FR Mettre le processeur en mode performances (important pour atlas)" | 3 | 3 | echo "FR Mettre le processeur en mode performances (important pour atlas)" | |
echo "FR + sous kde clic droit sur kpowersave " | 4 | 4 | echo "FR + sous kde clic droit sur kpowersave " | |
echo "FR -> Définir les règles de fréquence du processeur" | 5 | 5 | echo "FR -> Définir les règles de fréquence du processeur" | |
echo "FR -> Performances" | 6 | 6 | echo "FR -> Performances" | |
echo "FR + avec les cpufrequtils en root : cpufreq-set -g performance" | 7 | 7 | echo "FR + avec les cpufrequtils en root : cpufreq-set -g performance" | |
echo | 8 | 8 | echo | |
echo "FR Si ce n'est pas fait tapez <Ctrl> C pour interrompre " | 9 | 9 | echo "FR Si ce n'est pas fait tapez <Ctrl> C pour interrompre " | |
echo "FR sinon continuez avec <Entree>" | 10 | 10 | echo "FR sinon continuez avec <Entree>" | |
echo | 11 | 11 | echo | |
echo "EN Processor must be in performance mode (important for atlas)" | 12 | 12 | echo "EN Processor must be in performance mode (important for atlas)" | |
echo "EN + under kde right-clic on kpowersave " | 13 | 13 | echo "EN + under kde right-clic on kpowersave " | |
echo "EN -> Processor frequency rules" | 14 | 14 | echo "EN -> Processor frequency rules" | |
echo "EN -> Performances" | 15 | 15 | echo "EN -> Performances" | |
echo "EN + with cpufrequtils under root : cpufreq-set -g performance" | 16 | 16 | echo "EN + with cpufrequtils under root : cpufreq-set -g performance" | |
echo | 17 | 17 | echo | |
echo "EN If it is not the case type <Ctrl> C to interrupt now " | 18 | 18 | echo "EN If it is not the case type <Ctrl> C to interrupt now " | |
echo "EN otherwise continue with <Enter>" | 19 | 19 | echo "EN otherwise continue with <Enter>" | |
20 | 20 | |||
21 | 21 | |||
22 | 22 | |||
23 | 23 | |||
read a | 24 | 24 | read a | |
25 | 25 | |||
# Unpack lapack archive | 26 | 26 | # Unpack lapack archive | |
echo "Archive lapack (netlib)" | 27 | 27 | echo "Archive lapack (netlib)" | |
tar xzf lapack.tgz | 28 | 28 | tar xzf lapack.tgz | |
29 | 29 | |||
# Compilation lapack | 30 | 30 | # Compilation lapack | |
cp make.inc.gfortran.lapack lapack-3.1.1/make.inc | 31 | 31 | cp make.inc.gfortran.lapack lapack-3.1.1/make.inc | |
cd lapack-3.1.1 | 32 | 32 | cd lapack-3.1.1 | |
make lapacklib | 33 | 33 | make lapacklib | |
cd .. | 34 | 34 | cd .. | |
35 | 35 | |||
# Unpack atlas archive | 36 | 36 | # Unpack atlas archive | |
echo "Archive atlas" | 37 | 37 | echo "Archive atlas" | |
tar xjf atlas3.8.2.tar.bz2 | 38 | 38 | tar xjf atlas3.8.2.tar.bz2 | |
cd ATLAS | 39 | 39 | cd ATLAS | |
mkdir build | 40 | 40 | mkdir build | |
mkdir install | 41 | 41 | mkdir install | |
cd build | 42 | 42 | cd build | |
../configure --prefix=../install --with-netlib-lapack=../../lapack-3.1.1/lapack_LINUX.a | 43 | 43 | ../configure --prefix=../install --with-netlib-lapack=../../lapack-3.1.1/lapack_LINUX.a -Fa alg -fPIC |
make.inc.gfortran.lapack
#################################################################### | 1 | 1 | #################################################################### | |
# LAPACK make include file. # | 2 | 2 | # LAPACK make include file. # | |
# LAPACK, Version 3.1.1 # | 3 | 3 | # LAPACK, Version 3.1.1 # | |
# February 2007 # | 4 | 4 | # February 2007 # | |
#################################################################### | 5 | 5 | #################################################################### | |
# | 6 | 6 | # | |
SHELL = /bin/sh | 7 | 7 | SHELL = /bin/sh | |
# | 8 | 8 | # | |
# The machine (platform) identifier to append to the library names | 9 | 9 | # The machine (platform) identifier to append to the library names | |
# | 10 | 10 | # | |
PLAT = _LINUX | 11 | 11 | PLAT = _LINUX | |
# | 12 | 12 | # | |
# Modify the FORTRAN and OPTS definitions to refer to the | 13 | 13 | # Modify the FORTRAN and OPTS definitions to refer to the | |
# compiler and desired compiler options for your machine. NOOPT | 14 | 14 | # compiler and desired compiler options for your machine. NOOPT | |
# refers to the compiler options desired when NO OPTIMIZATION is | 15 | 15 | # refers to the compiler options desired when NO OPTIMIZATION is | |
# selected. Define LOADER and LOADOPTS to refer to the loader and | 16 | 16 | # selected. Define LOADER and LOADOPTS to refer to the loader and | |
# desired load options for your machine. | 17 | 17 | # desired load options for your machine. | |
# | 18 | 18 | # | |
FORTRAN = gfortran | 19 | 19 | FORTRAN = gfortran | |
OPTS = -O2 | 20 | 20 | OPTS = -O2 -fPIC | |
DRVOPTS = $(OPTS) | 21 | 21 | DRVOPTS = $(OPTS) | |
NOOPT = -O0 | 22 | 22 | NOOPT = -O0 -fPIC | |
LOADER = gfortran | 23 | 23 | LOADER = gfortran | |
LOADOPTS = | 24 | 24 | LOADOPTS = | |
# | 25 | 25 | # | |
# Timer for the SECOND and DSECND routines | 26 | 26 | # Timer for the SECOND and DSECND routines | |
# | 27 | 27 | # | |
# Default : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME | 28 | 28 | # Default : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME | |
#TIMER = EXT_ETIME | 29 | 29 | #TIMER = EXT_ETIME | |
# For RS6K : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME_ | 30 | 30 | # For RS6K : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME_ | |
# TIMER = EXT_ETIME_ | 31 | 31 | # TIMER = EXT_ETIME_ | |
# For gfortran compiler: SECOND and DSECND will use a call to the INTERNAL FUNCTION ETIME | 32 | 32 | # For gfortran compiler: SECOND and DSECND will use a call to the INTERNAL FUNCTION ETIME | |
TIMER = INT_ETIME | 33 | 33 | TIMER = INT_ETIME | |
# If your Fortran compiler does not provide etime (like Nag Fortran Compiler, etc...) | 34 | 34 | # 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 | 35 | 35 | # SECOND and DSECND will use a call to the INTERNAL FUNCTION CPU_TIME | |
# TIMER = INT_CPU_TIME | 36 | 36 | # 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 | 37 | 37 | # If neither of this works...you can use the NONE value... In that case, SECOND and DSECND will always return 0 | |
# TIMER = NONE | 38 | 38 | # TIMER = NONE | |
# | 39 | 39 | # | |
# The archiver and the flag(s) to use when building archive (library) | 40 | 40 | # The archiver and the flag(s) to use when building archive (library) | |
# If you system has no ranlib, set RANLIB = echo. | 41 | 41 | # If you system has no ranlib, set RANLIB = echo. | |
# | 42 | 42 | # | |
ARCH = ar | 43 | 43 | ARCH = ar | |
ARCHFLAGS= cr | 44 | 44 | ARCHFLAGS= cr | |
RANLIB = ranlib | 45 | 45 | RANLIB = ranlib | |
# | 46 | 46 | # | |
# The location of the libraries to which you will link. (The | 47 | 47 | # The location of the libraries to which you will link. (The | |
# machine-specific, optimized BLAS library should be used whenever | 48 | 48 | # machine-specific, optimized BLAS library should be used whenever | |
# possible.) | 49 | 49 | # possible.) | |
# | 50 | 50 | # | |
BLASLIB = ../../blas$(PLAT).a | 51 | 51 | BLASLIB = ../../blas$(PLAT).a | |
LAPACKLIB = lapack$(PLAT).a | 52 | 52 | LAPACKLIB = lapack$(PLAT).a | |
TMGLIB = tmglib$(PLAT).a | 53 | 53 | TMGLIB = tmglib$(PLAT).a | |
EIGSRCLIB = eigsrc$(PLAT).a | 54 | 54 | EIGSRCLIB = eigsrc$(PLAT).a | |
LINSRCLIB = linsrc$(PLAT).a | 55 | 55 | LINSRCLIB = linsrc$(PLAT).a | |
56 | 56 | |||