La version disponible dans Wheezy, et même dans Sid, est très ancienne (5.3.4 pour une version courante 7.6.4 au 6 mai 2014).
apt-get -y install libopenmpi-dev libnetcdff5 libnetcdf-dev openmpi-bin openmpi-common libhdf5-openmpi-dev libgsl0-dev libfftw3-dev openjdk-6-jdk python-numpy python-numpy-doc etsf-io gcc-4.7 g++-4.7 gfortran-4.7 libfftw3-mpi3 libfftw3-mpi-dev gcc gfortran g++
cd /root wget http://ftp.abinit.org/abinit-7.6.4.tar.gz
cd /root tar xzf /root/abinit-7.6.4.tar.gz cd /root/abinit-7.6.4
Ce plus, de manière à pouvoir exécuter ces codes sur toutes les architectures, les mtune=native
ont été remplacés.
OMPI_CC=/usr/bin/gcc-4.7 OMPI_CXX=/usr/bin/g++-4.7 OMPI_FC=/usr/bin/gfortran-4.7 CFLAGS="-mtune=generic -O3 -mssse3" FCFLAGS="-mtune=generic -O3 -mssse3 -ffree-form -ffree-line-length-none" CXXFLAGS="-mtune=generic -O3 -mssse3" FC_LDFLAGS_EXTRA="-fopenmp" CC=mpicc.openmpi CXX=mpic++.openmpi FC=mpif90.openmpi ./configure --prefix=/opt/abinit-7.6.4 --enable-openmp --enable-mpi --enable-mpi-io --enable-mpi-trace --enable-64bit-flags --with-fft-flavor=fftw3-mpi --with-fft-libs="-L/usr/lib/x86_64-linux-gnu -lfftw3f -lfftw3_mpi -lfftw3f_threads -lfftw3_threads -lfftw3" --enable-bigdft --enable-exports --enable-fallbacks --with-linalg-flavor=custom --with-linalg-incs="-I/usr/include/atlas" --with-linalg-libs="-L/usr/lib/atlas-base/atlas -llapack -lblas" --with-etsf-io-incs="-I/usr/include" --with-fft-incs="-I/usr/include" --enable-netcdf --with-netcdf-incs="-I/usr/include" --with-netcdf-libs="-L/usr/lib" time make mj4
make install TEMP=$PWD cd /opt [ -d abinit ] && rm -f abinit ln -s abinit-7.6.4 abinit
Les composants linalg et bigdft font péter la compilation. Ils en sont donc exclus sans ménagement !
cd $TEMP/fallbacks CC=/usr/bin/gcc-4.7 CXX=/usr/bin/g++-4.7 FC=/usr/bin/gfortran-4.7 CFLAGS="-mtune=generic -O3 -mssse3" FCFLAGS="-mtune=generic -O3 -mssse3 -ffree-form -ffree-line-length-none" CXXFLAGS="-mtune=generic -O3 -mssse3" FC_LDFLAGS_EXTRA="-fopenmp" ./configure --prefix=/opt/abinit-7.6.4 --enable-linalg=no --enable-bigdft=no make make install rsync -a $TEMP/fallbacks/exports/ /opt/abinit-7.6.4/
Normalement, le configure
permet de spécifier les localisations des différents composants, mais cela ne semble pas fonctionner. Autant recréer un dosser /tmp/cuda
contenant l'arborescence vers tous les composants CUDA :
mkdir /tmp/cuda ln -s /usr/lib/x86_64-linux-gnu /tmp/cuda/lib64 ln -s /usr/include/ /tmp/cuda/include ln -s /usr/bin /tmp/cuda/bin
make distclean OMPI_CC=/usr/bin/gcc OMPI_CXX=/usr/bin/g++ OMPI_FC=/usr/bin/gfortran CFLAGS="-mtune=generic -O3 -mssse3" FCFLAGS="-mtune=generic -O3 -mssse3 -ffree-form -ffree-line-length-none" CXXFLAGS="-mtune=generic -O3 -mssse3" FC_LDFLAGS_EXTRA="-fopenmp" CC=mpicc.openmpi CXX=mpic++.openmpi FC=mpif90.openmpi ./configure --prefix=/opt/abinit-7.6.4-cuda --enable-openmp --enable-mpi --enable-mpi-io --enable-mpi-trace --enable-64bit-flags --with-fft-flavor=fftw3-mpi --with-fft-libs="-L/usr/lib/x86_64-linux-gnu -lfftw3f -lfftw3_mpi -lfftw3f_threads -lfftw3_threads" --enable-bigdft --with-linalg-flavor=custom --with-linalg-incs="-I/usr/include/atlas" --with-linalg-libs="-L/usr/lib/atlas-base/atlas -llapack -lblas" --with-etsf-io-incs="-I/usr/include" --with-fft-incs="-I/usr/include" --enable-netcdf --with-netcdf-incs="-I/usr/include" --with-netcdf-libs="-L/usr/lib" --enable-gpu --with-gpu-prefix="/tmp/cuda" make mj4
make install TEMP=$PWD cd /opt cd $TEMP
Par défaut, la librairie Magma est installée dans /opt/magma/lib
et directement visible par le système : /etc/ld.so.conf.d/magma.conf
avec ce chemin.
Pour l'installation de Magma sous Debian Wheezy, le CBP propose cette documentation.
make distclean OMPI_CC=/usr/bin/gcc OMPI_CXX=/usr/bin/g++ OMPI_FC=/usr/bin/gfortran CFLAGS="-mtune=generic -O3 -mssse3" FCFLAGS="-mtune=generic -O3 -mssse3 -ffree-form -ffree-line-length-none" CXXFLAGS="-mtune=generic -O3 -mssse3" FC_LDFLAGS_EXTRA="-fopenmp" CC=mpicc.openmpi CXX=mpic++.openmpi FC=mpif90.openmpi ./configure --prefix=/opt/abinit-7.6.4-magma --enable-openmp --enable-mpi --enable-mpi-io --enable-mpi-trace --enable-64bit-flags --with-fft-flavor=fftw3-mpi --with-fft-libs="-L/usr/lib/x86_64-linux-gnu -lfftw3f -lfftw3_mpi -lfftw3f_threads -lfftw3_threads" --enable-bigdft --with-linalg-flavor="custom+magma" --with-linalg-incs="-I/opt/magma/include" --with-linalg-libs="-L/opt/magma/lib -lmagma" --with-etsf-io-incs="-I/usr/include" --with-fft-incs="-I/usr/include" --enable-netcdf --with-netcdf-incs="-I/usr/include" --with-netcdf-libs="-L/usr/lib" --enable-gpu --with-gpu-prefix="/tmp/cuda" make mj4
OMPI_CC=/usr/bin/gcc-4.7 OMPI_CXX=/usr/bin/g++-4.7 OMPI_FC=/usr/bin/gfortran-4.7 CFLAGS="-mtune=generic -O3 -mssse3" FCFLAGS="-mtune=generic -O3 -mssse3 -ffree-form -ffree-line-length-none" CXXFLAGS="-mtune=generic -O3 -mssse3" FC_LDFLAGS_EXTRA="-fopenmp" CC=mpicc.openmpi CXX=mpic++.openmpi FC=mpif90.openmpi ./configure --prefix=/opt/abinit-7.6.4 --enable-openmp --enable-mpi --enable-mpi-io --enable-mpi-trace --with-fft-flavor=fftw3-mpi --with-fft-libs="-L/usr/lib/i386-linux-gnu -lfftw3f -lfftw3_mpi -lfftw3f_threads -lfftw3_threads" --enable-bigdft --with-linalg-flavor=custom --with-linalg-incs="-I/usr/include/atlas" --with-linalg-libs="-L/usr/lib/atlas-base/atlas -llapack -lblas" --with-etsf-io-incs="-I/usr/include" --with-fft-incs="-I/usr/include" --enable-netcdf --with-netcdf-incs="-I/usr/include" --with-netcdf-libs="-L/usr/lib" time make mj4
make install TEMP=$PWD cd /opt [ -d abinit ] && rm abinit ln -s abinit-7.6.4 abinit cd $TEMP
cd tests make tests_bench
— Emmanuel Quemener 2014/05/06 10:32