Changeset 24593
- Timestamp:
- 02/26/20 22:46:55 (5 years ago)
- Location:
- issm/trunk-jpl
- Files:
-
- 65 added
- 30 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/externalpackages/boost/install-1.55-linux.sh
r23435 r24593 1 1 #!/bin/bash 2 #set -eu 3 #unhook set -eu because some target do fail and it is not a big deal 2 #set -eu # Do not `run set -eu` because it causes some targets to fail 4 3 5 #Note of caution: stop after boostrap phase, and run6 #bjam --debug-configuration, to figure out which paths boost is using to include7 #python. make sure everyone of these paths is covered by python. If not, just make8 #symlinks in externalpackages/python to what boost is expecting. Ther is NO WAY9 #to get the boost library to include python support without doing that.10 4 11 #Some cleanup 12 rm -rf install boost_1_55_0 src 5 # NOTE: 6 # - Stop after bootstrap step and run `bjam --debug-configuration` to figure 7 # out which paths Boost is using to include Python. Make sure that each of 8 # the listed paths is covered by Python. If not, you must create a symbolic 9 # link from $ISSM_DIR/externalpackages/python to the location of the file 10 # that Boost is expecting. There is no way to get the Boost to compile with 11 # Python otherwise. 12 # 13 14 ## Constants 15 # 16 VER="1_55_0" 17 18 ## Evnrionment 19 # 20 export CXXFLAGS='-std=c++98' # Setting CXXFLAGS to deal with C++11 incompatibility with Matlab's Boost 21 22 # Download source 23 $ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/boost_${VER}.tar.gz" "boost_${VER}.tar.gz" 24 25 # Unpack source 26 tar -zxvf boost_${VER}.tar.gz 27 28 # Cleanup 29 rm -rf install src 13 30 mkdir install src 14 31 15 #Download from ISSM server 16 $ISSM_DIR/scripts/DownloadExternalPackage.sh 'https://issm.ess.uci.edu/files/externalpackages/boost_1_55_0.tar.gz' 'boost_1_55_0.tar.gz' 32 # Move source into 'src' directory 33 mv boost_${VER}/* src/ 34 rm -rf boost_${VER} 17 35 18 # Untar19 tar -zxvf boost_1_55_0.tar.gz 36 # Copy customized source and configuration files to 'src' driectory 37 cp configs/1.55/linux/boost/multi_index/ordered_index.hpp src/boost/multi_index 20 38 21 #Move boost into install directory 22 mv boost_1_55_0/* src 23 rm -rf boost_1_55_0 39 # Configure 40 cd src 41 ./bootstrap.sh \ 42 --prefix="${ISSM_DIR}/externalpackages/boost/install" \ 43 --with-python=python2.7 \ 44 --with-python-root="${ISSM_DIR}/externalpackages/python/install" 24 45 25 # Setting CXXFLAGS to deal with C++11 incompatibility with Matlab's Boost26 export CXXFLAGS='-std=c++98' 46 # Modify project config to enable MPI 47 printf "\n# Enable MPI\nusing mpi ;\n" >> project-config.jam 27 48 28 #Configure and compile 29 cd src 30 ./bootstrap.sh \ 31 --prefix="$ISSM_DIR/externalpackages/boost/install" \ 32 --with-python=python2.7 \ 33 --with-python-root="$ISSM_DIR/externalpackages/python/install" 34 35 #Compile boost 49 # Compile and install 36 50 ./bjam install 37 51 38 # put bjam into install also:52 # Copy binary to install directory 39 53 mkdir ../install/bin 40 54 cp bjam ../install/bin -
issm/trunk-jpl/externalpackages/cmake/install.sh
r24518 r24593 1 1 #!/bin/bash 2 set -eu 2 set -eu 3 4 5 ## Constants 6 # 3 7 VER="3.16.2" 4 8 5 # Some cleanup6 rm -rf install cmake-$VER 9 # Download source 10 $ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/cmake-${VER}.tar.gz" "cmake-${VER}.tar.gz" 7 11 8 # Download from ISSM server9 $ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/cmake-$VER.tar.gz" "cmake-$VER.tar.gz" 12 # Unpack source 13 tar -zxvf cmake-${VER}.tar.gz 10 14 11 # Untar12 tar -zxvf cmake-$VER.tar.gz 15 # Cleanup 16 rm -rf install 13 17 14 # Move cmake into installdirectory15 mv cmake-$ VERinstall18 # Move source into 'install' directory 19 mv cmake-${VER} install 16 20 17 #Compile cmake 18 cd install 19 #./bootstrap --prefix=$ISSM_DIR/externalpackages/cmake/install #(Breaks on ronne) 20 ./configure --prefix=$ISSM_DIR/externalpackages/cmake/install 21 # Configure 22 cd install 23 #./bootstrap \ 24 # --prefix=${ISSM_DIR}/externalpackages/cmake/install # Breaks on ronne 25 ./configure \ 26 --prefix=${ISSM_DIR}/externalpackages/cmake/install 27 28 # Compile 21 29 if [ $# -eq 0 ]; then 22 30 make 23 else 24 make -j $1;31 else 32 make -j $1; 25 33 fi -
issm/trunk-jpl/externalpackages/lapack/install-3.8-linux.sh
r24330 r24593 10 10 VER="3.8.0" 11 11 12 ## Environment 13 # 14 export CC="${ISSM_DIR}/externalpackages/mpich/install/bin/mpicc" 15 export CXX="${ISSM_DIR}/externalpackages/mpich/install/bin/mpicxx" 16 export FC="${ISSM_DIR}/externalpackages/mpich/install/bin/mpif77" 17 12 18 # Download source 13 19 $ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/lapack-${VER}.tar.gz" "lapack-${VER}.tar.gz" 14 20 15 21 # Unpack source 16 tar -zxvf lapack-$ VER.tar.gz22 tar -zxvf lapack-${VER}.tar.gz 17 23 18 24 # Cleanup … … 21 27 22 28 # Move source to 'src' directory 23 mv lapack-$ VER/* src24 rm -rf lapack-$ VER29 mv lapack-${VER}/* src 30 rm -rf lapack-${VER} 25 31 26 32 # Configure -
issm/trunk-jpl/externalpackages/mpich/install-3.3.sh
r24418 r24593 11 11 12 12 # Unpack source 13 tar -zxvf mpich-$VER.tar.gz13 tar -zxvf mpich-${VER}.tar.gz 14 14 15 15 # Cleanup … … 18 18 19 19 # Move source into 'src' directory 20 mv mpich-$ VER/* src21 rm -rf mpich-$ VER20 mv mpich-${VER}/* src 21 rm -rf mpich-${VER} 22 22 23 23 # Configure … … 25 25 ./configure \ 26 26 --prefix="${ISSM_DIR}/externalpackages/mpich/install" \ 27 --enable-shared 27 --disable-static \ 28 --disable-dependency-tracking \ 29 --enable-fast=all 28 30 29 31 # Compile and install … … 35 37 make -j $1 install 36 38 fi 37 38 # Return to initial directory39 cd .. -
issm/trunk-jpl/jenkins/ross-debian_linux
r24420 r24593 1 #-------------------- -----------#2 # 1: ISSM general configuration #3 #-------------------- -----------#1 #--------------------# 2 # ISSM Configuration # 3 #--------------------# 4 4 5 # MATLAB path6 5 MATLAB_PATH="/usr/local/MATLAB/R2019b" 7 8 # ISSM CONFIGURATION9 6 ISSM_CONFIG='\ 10 --prefix=$ ISSM_DIR\7 --prefix=${ISSM_DIR} \ 11 8 --disable-static \ 12 --with-matlab-dir=$MATLAB_PATH \13 --with-fortran-lib="-L/usr/lib/gcc/x86_64-linux-gnu/8 -lgfortran" \14 --with-mpi-include=$ISSM_DIR/externalpackages/mpich/install/include \15 --with-mpi-libflags="-L${ISSM_DIR}/externalpackages/mpich/install/lib -lmpi -lmpicxx -lmpifort" \16 --with-blas-lapack-dir=$ISSM_DIR/externalpackages/lapack/install \17 --with-metis-dir=$ISSM_DIR/externalpackages/petsc/install \18 --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install \19 --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install \20 --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install \21 --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \22 --with-chaco-dir=$ISSM_DIR/externalpackages/chaco/install \23 --with-m1qn3-dir=$ISSM_DIR/externalpackages/m1qn3/install \24 --with-semic-dir=$ISSM_DIR/externalpackages/semic/install \25 --with-numthreads=4 \26 9 --enable-development \ 27 10 --enable-debugging \ 11 --with-numthreads=4 \ 12 --with-matlab-dir=${MATLAB_PATH} \ 13 --with-fortran-lib="-L/usr/lib/gcc/x86_64-linux-gnu/8 -lgfortran" \ 14 --with-mpi-include=${ISSM_DIR}/externalpackages/mpich/install/include \ 15 --with-mpi-libflags="-L${ISSM_DIR}/externalpackages/mpich/install/lib -lmpi -lmpicxx -lmpifort" \ 16 --with-blas-lapack-dir=${ISSM_DIR}/externalpackages/lapack/install \ 17 --with-metis-dir=${ISSM_DIR}/externalpackages/petsc/install \ 18 --with-scalapack-dir=${ISSM_DIR}/externalpackages/petsc/install \ 19 --with-mumps-dir=${ISSM_DIR}/externalpackages/petsc/install \ 20 --with-petsc-dir=${ISSM_DIR}/externalpackages/petsc/install \ 21 --with-triangle-dir=${ISSM_DIR}/externalpackages/triangle/install \ 22 --with-chaco-dir=${ISSM_DIR}/externalpackages/chaco/install \ 23 --with-m1qn3-dir=${ISSM_DIR}/externalpackages/m1qn3/install \ 24 --with-semic-dir=${ISSM_DIR}/externalpackages/semic/install \ 28 25 ' 26 27 #-------------------# 28 # External Packages # 29 #-------------------# 30 31 EXTERNALPACKAGES=" 32 autotools install-debian-linux.sh 33 cmake install.sh 34 mpich install-3.3.sh 35 lapack install-3.8-linux.sh 36 petsc install-3.7-linux.sh 37 triangle install-linux.sh 38 chaco install.sh 39 m1qn3 install.sh 40 semic install.sh 41 shell2junit install.sh 42 " 43 44 #---------# 45 # Testing # 46 #---------# 29 47 30 48 # Test suites … … 33 51 JAVASCRIPT_TEST=0 34 52 EXAMPLES_TEST=0 35 36 #-----------------------------------#37 # 3: External packages installation #38 #-----------------------------------#39 40 # List of external packages to be installed and their installation scripts41 #42 EXTERNALPACKAGES="43 autotools install-debian.sh44 cmake install.sh45 mpich install-3.3.sh46 lapack install-3.8-linux.sh47 petsc install-3.7-linux.sh48 triangle install-linux64.sh49 chaco install.sh50 m1qn3 install.sh51 semic install.sh52 shell2junit install.sh53 "54 55 #-----------------#56 # 4: test options #57 #-----------------#58 53 59 54 # Number of CPUs used in ISSM compilation -
issm/trunk-jpl/jenkins/ross-debian_linux-adolc-ampioff
r24420 r24593 1 #-------------------- -----------#2 # 1: ISSM general configuration #3 #-------------------- -----------#1 #--------------------# 2 # ISSM Configuration # 3 #--------------------# 4 4 5 #MATLAB path6 5 MATLAB_PATH="/usr/local/MATLAB/R2019b" 7 8 #ISSM CONFIGURATION9 6 ISSM_CONFIG='\ 10 --prefix=$ ISSM_DIR\7 --prefix=${ISSM_DIR} \ 11 8 --disable-static \ 9 --enable-development \ 10 --enable-debugging \ 11 --with-numthreads=4 \ 12 12 --without-kriging \ 13 13 --without-kml \ 14 14 --without-GiaIvins \ 15 15 --without-Love \ 16 --with-matlab-dir=$ MATLAB_PATH\16 --with-matlab-dir=${MATLAB_PATH} \ 17 17 --with-python-dir=/usr \ 18 18 --with-python-numpy-dir=/usr/local/lib/python2.7/dist-packages/numpy \ 19 19 --with-fortran-lib="-L/usr/lib/gcc/x86_64-linux-gnu/8 -lgfortran" \ 20 --with-mpi-include=$ISSM_DIR/externalpackages/mpich/install/include \ 21 --with-mpi-libflags="-L$ISSM_DIR/externalpackages/mpich/install/lib -lmpi -lmpicxx -lmpifort" \ 22 --with-metis-dir=$ISSM_DIR/externalpackages/petsc/install \ 23 --with-blas-lapack-dir=$ISSM_DIR/externalpackages/lapack/install \ 24 --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install \ 25 --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install \ 26 --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \ 27 --with-gsl-dir=$ISSM_DIR/externalpackages/gsl/install \ 28 --with-adolc-dir=$ISSM_DIR/externalpackages/adolc/install \ 29 --with-numthreads=4 \ 30 --enable-development \ 31 --enable-debugging \ 20 --with-mpi-include=${ISSM_DIR}/externalpackages/mpich/install/include \ 21 --with-mpi-libflags="-L${ISSM_DIR}/externalpackages/mpich/install/lib -lmpi -lmpicxx -lmpifort" \ 22 --with-metis-dir=${ISSM_DIR}/externalpackages/petsc/install \ 23 --with-blas-lapack-dir=${ISSM_DIR}/externalpackages/lapack/install \ 24 --with-scalapack-dir=${ISSM_DIR}/externalpackages/petsc/install \ 25 --with-mumps-dir=${ISSM_DIR}/externalpackages/petsc/install \ 26 --with-triangle-dir=${ISSM_DIR}/externalpackages/triangle/install \ 27 --with-gsl-dir=${ISSM_DIR}/externalpackages/gsl/install \ 28 --with-adolc-dir=${ISSM_DIR}/externalpackages/adolc/install \ 32 29 ' 30 31 #-------------------# 32 # External Packages # 33 #-------------------# 34 35 # NOTE: The PETSc libraries are compiled but not used as they conflict with 36 # ADOL-C: PETSc is really just being used as an installer for other 37 # external packages. 38 # 39 EXTERNALPACKAGES=" 40 autotools install-debian-linux.sh 41 cmake install.sh 42 mpich install-3.3.sh 43 lapack install-3.8-linux.sh 44 petsc install-3.7-linux.sh 45 triangle install-linux.sh 46 gsl install-linux64.sh 47 adolc install.sh 48 shell2junit install.sh 49 " 50 51 #---------# 52 # Testing # 53 #---------# 33 54 34 55 # Test suites … … 37 58 JAVASCRIPT_TEST=0 38 59 EXAMPLES_TEST=0 39 40 #-----------------------------------#41 # 3: External packages installation #42 #-----------------------------------#43 44 #List of external pakages to be installed and their installation scripts45 #46 # NOTE: The PETSc libraries are compiled but not used as they conflict with47 # ADOL-C: PETSc is really just being used as an installer for other48 # external packages.49 EXTERNALPACKAGES="50 autotools install-debian.sh51 cmake install.sh52 mpich install-3.3.sh53 lapack install-3.8-linux.sh54 petsc install-3.7-linux.sh55 triangle install-linux64.sh56 gsl install-linux64.sh57 adolc install.sh58 shell2junit install.sh59 "60 61 #-----------------#62 # 4: test options #63 #-----------------#64 60 65 61 # Number of CPUs used in ISSM compilation -
issm/trunk-jpl/jenkins/ross-debian_linux-adolc-ampion
r24420 r24593 1 #-------------------- -----------#2 # 1: ISSM general configuration #3 #-------------------- -----------#1 #--------------------# 2 # ISSM Configuration # 3 #--------------------# 4 4 5 #MATLAB path6 5 MATLAB_PATH="/usr/local/MATLAB/R2019b" 7 8 #ISSM CONFIGURATION9 6 ISSM_CONFIG='\ 10 --prefix=$ ISSM_DIR\7 --prefix=${ISSM_DIR} \ 11 8 --disable-static \ 9 --enable-development \ 10 --enable-debugging \ 11 --with-numthreads=4 \ 12 12 --without-kriging \ 13 13 --without-kml \ 14 14 --without-GiaIvins \ 15 15 --without-Love \ 16 --with-matlab-dir=$ MATLAB_PATH\16 --with-matlab-dir=${MATLAB_PATH} \ 17 17 --with-python-dir=/usr \ 18 18 --with-python-numpy-dir=/usr/local/lib/python2.7/dist-packages/numpy \ 19 19 --with-fortran-lib="-L/usr/lib/gcc/x86_64-linux-gnu/8 -lgfortran" \ 20 --with-mpi-include=$ISSM_DIR/externalpackages/mpich/install/include \ 21 --with-mpi-libflags="-L$ISSM_DIR/externalpackages/mpich/install/lib -lmpi -lmpicxx -lmpifort" \ 22 --with-ampi-dir=$ISSM_DIR/externalpackages/adjoinablempi/install \ 23 --with-metis-dir=$ISSM_DIR/externalpackages/petsc/install \ 24 --with-blas-lapack-dir=$ISSM_DIR/externalpackages/lapack/install \ 25 --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install \ 26 --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install \ 27 --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \ 28 --with-gsl-dir=$ISSM_DIR/externalpackages/gsl/install \ 29 --with-adolc-dir=$ISSM_DIR/externalpackages/adolc/install \ 30 --with-numthreads=4 \ 31 --enable-development \ 32 --enable-debugging \ 20 --with-mpi-include=${ISSM_DIR}/externalpackages/mpich/install/include \ 21 --with-mpi-libflags="-L${ISSM_DIR}/externalpackages/mpich/install/lib -lmpi -lmpicxx -lmpifort" \ 22 --with-ampi-dir=${ISSM_DIR}/externalpackages/adjoinablempi/install \ 23 --with-metis-dir=${ISSM_DIR}/externalpackages/petsc/install \ 24 --with-blas-lapack-dir=${ISSM_DIR}/externalpackages/lapack/install \ 25 --with-scalapack-dir=${ISSM_DIR}/externalpackages/petsc/install \ 26 --with-mumps-dir=${ISSM_DIR}/externalpackages/petsc/install \ 27 --with-triangle-dir=${ISSM_DIR}/externalpackages/triangle/install \ 28 --with-gsl-dir=${ISSM_DIR}/externalpackages/gsl/install \ 29 --with-adolc-dir=${ISSM_DIR}/externalpackages/adolc/install \ 33 30 ' 31 32 #-------------------# 33 # External Packages # 34 #-------------------# 35 36 # NOTE: The PETSc libraries are compiled but not used as they conflict with 37 # ADOL-C: PETSc is really just being used as an installer for other 38 # external packages. 39 # 40 EXTERNALPACKAGES=" 41 autotools install-debian-linux.sh 42 cmake install.sh 43 mpich install-3.3.sh 44 lapack install-3.8-linux.sh 45 petsc install-3.7-linux.sh 46 triangle install-linux.sh 47 gsl install-linux64.sh 48 adjoinablempi install.sh 49 adolc install-withampi.sh 50 shell2junit install.sh 51 " 52 53 #---------# 54 # Testing # 55 #---------# 34 56 35 57 # PYTHON and MATLAB testing … … 38 60 JAVASCRIPT_TEST=0 39 61 EXAMPLES_TEST=0 40 41 #-----------------------------------#42 # 3: External packages installation #43 #-----------------------------------#44 45 #List of external pakages to be installed and their installation scripts46 #47 # NOTE: The PETSc libraries are compiled but not used as they conflict with48 # ADOL-C: PETSc is really just being used as an installer for other49 # external packages.50 EXTERNALPACKAGES="51 autotools install-debian.sh52 cmake install.sh53 mpich install-3.3.sh54 lapack install-3.8-linux.sh55 petsc install-3.7-linux.sh56 triangle install-linux64.sh57 gsl install-linux64.sh58 adjoinablempi install.sh59 adolc install-withampi.sh60 shell2junit install.sh61 "62 63 #-----------------#64 # 4: test options #65 #-----------------#66 62 67 63 # Number of CPUs used in ISSM compilation -
issm/trunk-jpl/jenkins/ross-debian_linux-codipack
r24526 r24593 1 #-------------------- -----------#2 # 1: ISSM general configuration #3 #-------------------- -----------#1 #--------------------# 2 # ISSM Configuration # 3 #--------------------# 4 4 5 # MATLAB path6 5 MATLAB_PATH="/usr/local/MATLAB/R2019b" 7 8 # ISSM CONFIGURATION9 6 ISSM_CONFIG='\ 10 --prefix=$ISSM_DIR \ 7 --prefix=${ISSM_DIR} \ 8 --enable-tape-alloc \ 9 --enable-development \ 10 --enable-debugging \ 11 --with-numthreads=4 \ 11 12 --without-kriging \ 12 13 --without-kml \ 13 14 --without-GiaIvins \ 14 15 --without-Love \ 15 --with-matlab-dir=$ MATLAB_PATH\16 --with-matlab-dir=${MATLAB_PATH} \ 16 17 --with-fortran-lib="-L/usr/lib/gcc/x86_64-linux-gnu/8 -lgfortran" \ 17 --with-mpi-libflags="-L$ISSM_DIR/externalpackages/mpich/install/lib -lmpi -lmpicxx -lmpifort" \ 18 --with-mpi-include=$ISSM_DIR/externalpackages/mpich/install/include \ 19 --with-blas-lapack-dir=$ISSM_DIR/externalpackages/lapack/install \ 20 --with-metis-dir=$ISSM_DIR/externalpackages/petsc/install \ 21 --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install \ 22 --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install \ 23 --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \ 24 --with-chaco-dir=$ISSM_DIR/externalpackages/chaco/install \ 25 --with-m1qn3-dir=$ISSM_DIR/externalpackages/m1qn3/install \ 26 --with-semic-dir=$ISSM_DIR/externalpackages/semic/install \ 27 --with-gsl-dir=$ISSM_DIR/externalpackages/gsl/install \ 28 --with-medipack-dir="$ISSM_DIR/externalpackages/medipack/install" \ 29 --with-codipack-dir="$ISSM_DIR/externalpackages/codipack/install" \ 30 --with-numthreads=4 \ 31 --enable-tape-alloc \ 32 --enable-development \ 33 --enable-debugging \ 18 --with-mpi-libflags="-L${ISSM_DIR}/externalpackages/mpich/install/lib -lmpi -lmpicxx -lmpifort" \ 19 --with-mpi-include=${ISSM_DIR}/externalpackages/mpich/install/include \ 20 --with-blas-lapack-dir=${ISSM_DIR}/externalpackages/lapack/install \ 21 --with-metis-dir=${ISSM_DIR}/externalpackages/petsc/install \ 22 --with-scalapack-dir=${ISSM_DIR}/externalpackages/petsc/install \ 23 --with-mumps-dir=${ISSM_DIR}/externalpackages/petsc/install \ 24 --with-triangle-dir=${ISSM_DIR}/externalpackages/triangle/install \ 25 --with-chaco-dir=${ISSM_DIR}/externalpackages/chaco/install \ 26 --with-m1qn3-dir=${ISSM_DIR}/externalpackages/m1qn3/install \ 27 --with-semic-dir=${ISSM_DIR}/externalpackages/semic/install \ 28 --with-gsl-dir=${ISSM_DIR}/externalpackages/gsl/install \ 29 --with-medipack-dir="${ISSM_DIR}/externalpackages/medipack/install" \ 30 --with-codipack-dir="${ISSM_DIR}/externalpackages/codipack/install" \ 34 31 ' 35 32 36 # Test suites 37 MATLAB_TEST=1 38 PYTHON_TEST=0 39 JAVASCRIPT_TEST=0 40 EXAMPLES_TEST=0 33 #-------------------# 34 # External Packages # 35 #-------------------# 41 36 42 #-----------------------------------#43 # 3: External packages installation #44 #-----------------------------------#45 46 #List of external pakages to be installed and their installation scripts47 37 EXTERNALPACKAGES=" 48 autotools install-debian .sh38 autotools install-debian-linux.sh 49 39 cmake install.sh 50 40 mpich install-3.3.sh 51 41 lapack install-3.8-linux.sh 52 42 petsc install-3.7-linux.sh 53 triangle install-linux 64.sh43 triangle install-linux.sh 54 44 chaco install.sh 55 45 m1qn3 install.sh … … 61 51 " 62 52 63 #-----------------# 64 # 4: test options # 65 #-----------------# 53 #---------# 54 # Testing # 55 #---------# 56 57 # Test suites 58 MATLAB_TEST=1 59 PYTHON_TEST=0 60 JAVASCRIPT_TEST=0 61 EXAMPLES_TEST=0 66 62 67 63 # Number of CPUs used in ISSM compilation -
issm/trunk-jpl/jenkins/ross-debian_linux-dakota
r24526 r24593 1 #-------------------- -----------#2 # 1: ISSM general configuration #3 #-------------------- -----------#1 #--------------------# 2 # ISSM Configuration # 3 #--------------------# 4 4 5 #MATLAB path6 5 MATLAB_PATH="/usr/local/MATLAB/R2019b" 7 8 #ISSM CONFIGURATION9 6 ISSM_CONFIG='\ 10 --prefix=$ ISSM_DIR\7 --prefix=${ISSM_DIR} \ 11 8 --disable-static \ 12 --with-matlab-dir=$MATLAB_PATH \ 9 --enable-development \ 10 --enable-debugging \ 11 --with-cxxoptflags="-std=c++11" \ 12 --with-pic \ 13 --with-numthreads=4 \ 14 --with-matlab-dir=${MATLAB_PATH} \ 13 15 --with-python-dir=/usr \ 14 16 --with-python-numpy-dir=/usr/local/lib/python2.7/dist-packages/numpy \ 15 17 --with-fortran-lib="-L/usr/lib/gcc/x86_64-linux-gnu/8 -lgfortran" \ 16 --with-mpi-include=$ISSM_DIR/externalpackages/mpich/install/include \ 17 --with-mpi-libflags="-L$ISSM_DIR/externalpackages/mpich/install/lib -lmpi -lmpicxx -lmpifort" \ 18 --with-blas-lapack-dir=$ISSM_DIR/externalpackages/lapack/install \ 19 --with-metis-dir=$ISSM_DIR/externalpackages/petsc/install \ 20 --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install \ 21 --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install \ 22 --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install \ 23 --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \ 24 --with-chaco-dir=$ISSM_DIR/externalpackages/chaco/install \ 25 --with-dakota-dir=$ISSM_DIR/externalpackages/dakota/install \ 26 --with-boost-dir=$ISSM_DIR/externalpackages/boost/install \ 27 --with-cxxoptflags="-std=c++11" \ 28 --with-m1qn3-dir=$ISSM_DIR/externalpackages/m1qn3/install \ 29 --with-numthreads=4 \ 30 --enable-development \ 31 --enable-debugging \ 18 --with-mpi-include=${ISSM_DIR}/externalpackages/mpich/install/include \ 19 --with-mpi-libflags="-L${ISSM_DIR}/externalpackages/mpich/install/lib -lmpi -lmpicxx -lmpifort" \ 20 --with-blas-lapack-dir=${ISSM_DIR}/externalpackages/lapack/install \ 21 --with-metis-dir=${ISSM_DIR}/externalpackages/petsc/install \ 22 --with-scalapack-dir=${ISSM_DIR}/externalpackages/petsc/install \ 23 --with-mumps-dir=${ISSM_DIR}/externalpackages/petsc/install \ 24 --with-petsc-dir=${ISSM_DIR}/externalpackages/petsc/install \ 25 --with-dakota-dir=${ISSM_DIR}/externalpackages/dakota/install \ 26 --with-boost-dir=${ISSM_DIR}/externalpackages/boost/install \ 27 --with-triangle-dir=${ISSM_DIR}/externalpackages/triangle/install \ 28 --with-chaco-dir=${ISSM_DIR}/externalpackages/chaco/install \ 29 --with-m1qn3-dir=${ISSM_DIR}/externalpackages/m1qn3/install \ 30 --with-semic-dir=${ISSM_DIR}/externalpackages/semic/install \ 32 31 ' 32 33 #-------------------# 34 # External Packages # 35 #-------------------# 36 37 EXTERNALPACKAGES=" 38 autotools install-debian-linux.sh 39 cmake install.sh 40 mpich install-3.3.sh 41 lapack install-3.8-linux.sh 42 petsc install-3.7-linux.sh 43 boost install-1.55-linux.sh 44 dakota install-6.2-linux.sh 45 triangle install-linux.sh 46 chaco install.sh 47 m1qn3 install.sh 48 semic install.sh 49 shell2junit install.sh 50 " 51 52 #---------# 53 # Testing # 54 #---------# 33 55 34 56 # Test suites … … 37 59 JAVASCRIPT_TEST=0 38 60 EXAMPLES_TEST=0 39 40 #-----------------------------------#41 # 3: External packages installation #42 #-----------------------------------#43 44 #List of external pakages to be installed and their installation scripts45 EXTERNALPACKAGES="46 autotools install-debian.sh47 cmake install.sh48 mpich install-3.3.sh49 lapack install-3.8-linux.sh50 petsc install-3.7-linux.sh51 triangle install-linux64.sh52 boost install-1.55-linux.sh53 dakota install-6.2-linux64.sh54 chaco install.sh55 m1qn3 install.sh56 shell2junit install.sh57 "58 59 #-----------------#60 # 4: test options #61 #-----------------#62 61 63 62 # Number of CPUs used in ISSM compilation -
issm/trunk-jpl/jenkins/ross-debian_linux-gia
r24526 r24593 1 #-------------------- -----------#2 # 1: ISSM general configuration #3 #-------------------- -----------#1 #--------------------# 2 # ISSM Configuration # 3 #--------------------# 4 4 5 #MATLAB path6 5 MATLAB_PATH="/usr/local/MATLAB/R2019b" 7 8 #ISSM CONFIGURATION9 6 ISSM_CONFIG='\ 10 --prefix=$ ISSM_DIR\7 --prefix=${ISSM_DIR} \ 11 8 --disable-static \ 12 --with-matlab-dir=$MATLAB_PATH \ 9 --enable-development \ 10 --enable-debugging \ 11 --with-gia=yes \ 12 --with-numthreads=4 13 --with-matlab-dir=${MATLAB_PATH} \ 13 14 --with-python-dir=/usr \ 14 15 --with-python-numpy-dir=/usr/lib/python2.7/dist-packages/numpy \ 15 16 --with-fortran-lib="-L/usr/lib/gcc/x86_64-linux-gnu/8 -lgfortran" \ 16 --with-mpi-include=$ISSM_DIR/externalpackages/mpich/install/include \ 17 --with-mpi-libflags="-L$ISSM_DIR/externalpackages/mpich/install/lib -lmpi -lmpicxx -lmpifort" \ 18 --with-blas-lapack-dir=$ISSM_DIR/externalpackages/lapack/install \ 19 --with-metis-dir=$ISSM_DIR/externalpackages/petsc/install \ 20 --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install \ 21 --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install \ 22 --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install \ 23 --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \ 24 --with-math77-dir=$ISSM_DIR/externalpackages/math77/install \ 25 --with-gia=yes \ 26 --with-numthreads=4 \ 27 --enable-development \ 28 --enable-debugging \ 17 --with-mpi-include=${ISSM_DIR}/externalpackages/mpich/install/include \ 18 --with-mpi-libflags="-L${ISSM_DIR}/externalpackages/mpich/install/lib -lmpi -lmpicxx -lmpifort" \ 19 --with-blas-lapack-dir=${ISSM_DIR}/externalpackages/lapack/install \ 20 --with-metis-dir=${ISSM_DIR}/externalpackages/petsc/install \ 21 --with-scalapack-dir=${ISSM_DIR}/externalpackages/petsc/install \ 22 --with-mumps-dir=${ISSM_DIR}/externalpackages/petsc/install \ 23 --with-petsc-dir=${ISSM_DIR}/externalpackages/petsc/install \ 24 --with-triangle-dir=${ISSM_DIR}/externalpackages/triangle/install \ 25 --with-math77-dir=${ISSM_DIR}/externalpackages/math77/install \ 29 26 ' 27 28 #-------------------# 29 # External Packages # 30 #-------------------# 31 32 EXTERNALPACKAGES=" 33 autotools install-debian-linux.sh 34 cmake install.sh 35 mpich install-3.3.sh 36 lapack install-3.8-linux.sh 37 petsc install-3.7-linux.sh 38 triangle install-linux.sh 39 math77 install.sh 40 gmsh install.sh 41 shell2junit install.sh 42 " 43 44 #---------# 45 # Testing # 46 #---------# 30 47 31 48 # Test suites … … 34 51 JAVASCRIPT_TEST=0 35 52 EXAMPLES_TEST=0 36 37 #-----------------------------------#38 # 3: External packages installation #39 #-----------------------------------#40 41 #List of external pakages to be installed and their installation scripts42 EXTERNALPACKAGES="43 autotools install-debian.sh44 cmake install.sh45 mpich install-3.3.sh46 lapack install-3.8-linux.sh47 petsc install-3.7-linux.sh48 triangle install-linux64.sh49 math77 install.sh50 gmsh install.sh51 shell2junit install.sh52 "53 54 #-----------------#55 # 4: test options #56 #-----------------#57 53 58 54 # Number of CPUs used in ISSM compilation -
issm/trunk-jpl/jenkins/ross-debian_linux-iceocean
r24534 r24593 1 #-------------------- -----------#2 # 1: ISSM general configuration #3 #-------------------- -----------#1 #--------------------# 2 # ISSM Configuration # 3 #--------------------# 4 4 5 # MATLAB path6 5 MATLAB_PATH="/usr/local/MATLAB/R2019b" 7 8 # ISSM CONFIGURATION9 6 ISSM_CONFIG='\ 10 --prefix=$ ISSM_DIR\7 --prefix=${ISSM_DIR} \ 11 8 --disable-static \ 12 --with-ocean \13 --with-matlab-dir=$MATLAB_PATH \14 --with-fortran-lib="-L/usr/lib/gcc/x86_64-linux-gnu/8 -lgfortran" \15 --with-mpi-include=$ISSM_DIR/externalpackages/mpich/install/include \16 --with-mpi-libflags="-L${ISSM_DIR}/externalpackages/mpich/install/lib -lmpi -lmpicxx -lmpifort" \17 --with-blas-lapack-dir=$ISSM_DIR/externalpackages/lapack/install \18 --with-metis-dir=$ISSM_DIR/externalpackages/petsc/install \19 --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install \20 --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install \21 --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install \22 --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \23 --with-chaco-dir=$ISSM_DIR/externalpackages/chaco/install \24 --with-m1qn3-dir=$ISSM_DIR/externalpackages/m1qn3/install \25 --with-semic-dir=$ISSM_DIR/externalpackages/semic/install \26 --with-numthreads=4 \27 9 --enable-development \ 28 10 --enable-debugging \ 11 --with-ocean \ 12 --with-numthreads=4 \ 13 --with-matlab-dir=${MATLAB_PATH} \ 14 --with-fortran-lib="-L/usr/lib/gcc/x86_64-linux-gnu/8 -lgfortran" \ 15 --with-mpi-include=${ISSM_DIR}/externalpackages/mpich/install/include \ 16 --with-mpi-libflags="-L${ISSM_DIR}/externalpackages/mpich/install/lib -lmpi -lmpicxx -lmpifort" \ 17 --with-blas-lapack-dir=${ISSM_DIR}/externalpackages/lapack/install \ 18 --with-metis-dir=${ISSM_DIR}/externalpackages/petsc/install \ 19 --with-scalapack-dir=${ISSM_DIR}/externalpackages/petsc/install \ 20 --with-mumps-dir=${ISSM_DIR}/externalpackages/petsc/install \ 21 --with-petsc-dir=${ISSM_DIR}/externalpackages/petsc/install \ 22 --with-triangle-dir=${ISSM_DIR}/externalpackages/triangle/install \ 23 --with-chaco-dir=${ISSM_DIR}/externalpackages/chaco/install \ 24 --with-m1qn3-dir=${ISSM_DIR}/externalpackages/m1qn3/install \ 25 --with-semic-dir=${ISSM_DIR}/externalpackages/semic/install \ 29 26 ' 27 28 #-------------------# 29 # External Packages # 30 #-------------------# 31 32 EXTERNALPACKAGES=" 33 autotools install-debian-linux.sh 34 cmake install.sh 35 mpich install-3.3.sh 36 lapack install-3.8-linux.sh 37 petsc install-3.7-linux.sh 38 triangle install-linux.sh 39 chaco install.sh 40 m1qn3 install.sh 41 semic install.sh 42 shell2junit install.sh 43 " 44 45 #---------# 46 # Testing # 47 #---------# 30 48 31 49 # Test suites … … 34 52 JAVASCRIPT_TEST=0 35 53 EXAMPLES_TEST=0 36 37 #-----------------------------------#38 # 3: External packages installation #39 #-----------------------------------#40 41 #List of external pakages to be installed and their installation scripts42 EXTERNALPACKAGES="43 autotools install-debian.sh44 cmake install.sh45 mpich install-3.3.sh46 lapack install-3.8-linux.sh47 petsc install-3.7-linux.sh48 triangle install-linux64.sh49 chaco install.sh50 m1qn3 install.sh51 semic install.sh52 shell2junit install.sh53 "54 55 #-----------------#56 # 4: test options #57 #-----------------#58 54 59 55 # Number of CPUs used in ISSM compilation -
issm/trunk-jpl/jenkins/ross-debian_linux-javascript
r24412 r24593 1 #-------------------- -----------#2 # 1: ISSM general configuration #3 #-------------------- -----------#1 #--------------------# 2 # ISSM Configuration # 3 #--------------------# 4 4 5 # ISSM CONFIGURATION6 5 ISSM_CONFIG='\ 7 --prefix=$ ISSM_DIR\6 --prefix=${ISSM_DIR} \ 8 7 --disable-shared \ 8 --enable-development \ 9 --enable-debugging \ 9 10 --with-javascript \ 10 11 --without-fortran \ … … 13 14 --without-kml \ 14 15 --without-kriging \ 15 --with-gsl-dir="$ ISSM_DIR/externalpackages/gsl/install-javascript" \16 --with-gsl-dir="${ISSM_DIR}/externalpackages/gsl/install-javascript" \ 16 17 --with-triangle-dir="${ISSM_DIR}/externalpackages/triangle/install-javascript" \ 17 18 ' 19 20 #-------------------# 21 # External Packages # 22 #-------------------# 23 24 EXTERNALPACKAGES=" 25 autotools install-debian-linux.sh 26 cmake install.sh 27 emscripten install.sh 28 gsl install-javascript.sh 29 triangle install-javascript.sh 30 shell2junit install.sh 31 " 32 33 #---------# 34 # Testing # 35 #---------# 18 36 19 37 # Test suites … … 23 41 EXAMPLES_TEST=0 24 42 25 #-----------------------------------#26 # 3: External packages installation #27 #-----------------------------------#28 29 #List of external pakages to be installed and their installation scripts30 EXTERNALPACKAGES="31 autotools install-debian.sh32 cmake install.sh33 emscripten install.sh34 gsl install-javascript.sh35 triangle install-javascript.sh36 shell2junit install.sh37 "38 39 #-----------------#40 # 4: test options #41 #-----------------#42 43 43 # Number of CPUs used in ISSM compilation 44 44 # 45 45 # NOTE: One is usually safer as some packages are very sensitive to parallel 46 # 46 # compilation. 47 47 # 48 48 NUMCPUS_INSTALL=8 -
issm/trunk-jpl/jenkins/ross-debian_linux-python
r24420 r24593 1 #-------------------- -----------#2 # 1: ISSM general configuration #3 #-------------------- -----------#1 #--------------------# 2 # ISSM Configuration # 3 #--------------------# 4 4 5 #ISSM CONFIGURATION6 5 ISSM_CONFIG='\ 7 --prefix=$ ISSM_DIR\6 --prefix=${ISSM_DIR} \ 8 7 --disable-static \ 8 --enable-development \ 9 --enable-debugging \ 10 --with-numthreads=4 \ 9 11 --with-python-dir=/usr \ 10 12 --with-python-numpy-dir=/usr/local/lib/python2.7/dist-packages/numpy \ 11 13 --with-fortran-lib="-L/usr/lib/gcc/x86_64-linux-gnu/8 -lgfortran" \ 12 --with-mpi-include=$ ISSM_DIR/externalpackages/mpich/install/include \14 --with-mpi-include=${ISSM_DIR}/externalpackages/mpich/install/include \ 13 15 --with-mpi-libflags="-L${ISSM_DIR}/externalpackages/mpich/install/lib -lmpi -lmpicxx -lmpifort" \ 14 --with-blas-lapack-dir=$ISSM_DIR/externalpackages/lapack/install \ 15 --with-metis-dir=$ISSM_DIR/externalpackages/petsc/install \ 16 --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install \ 17 --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install \ 18 --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install \ 19 --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \ 20 --with-chaco-dir=$ISSM_DIR/externalpackages/chaco/install \ 21 --with-m1qn3-dir=$ISSM_DIR/externalpackages/m1qn3/install \ 22 --with-semic-dir=$ISSM_DIR/externalpackages/semic/install \ 23 --with-numthreads=4 \ 24 --enable-development \ 25 --enable-debugging \ 16 --with-blas-lapack-dir=${ISSM_DIR}/externalpackages/lapack/install \ 17 --with-metis-dir=${ISSM_DIR}/externalpackages/petsc/install \ 18 --with-scalapack-dir=${ISSM_DIR}/externalpackages/petsc/install \ 19 --with-mumps-dir=${ISSM_DIR}/externalpackages/petsc/install \ 20 --with-petsc-dir=${ISSM_DIR}/externalpackages/petsc/install \ 21 --with-triangle-dir=${ISSM_DIR}/externalpackages/triangle/install \ 22 --with-chaco-dir=${ISSM_DIR}/externalpackages/chaco/install \ 23 --with-m1qn3-dir=${ISSM_DIR}/externalpackages/m1qn3/install \ 24 --with-semic-dir=${ISSM_DIR}/externalpackages/semic/install \ 26 25 ' 26 27 #-------------------# 28 # External Packages # 29 #-------------------# 30 31 # TODO: 32 # - After upgrading Jenkins nodes to Ubuntu 18, use MPICH 3.3 and PETSc 3.11 33 # (which will install zlib, HDF5, and NetCDF). 34 # 35 EXTERNALPACKAGES=" 36 autotools install-debian-linux.sh 37 cmake install.sh 38 mpich install-3.3.sh 39 lapack install-3.8-linux.sh 40 petsc install-3.7-linux.sh 41 triangle install-linux.sh 42 chaco install.sh 43 m1qn3 install.sh 44 semic install.sh 45 shell2junit install.sh 46 " 47 48 #---------# 49 # Testing # 50 #---------# 27 51 28 52 # Test suites … … 31 55 JAVASCRIPT_TEST=0 32 56 EXAMPLES_TEST=0 33 34 #-----------------------------------#35 # 3: External packages installation #36 #-----------------------------------#37 38 # List of external packages to be installed and their installation scripts39 #40 # TODO:41 # - After upgrading Jenkins nodes to Ubuntu 18, use MPICH 3.3 and PETSc 3.1142 # (which will install zlib, HDF5, and NetCDF).43 #44 EXTERNALPACKAGES="45 autotools install-debian.sh46 cmake install.sh47 mpich install-3.3.sh48 lapack install-3.8-linux.sh49 petsc install-3.7-linux.sh50 triangle install-linux64.sh51 chaco install.sh52 m1qn3 install.sh53 semic install.sh54 shell2junit install.sh55 "56 57 #-----------------#58 # 4: test options #59 #-----------------#60 57 61 58 # Number of CPUs used in ISSM compilation -
issm/trunk-jpl/jenkins/ross-debian_linux-solid_earth
r24523 r24593 1 #-------------------- -----------#2 # 1: ISSM general configuration #3 #-------------------- -----------#1 #--------------------# 2 # ISSM Configuration # 3 #--------------------# 4 4 5 #MATLAB path6 5 MATLAB_PATH="/usr/local/MATLAB/R2019b" 7 8 #ISSM CONFIGURATION9 6 ISSM_CONFIG='\ 10 --prefix=$ ISSM_DIR\7 --prefix=${ISSM_DIR} \ 11 8 --disable-static \ 12 --with-matlab-dir=$MATLAB_PATH \ 9 --enable-development \ 10 --enable-debugging \ 11 --with-numthreads=4 \ 12 --with-matlab-dir=${MATLAB_PATH} \ 13 13 --with-python-dir=/usr \ 14 14 --with-python-numpy-dir=/usr/local/lib/python2.7/dist-packages/numpy \ 15 15 --with-fortran-lib="-L/usr/lib/gcc/x86_64-linux-gnu/8 -lgfortran" \ 16 --with-mpi-include=$ ISSM_DIR/externalpackages/mpich/install/include \16 --with-mpi-include=${ISSM_DIR}/externalpackages/mpich/install/include \ 17 17 --with-mpi-libflags="-L${ISSM_DIR}/externalpackages/mpich/install/lib -lmpi -lmpicxx -lmpifort" \ 18 --with-blas-lapack-dir=$ISSM_DIR/externalpackages/lapack/install \ 19 --with-metis-dir=$ISSM_DIR/externalpackages/petsc/install \ 20 --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install \ 21 --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install \ 22 --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install \ 23 --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \ 24 --with-boost-dir=$ISSM_DIR/externalpackages/boost/install \ 25 --with-numthreads=4 \ 26 --enable-development \ 27 --enable-debugging \ 18 --with-blas-lapack-dir=${ISSM_DIR}/externalpackages/lapack/install \ 19 --with-metis-dir=${ISSM_DIR}/externalpackages/petsc/install \ 20 --with-scalapack-dir=${ISSM_DIR}/externalpackages/petsc/install \ 21 --with-mumps-dir=${ISSM_DIR}/externalpackages/petsc/install \ 22 --with-petsc-dir=${ISSM_DIR}/externalpackages/petsc/install \ 23 --with-triangle-dir=${ISSM_DIR}/externalpackages/triangle/install \ 24 --with-boost-dir=${ISSM_DIR}/externalpackages/boost/install \ 28 25 ' 29 26 30 # Test suites 31 MATLAB_TEST=1 32 PYTHON_TEST=1 33 JAVASCRIPT_TEST=0 34 EXAMPLES_TEST=0 27 #-------------------# 28 # External Packages # 29 #-------------------# 35 30 36 #-----------------------------------#37 # 3: External packages installation #38 #-----------------------------------#39 40 # List of external packages to be installed and their installation scripts41 31 EXTERNALPACKAGES=" 42 autotools install-debian .sh32 autotools install-debian-linux.sh 43 33 cmake install.sh 44 34 mpich install-3.3.sh 45 35 lapack install-3.8-linux.sh 46 36 petsc install-3.7-linux.sh 47 triangle install-linux 64.sh37 triangle install-linux.sh 48 38 chaco install.sh 49 39 m1qn3 install.sh … … 62 52 " 63 53 64 #-----------------# 65 # 4: test options # 66 #-----------------# 54 #---------# 55 # Testing # 56 #---------# 57 58 # Test suites 59 MATLAB_TEST=1 60 PYTHON_TEST=1 61 JAVASCRIPT_TEST=0 62 EXAMPLES_TEST=0 67 63 68 64 # Number of CPUs used in ISSM compilation -
issm/trunk-jpl/m4/issm_options.m4
r24475 r24593 1 1 dnl ISSM Options 2 2 3 dnl TODO: 4 dnl - Check if we need statements such as, 5 dnl 6 dnl. AM_CONDITIONAL([JAVASCRIPT], [test "x${HAVE_JAVASCRIPT}" = "xyes"]) 7 dnl 8 dnl when we have already performed a similar check, 9 dnl 10 dnl if test "x${JAVASCRIPT}" = "xno"; then 11 dnl 12 dnl - Move library dependency checks from end of file to appropriate places 13 dnl inline 14 dnl - Refactor conditionals that test both -d <file> and -f <file> 15 dnl 16 3 17 AC_DEFUN([ISSM_OPTIONS],[ 4 5 18 AC_MSG_NOTICE(============================================================================) 6 19 AC_MSG_NOTICE(= Checking ISSM specific options =) … … 10 23 dnl Build info{{{ 11 24 12 dnl build date25 dnl Build date 13 26 AC_PATH_PROGS(DATE, date) 14 AC_MSG_CHECKING( for build date)15 if test "$DATE" 27 AC_MSG_CHECKING([for build date]) 28 if test "$DATE"; then 16 29 PACKAGE_DATE=`date` 17 30 else 18 31 PACKAGE_DATE="unknown" 19 32 fi 20 AC_DEFINE_UNQUOTED(PACKAGE_BUILD_DATE, "$PACKAGE_DATE", Build date)21 AC_MSG_RESULT( $PACKAGE_DATE)22 23 dnl user name33 AC_DEFINE_UNQUOTED(PACKAGE_BUILD_DATE, "$PACKAGE_DATE", [build date]) 34 AC_MSG_RESULT([${PACKAGE_DATE}]) 35 36 dnl User name 24 37 AC_MSG_CHECKING([user name]) 25 38 if test -n "$USER" … … 27 40 user_name="$USER" 28 41 else 29 if test -n "$LOGNAME" 30 then 31 user_name="$LOGNAME" 42 if test -n "$LOGNAME"; then 43 user_name ="$LOGNAME" 32 44 else 33 user_name=`(whoami) 2>/dev/null` || user_name=unknown34 fi 35 fi 36 AC_DEFINE_UNQUOTED(USER_NAME, "$user_name", Build user name)37 AC_MSG_RESULT( $user_name)45 user_name =`(whoami) 2>/dev/null` || user_name=unknown 46 fi 47 fi 48 AC_DEFINE_UNQUOTED(USER_NAME, "$user_name", [user name]) 49 AC_MSG_RESULT([${user_name}]) 38 50 39 51 AC_MSG_CHECKING([host full OS name and version]) 40 dnl normalize some host OS names52 dnl Normalize some host OS names 41 53 case ${host_os} in 42 dnl linux is linux is linux, regardless of RMS.43 54 dnl linux is linux is linux, regardless of RMS 55 linux-gnu* | lignux* ) host_os=linux ;; 44 56 esac 45 AC_DEFINE_UNQUOTED(HOST_OS, "$host_os", Host full OS name and version) 46 AC_MSG_RESULT($host_os) 47 48 AC_MSG_CHECKING([host cpu]) 49 AC_DEFINE_UNQUOTED(HOST_CPU, "$host_cpu",Host cpu) 50 AC_MSG_RESULT($host_cpu) 51 52 AC_MSG_CHECKING([vendor]) 53 AC_DEFINE_UNQUOTED(HOST_VENDOR, "$host_vendor",Host vendor) 54 AC_MSG_RESULT($host_vendor) 55 56 AC_MSG_CHECKING([host OS name]) 57 host_os_name=`echo $host_os | sed 's/\..*//g'` 58 dnl normalize some OS names 59 case ${host_os_name} in 60 dnl linux is linux is linux, regardless of RMS. 61 linux-gnu* | lignux* ) host_os_name=linux ;; 62 esac 63 AC_DEFINE_UNQUOTED(HOST_OS_NAME, "$host_os_name", Host OS name) 64 AC_MSG_RESULT($host_os_name) 65 66 dnl parse out the OS version of the host 67 AC_MSG_CHECKING([host OS version]) 68 host_os_version=`echo $host_os | sed 's/^[[^0-9]]*//g'` 69 if test -z "$host_os_version" 70 then 71 host_os_version=`(uname -r) 2>/dev/null` || host_os_version=unknown 72 fi 73 AC_DEFINE_UNQUOTED(HOST_OS_VERSION, "$host_os_version", Host OS version) 74 AC_MSG_RESULT($host_os_version) 75 76 77 dnl figure out host architecture (different than CPU) 78 AC_MSG_CHECKING([host OS architecture]) 79 host_arch=`(uname -m) 2>/dev/null` || host_arch=unknown 80 dnl normalize some names 81 case ${host_arch} in 82 sun4* ) host_arch=sun4 ;; 83 sun3x ) host_arch=sun3 ;; 84 sun ) host_arch=`(arch) 2>/dev/null` || host_arch=unknown ;; 85 i?86 ) host_arch=i386 ;; # all x86 should show up as i386 86 esac 87 AC_DEFINE_UNQUOTED(HOST_ARCH, "$host_arch",Host Archictecture) 88 AC_MSG_RESULT($host_arch) 57 AC_DEFINE_UNQUOTED(HOST_OS, "$host_os", [host full OS name and version]) 58 AC_MSG_RESULT([${host_os}]) 59 60 AC_MSG_CHECKING([host cpu]) 61 AC_DEFINE_UNQUOTED(HOST_CPU, "$host_cpu", [host CPU]) 62 AC_MSG_RESULT([${host_cpu}]) 63 64 AC_MSG_CHECKING([vendor]) 65 AC_DEFINE_UNQUOTED(HOST_VENDOR, "$host_vendor", [host vendor]) 66 AC_MSG_RESULT([${host_vendor}]) 67 68 AC_MSG_CHECKING([host OS name]) 69 host_os_name=`echo $host_os | sed 's/\..*//g'` 70 dnl Normalize some OS names 71 case ${host_os_name} in 72 dnl linux is linux is linux, regardless of RMS. 73 linux-gnu* | lignux* ) host_os_name=linux ;; 74 esac 75 AC_DEFINE_UNQUOTED(HOST_OS_NAME, "$host_os_name", [host OS name]) 76 AC_MSG_RESULT([${host_os_name}]) 77 78 dnl Parse out the OS version of the host 79 AC_MSG_CHECKING([host OS version]) 80 host_os_version=`echo $host_os | sed 's/^[[^0-9]]*//g'` 81 if test -z "$host_os_version"; then 82 host_os_version=`(uname -r) 2>/dev/null` || host_os_version=unknown 83 fi 84 AC_DEFINE_UNQUOTED(HOST_OS_VERSION, "$host_os_version", [host OS version]) 85 AC_MSG_RESULT([${host_os_version}]) 86 87 dnl Determine host architecture (different than CPU) 88 AC_MSG_CHECKING([host OS architecture]) 89 host_arch=`(uname -m) 2>/dev/null` || host_arch=unknown 90 dnl Normalize some names 91 case ${host_arch} in 92 sun4* ) host_arch=sun4 ;; 93 sun3x ) host_arch=sun3 ;; 94 sun ) host_arch=`(arch) 2>/dev/null` || host_arch=unknown ;; 95 i?86 ) host_arch=i386 ;; # all x86 should show up as i386 96 esac 97 AC_DEFINE_UNQUOTED(HOST_ARCH, "$host_arch", [host archictecture]) 98 AC_MSG_RESULT([${host_arch}]) 89 99 90 100 dnl }}} 91 101 dnl Debugging {{{ 92 AC_ARG_ENABLE([debugging], dnl feature 93 AS_HELP_STRING([--enable-debugging],[turn debug support on]), dnl help string 94 [enable_debugging=$enableval], dnl action if given 95 [enable_debugging=no]) dnl action if not given 96 102 AC_ARG_ENABLE( 103 [debugging], dnl feature 104 AS_HELP_STRING([--enable-debugging], [turn debug support on]), dnl help string 105 [enable_debugging=${enableval}], dnl action if given 106 [enable_debugging=no] dnl action if not given 107 ) 97 108 AC_MSG_CHECKING(for debugging support) 98 if test "x$ enable_debugging" = xyes; then99 AC_DEFINE([_ISSM_DEBUG_], [1],[Macro to enable debugging in ISSM])100 fi 101 AC_MSG_RESULT( $enable_debugging)109 if test "x${enable_debugging}" == "xyes"; then 110 AC_DEFINE([_ISSM_DEBUG_], [1], [Macro to enable debugging in ISSM]) 111 fi 112 AC_MSG_RESULT([${enable_debugging}]) 102 113 dnl }}} 103 114 dnl Development{{{ 104 AC_ARG_ENABLE([development], dnl feature 105 AS_HELP_STRING([--enable-development],[turn development on]), dnl help string 106 [enable_development=$enableval], dnl action if given 107 [enable_development=no]) dnl action if not given 108 115 AC_ARG_ENABLE( 116 [development], dnl feature 117 AS_HELP_STRING([--enable-development], [turn development on]), dnl help string 118 [enable_development=${enableval}], dnl action if given 119 [enable_development=no] dnl action if not given 120 ) 109 121 AC_MSG_CHECKING(for development support) 110 if test "x$enable_development" = xyes; then 111 AC_DEFINE([_DEVELOPMENT_],[1],[Macro to enable development version in ISSM]) 112 fi 113 AM_CONDITIONAL([DEVELOPMENT], [test x$enable_development = xyes]) 114 AC_MSG_RESULT($enable_development) 115 dnl }}} 116 dnl Standalone Options {{{ 117 AC_ARG_ENABLE([standalone-modules], dnl feature 118 AS_HELP_STRING([--enable-standalone-modules], [produce standalone modules]), dnl help string 119 [enable_standalone_modules=$enableval], dnl action if given 120 [enable_standalone_modules=no]) dnl action if not given 122 if test "x${enable_development}" == "xyes"; then 123 AC_DEFINE([_DEVELOPMENT_], [1], [enable development support in ISSM]) 124 fi 125 AM_CONDITIONAL([DEVELOPMENT], [test "x${enable_development}" == "xyes"]) 126 AC_MSG_RESULT([${enable_development}]) 127 dnl }}} 128 dnl Standalone Options {{{ 129 AC_ARG_ENABLE( 130 [standalone-modules], dnl feature 131 AS_HELP_STRING([--enable-standalone-modules], [produce standalone modules]), dnl help string 132 [enable_standalone_modules=${enableval}], dnl action if given 133 [enable_standalone_modules=no] dnl action if not given 134 ) 121 135 AC_MSG_CHECKING(for standalone modules build) 122 AM_CONDITIONAL([STANDALONE_MODULES], [test x$enable_standalone_modules = xyes]) 123 AC_MSG_RESULT($enable_standalone_modules) 124 125 AC_ARG_ENABLE([standalone-executables], dnl feature 126 AS_HELP_STRING([--enable-standalone-executables], [produce standalone executables]), dnl help string 127 [enable_standalone_executables=$enableval], dnl action if given 128 [enable_standalone_executables=no]) dnl action if not given 136 AM_CONDITIONAL([STANDALONE_MODULES], [test "x${enable_standalone_modules}" == "xyes"]) 137 AC_MSG_RESULT([${enable_standalone_modules}]) 138 139 AC_ARG_ENABLE( 140 [standalone-executables], dnl feature 141 AS_HELP_STRING([--enable-standalone-executables], [produce standalone executables]), dnl help string 142 [enable_standalone_executables=${enableval}], dnl action if given 143 [enable_standalone_executables=no] dnl action if not given 144 ) 129 145 AC_MSG_CHECKING(for standalone executables build) 130 AM_CONDITIONAL([STANDALONE_EXECUTABLES], [test x$enable_standalone_executables = xyes]) 131 AC_MSG_RESULT($enable_standalone_executables) 132 133 AC_ARG_ENABLE([standalone-libraries], dnl feature 134 AS_HELP_STRING([--enable-standalone-libraries], [produce standalone libraries]), dnl help string 135 [enable_standalone_libraries=$enableval], dnl action if given 136 [enable_standalone_libraries=no]) dnl action if not given 146 AM_CONDITIONAL([STANDALONE_EXECUTABLES], [test "x${enable_standalone_executables}" == "xyes"]) 147 AC_MSG_RESULT([${enable_standalone_executables}]) 148 149 AC_ARG_ENABLE( 150 [standalone-libraries], dnl feature 151 AS_HELP_STRING([--enable-standalone-libraries], [produce standalone libraries]), dnl help string 152 [enable_standalone_libraries=${enableval}], dnl action if given 153 [enable_standalone_libraries=no] dnl action if not given 154 ) 137 155 AC_MSG_CHECKING(for standalone libraries build) 138 AM_CONDITIONAL([STANDALONE_LIBRARIES], [test x$enable_standalone_libraries = xyes]) 139 AC_MSG_RESULT($enable_standalone_libraries) 140 dnl }}} 141 dnl Version{{{ 142 AC_ARG_ENABLE([version], dnl feature 143 AS_HELP_STRING([--enable-version],[produce libISSM.so.0]), dnl help string 144 [enable_version=$enableval], dnl action if given 145 [enable_version=no]) dnl action if not given 146 AM_CONDITIONAL([VERSION], [test x$enable_VERSION = xyes]) 147 dnl }}} 156 AM_CONDITIONAL([STANDALONE_LIBRARIES], [test "x${enable_standalone_libraries}" == "xyes"]) 157 AC_MSG_RESULT([${enable_standalone_libraries}]) 158 dnl }}} 159 dnl Version{{{ 160 AC_ARG_ENABLE( 161 [version], dnl feature 162 AS_HELP_STRING([--enable-version], [produce libISSM.so.0]), dnl help string 163 [enable_version=${enableval}], dnl action if given 164 [enable_version=no] dnl action if not given 165 ) 166 AM_CONDITIONAL([VERSION], [test "x${enable_version}" == "xyes"]) 167 dnl }}} 148 168 dnl Wrappers build {{{ 149 AC_ARG_WITH([wrappers], dnl feature 150 AS_HELP_STRING([--with-wrappers = value],[wrappers compilation]), dnl help string 151 [WRAPPERS_VALUE=$withval], dnl action if given 152 [WRAPPERS_VALUE="yes"]) dnl action if not given 169 AC_ARG_WITH( 170 [wrappers], dnl feature 171 AS_HELP_STRING([--with-wrappers = value], [wrappers compilation]), dnl help string 172 [WRAPPERS_VALUE=${withval}], dnl action if given 173 [WRAPPERS_VALUE="yes"] dnl action if not given 174 ) 153 175 AC_MSG_CHECKING(for wrappers compilation) 154 AM_CONDITIONAL([WRAPPERS], [test x$WRAPPERS_VALUE = xyes])155 AC_MSG_RESULT( $WRAPPERS_VALUE)176 AM_CONDITIONAL([WRAPPERS], [test "x${WRAPPERS_VALUE}" == "xyes"]) 177 AC_MSG_RESULT([${WRAPPERS_VALUE}]) 156 178 dnl }}} 157 179 dnl Extensions{{{ … … 162 184 dnl ISSM's externalpackages 163 185 dnl vendor{{{ 164 AC_ARG_WITH([vendor], dnl feature 165 AS_HELP_STRING([--with-vendor = VENDOR],[vendor name, ex: intel]), dnl help string 166 [VENDOR=$withval], dnl action if given 167 [VENDOR=""]) dnl action if not given 186 AC_ARG_WITH( 187 [vendor], dnl feature 188 AS_HELP_STRING([--with-vendor = VENDOR], [vendor name, ex: intel]), dnl help string 189 [VENDOR=${withval}], dnl action if given 190 [VENDOR=""] dnl action if not given 191 ) 168 192 AC_MSG_CHECKING(for vendor compilers) 169 if test -n "$ VENDOR"; then170 if test $VENDOR = intel-win32; then193 if test -n "${VENDOR}"; then 194 if test "${VENDOR}" == "intel-win32"; then 171 195 export CC=icl 172 196 export CXX=icl … … 174 198 export CXXFLAGS="-DWIN32 -D_INTEL_WIN_" 175 199 IS_WINDOWS=yes 176 elif test $VENDOR = intel-win7-32; then200 elif test "${VENDOR}" == "intel-win7-32"; then 177 201 export CC=cl 178 202 export CXX=cl … … 184 208 IS_WINDOWS=yes 185 209 OSLIBS="-Wl,kernel32.lib -Wl,user32.lib -Wl,gdi32.lib -Wl,winspool.lib -Wl,comdlg32.lib -Wl,advapi32.lib -Wl,shell32.lib -Wl,ole32.lib -Wl,oleaut32.lib -Wl,uuid.lib -Wl,odbc32.lib -Wl,odbccp32.lib" 186 elif test $VENDOR = intel-win7-64; then210 elif test "${VENDOR}" == "intel-win7-64"; then 187 211 export CC=cl 188 212 export CXX=cl … … 194 218 IS_WINDOWS=yes 195 219 OSLIBS="-Wl,kernel32.lib -Wl,user32.lib -Wl,gdi32.lib -Wl,winspool.lib -Wl,comdlg32.lib -Wl,advapi32.lib -Wl,shell32.lib -Wl,ole32.lib -Wl,oleaut32.lib -Wl,uuid.lib -Wl,odbc32.lib -Wl,odbccp32.lib" 196 elif test $VENDOR = MSVC-Win64; then220 elif test "${VENDOR}" == "MSVC-Win64"; then 197 221 export CC=cl 198 222 export CXX=cl … … 204 228 IS_WINDOWS=yes 205 229 OSLIBS="-Wl,kernel32.lib -Wl,user32.lib -Wl,gdi32.lib -Wl,winspool.lib -Wl,comdlg32.lib -Wl,advapi32.lib -Wl,shell32.lib -Wl,ole32.lib -Wl,oleaut32.lib -Wl,uuid.lib -Wl,odbc32.lib -Wl,odbccp32.lib" 206 elif test $VENDOR = MSVC-Win64-par; then230 elif test "${VENDOR}" == "MSVC-Win64-par"; then 207 231 export CC=cl 208 232 export CXX=cl … … 214 238 IS_WINDOWS=yes 215 239 OSLIBS="-Wl,kernel32.lib -Wl,user32.lib -Wl,gdi32.lib -Wl,winspool.lib -Wl,comdlg32.lib -Wl,advapi32.lib -Wl,shell32.lib -Wl,ole32.lib -Wl,oleaut32.lib -Wl,uuid.lib -Wl,odbc32.lib -Wl,odbccp32.lib" 216 elif test $VENDOR = intel-linux; then240 elif test "${VENDOR}" == "intel-linux"; then 217 241 export CC=icc 218 242 export CXX=icpc 219 export CFLAGS=" 220 export CXXFLAGS=" 221 elif test $VENDOR = intel-gp; then243 export CFLAGS="-D_INTEL_LINUX_" 244 export CXXFLAGS="-D_INTEL_LINUX_" 245 elif test "${VENDOR}" == "intel-gp"; then 222 246 export CC=icc 223 247 export CXX=icpc 224 export CFLAGS=" 225 export CXXFLAGS=" 226 elif test $VENDOR= intel-lonestar; then248 export CFLAGS="-D_INTEL_LINUX_" 249 export CXXFLAGS="-D_INTEL_LINUX_" 250 elif test "${VENDOR}" == intel-lonestar; then 227 251 export CC=icc 228 252 export CXX=icpc 229 elif test $VENDOR = intel-aurora; then253 elif test "${VENDOR}" == "intel-aurora"; then 230 254 export CC=icc 231 255 export CXX=icpc 232 export CXXFLAGS=" 233 export CFLAGS=" 234 elif test $VENDOR = intel-discover; then256 export CXXFLAGS="-O3 -D_INTEL_LINUX_ -DMPICH_IGNORE_CXX_SEEK" 257 export CFLAGS="-O3 -D_INTEL_LINUX_ -DMPICH_IGNORE_CXX_SEEK" 258 elif test "${VENDOR}" == "intel-discover"; then 235 259 export CC=icc 236 260 export CXX=icpc 237 export CXXFLAGS=" 238 export CFLAGS=" 239 elif test $VENDOR = intel-pleiades; then261 export CXXFLAGS="-O3 -D_INTEL_LINUX_ -DMPICH_IGNORE_CXX_SEEK" 262 export CFLAGS="-O3 -D_INTEL_LINUX_ -DMPICH_IGNORE_CXX_SEEK" 263 elif test "${VENDOR}" == "intel-pleiades"; then 240 264 export CC=icc 241 265 export CXX=icpc 242 export CXXFLAGS=" -O3 -D_INTEL_LINUX_"243 export CFLAGS=" -O3 -D_INTEL_LINUX_"244 elif test $VENDOR = intel-acenet; then266 export CXXFLAGS="-O3 -D_INTEL_LINUX_" 267 export CFLAGS="-O3 -D_INTEL_LINUX_" 268 elif test "${VENDOR}" == "intel-acenet"; then 245 269 export CC=icc 246 270 export CXX=icpc 247 export CXXFLAGS=" -D_INTEL_LINUX_"248 export CFLAGS=" -D_INTEL_LINUX_"249 elif test $VENDOR = intel-pleiades-gcc; then271 export CXXFLAGS="-D_INTEL_LINUX_" 272 export CFLAGS="-D_INTEL_LINUX_" 273 elif test "${VENDOR}" == "intel-pleiades-gcc"; then 250 274 export CC=gcc 251 275 export CXX=g++ 252 276 export CXXFLAGS="-O3 -march=corei7-avx" 253 277 export CFLAGS="-O3 -march=corei7-avx" 254 255 AC_MSG_ERROR([unknown compiler vendor!])278 else 279 AC_MSG_ERROR([unknown compiler vendor!]) 256 280 fi 257 281 fi 258 282 AC_SUBST([OSLIBS]) 259 AC_MSG_RESULT( done)260 dnl }}} 261 dnl matlab{{{262 263 dnl 1. See if matlabhas been provided264 AC_ARG_WITH( [matlab-dir], dnl feature265 AS_HELP_STRING([--with-matlab-dir=DIR],[matlab root directory.]), dnl help string266 [MATLAB_ROOT=$withval], dnl action if given267 [MATLAB_ROOT="no"]) dnl action if notgiven268 269 AC_MSG_CHECKING([whether matlab is enabled])270 if test "x$ MATLAB_ROOT" = "xno"; then271 283 AC_MSG_RESULT([done]) 284 dnl }}} 285 dnl MATLAB{{{ 286 287 dnl See if MATLAB has been provided 288 AC_ARG_WITH( 289 [matlab-dir], dnl feature 290 AS_HELP_STRING([--with-matlab-dir=DIR], [MATLAB root directory]), dnl help string 291 [MATLAB_ROOT=${withval}], dnl action if given 292 [MATLAB_ROOT="no"] dnl action if not given 293 ) 294 if test "x${MATLAB_ROOT}" == "xno"; then 295 HAVE_MATLAB=no 272 296 else 273 297 HAVE_MATLAB=yes 274 if ! test -d "$MATLAB_ROOT"; then 275 AC_MSG_ERROR([matlab directory provided ($MATLAB_ROOT) does not exist]); 276 fi 277 if ! test -f "$MATLAB_ROOT/extern/include/mex.h"; then 278 AC_MSG_ERROR([Couldn't find mex.h... check your installation of matlab]) 279 fi 280 fi 281 AC_MSG_RESULT($HAVE_MATLAB) 282 AM_CONDITIONAL([MATLAB], [test x$HAVE_MATLAB = xyes]) 283 284 dnl 2. Get Matlab libraries 285 if test "x$HAVE_MATLAB" = "xyes"; then 286 287 AC_DEFINE([_HAVE_MATLAB_],[1],[with matlab in ISSM src]) 288 289 dnl 4. get MEXLIB MEXLINK and MEXEXT (experimental) except for windows 290 AC_MSG_CHECKING([matlab's mex compilation flags]) 291 case "${host_os}" in 292 *cygwin*) 293 if test $VENDOR = intel-win7-32; then 294 MEXLIB="-Wl,libmx.lib -Wl,libmex.lib -Wl,libmat.lib ${OSLIBS} -Wl,libf2cblas.lib -Wl,libf2clapack.lib" 295 MEXLINK="-Wl,/LIBPATH:`cygpath -m ${MATLAB_ROOT}/extern/lib/win32/microsoft` -Wl,/link -Wl,/EXPORT:mexFunction -Wl,/DLL" 296 MEXEXT=`$MATLAB_ROOT/bin/mexext.bat` 297 MEXEXT=".$MEXEXT" 298 elif test $VENDOR = intel-win7-64; then 299 MEXLIB="-Wl,libmx.lib -Wl,libmex.lib -Wl,libmat.lib ${OSLIBS} -Wl,libf2cblas.lib -Wl,libf2clapack.lib" 300 MEXLINK="-Wl,/LIBPATH:`cygpath -m ${MATLAB_ROOT}/extern/lib/win64/microsoft` -Wl,/link -Wl,/EXPORT:mexFunction -Wl,/DLL" 298 if ! test -d "${MATLAB_ROOT}"; then 299 AC_MSG_ERROR([MATLAB directory provided (${MATLAB_ROOT}) does not exist!]); 300 fi 301 if ! test -f "${MATLAB_ROOT}/extern/include/mex.h"; then 302 AC_MSG_ERROR([Couldn't find mex.h... check your installation of MATLAB]) 303 fi 304 fi 305 AC_MSG_RESULT([${HAVE_MATLAB}]) 306 AM_CONDITIONAL([MATLAB], [test "x${HAVE_MATLAB}" == "xyes"]) 307 308 dnl Set variables 309 if test "x${HAVE_MATLAB}" == "xyes"; then 310 AC_DEFINE([_HAVE_MATLAB_], [1], [with MATLAB in ISSM src]) 311 312 dnl Set MEXLIB, MEXLINK, and MEXEXT 313 AC_MSG_CHECKING([MATLAB's mex compilation flags]) 314 315 dnl NOTE: We know $VENDOR cannot be empty at this point, so no need to 316 dnl check again in the following conditionals 317 dnl 318 case "${host_os}" in 319 *cygwin*) 320 if test "${VENDOR}" == "intel-win7-32"; then 321 MEXLIB="-Wl,libmx.lib -Wl,libmex.lib -Wl,libmat.lib ${OSLIBS} -Wl,libf2cblas.lib -Wl,libf2clapack.lib" 322 MEXLINK="-Wl,/LIBPATH:`cygpath -m ${MATLAB_ROOT}/extern/lib/win32/microsoft` -Wl,/link -Wl,/EXPORT:mexFunction -Wl,/DLL" 323 MEXEXT=`${MATLAB_ROOT}/bin/mexext.bat` 324 MEXEXT=".${MEXEXT}" 325 elif test "${VENDOR}" == "intel-win7-64"; then 326 MEXLIB="-Wl,libmx.lib -Wl,libmex.lib -Wl,libmat.lib ${OSLIBS} -Wl,libf2cblas.lib -Wl,libf2clapack.lib" 327 MEXLINK="-Wl,/LIBPATH:`cygpath -m ${MATLAB_ROOT}/extern/lib/win64/microsoft` -Wl,/link -Wl,/EXPORT:mexFunction -Wl,/DLL" 301 328 MEXEXT=".mexw64" 302 elif test $VENDOR = MSVC-Win64 || test $VENDOR = MSVC-Win64-par; then303 304 305 MATLABINCL="-I`cygpath -m $MATLAB_ROOT/extern/include/`"329 elif test "${VENDOR}" == "MSVC-Win64" || test "${VENDOR}" == "MSVC-Win64-par"; then 330 MEXLIB="-Wl,libmx.lib -Wl,libmex.lib -Wl,libmat.lib ${OSLIBS} -Wl,libf2cblas.lib -Wl,libf2clapack.lib" 331 MEXLINK="-Wl,/link -Wl,/LIBPATH:`cygpath -m ${MATLAB_ROOT}/extern/lib/win64/microsoft` -Wl,/link -Wl,/EXPORT:mexFunction -Wl,/DLL" 332 MATLABINCL="-I`cygpath -m ${MATLAB_ROOT}/extern/include`" 306 333 MEXEXT=".mexw64" 307 308 309 310 MATLABINCL="-I$MATLAB_ROOT/extern/include/"311 MEXLINK=$($MATLAB_ROOT/bin/mex -v 2>&1 < /dev/null | grep LDFLAGS| sed -e "s/ LDFLAGS = //g")312 MEXLIB=$( $MATLAB_ROOT/bin/mex -v 2>&1 < /dev/null | grep CXXLIBS| sed -e "s/ CXXLIBS = //g")313 MEXEXT=$( $MATLAB_ROOT/bin/mex -v 2>&1 < /dev/null | grep LDEXTENSION | sed -e "s/ LDEXTENSION = //g")334 fi 335 ;; 336 *) 337 MATLABINCL="-I${MATLAB_ROOT}/extern/include" 338 MEXLINK=$(${MATLAB_ROOT}/bin/mex -v 2>&1 < /dev/null | grep LDFLAGS | sed -e "s/ LDFLAGS = //g") 339 MEXLIB=$(${MATLAB_ROOT}/bin/mex -v 2>&1 < /dev/null | grep CXXLIBS | sed -e "s/ CXXLIBS = //g") 340 MEXEXT=$(${MATLAB_ROOT}/bin/mex -v 2>&1 < /dev/null | grep LDEXTENSION | sed -e "s/ LDEXTENSION = //g") 314 341 dnl version 2014 and up 315 if test "x$MEXEXT" = "x"; then316 317 318 $MATLAB_ROOT/bin/mex -v -lmex conftest.cpp > conftest.tmp 2>&1319 320 MEXLINK=$(cat conftest.tmp | grep LDFLAGS| sed -e "s/LDFLAGS ://g")321 MEXLIB=$(cat conftest.tmp | grep LINKLIBS | sed -e "s/LINKLIBS ://g")322 MEXEXT=$( cat conftest.tmp | grep LDEXT| sed -e "s/LDEXT ://g" | awk '{print $[1]}')323 342 if test -z "${MEXEXT}"; then 343 echo "#include <mex.h>" > conftest.cpp 344 echo "void mexFunction(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){}" >> conftest.cpp 345 ${MATLAB_ROOT}/bin/mex -v -lmex conftest.cpp > conftest.tmp 2>&1 346 rm -f conftest.cpp 347 MEXLINK=$(cat conftest.tmp | grep LDFLAGS | sed -e "s/LDFLAGS ://g") 348 MEXLIB=$(cat conftest.tmp | grep LINKLIBS | sed -e "s/LINKLIBS ://g") 349 MEXEXT=$(cat conftest.tmp | grep LDEXT | sed -e "s/LDEXT ://g" | awk '{print $[1]}') 350 rm -f conftest.tmp 324 351 fi 325 352 326 353 dnl Make sure mexFunction.map is not in MEXLIB to avoid problems with global variables 327 dnl MEXLINK=$(echo $ MEXLINK| sed -e "s/,-expo.*mexFunction\\.map\"//g" | sed -e "s/-[[^ ]]*mexFunction\\.map//g")354 dnl MEXLINK=$(echo ${MEXLINK} | sed -e "s/,-expo.*mexFunction\\.map\"//g" | sed -e "s/-[[^ ]]*mexFunction\\.map//g") 328 355 MEXLINK="" dnl We actually don't need MEXLINK???? 329 330 ;; 331 esac 332 AC_MSG_RESULT(done) 333 if test "x$MEXEXT" = "x" ; then 334 AC_MSG_ERROR([Couldn't find mex... check your installation of matlab]) 335 fi 356 ;; 357 esac 358 AC_MSG_RESULT([done]) 359 if test -z "${MEXEXT}"; then 360 AC_MSG_ERROR([Couldn't find mex... check your installation of MATLAB]) 361 fi 336 362 337 363 AC_SUBST([MATLABINCL]) 338 MATLABWRAPPEREXT=$ MEXEXT364 MATLABWRAPPEREXT=${MEXEXT} 339 365 AC_SUBST([MATLABWRAPPEREXT]) 340 366 AC_SUBST([MEXLIB]) 341 367 AC_SUBST([MEXLINK]) 342 368 fi 343 369 dnl }}} 344 dnl windows {{{ 345 AC_MSG_CHECKING([Checking if this is a Win build... ]) 346 AM_CONDITIONAL([WINDOWS], [test x$IS_WINDOWS = xyes]) 347 AC_MSG_RESULT(done) 348 dnl }}} 349 dnl javascript{{{ 350 AC_ARG_WITH([javascript], 351 AS_HELP_STRING([--with-javascript], [compile javascript wrappers? default is no.]), 352 [JAVASCRIPT=$withval],[JAVASCRIPT="no"]) 353 354 dnl Check whether javascript wrappers are desired 355 AC_MSG_CHECKING([for javascript]) 356 if test "x$JAVASCRIPT" = "xno" ; then 370 dnl Windows {{{ 371 AC_MSG_CHECKING([Checking if this is a Windows build... ]) 372 AM_CONDITIONAL([WINDOWS], [test "x${IS_WINDOWS}" == "xyes"]) 373 AC_MSG_RESULT([done]) 374 dnl }}} 375 dnl JavaScript{{{ 376 AC_ARG_WITH( 377 [javascript], 378 AS_HELP_STRING([--with-javascript], [compile JavaScript wrappers? (default: no)]), 379 [JAVASCRIPT=${withval}], 380 [JAVASCRIPT="no"] 381 ) 382 AC_MSG_CHECKING([for JavaScript]) 383 if test "x${JAVASCRIPT}" == "xno"; then 357 384 HAVE_JAVASCRIPT=no 358 385 else 359 386 HAVE_JAVASCRIPT=yes 360 AC_DEFINE([_HAVE_JAVASCRIPT_], [1],[with javascript])361 fi 362 AC_MSG_RESULT( $HAVE_JAVASCRIPT)363 AM_CONDITIONAL([JAVASCRIPT], [test x$HAVE_JAVASCRIPT = xyes])387 AC_DEFINE([_HAVE_JAVASCRIPT_], [1], [with JavaScript]) 388 fi 389 AC_MSG_RESULT([${HAVE_JAVASCRIPT}]) 390 AM_CONDITIONAL([JAVASCRIPT], [test "x${HAVE_JAVASCRIPT}" == "xyes"]) 364 391 JAVASCRIPTWRAPPEREXT=.js 365 392 AC_SUBST([JAVASCRIPTWRAPPEREXT]) 366 367 dnl }}} 368 dnl triangle {{{ 369 AC_ARG_WITH([triangle-dir], 370 AS_HELP_STRING([--with-triangle-dir=DIR], [triangle root directory.]), 371 [TRIANGLE_ROOT=$withval],[TRIANGLE_ROOT="no"]) 372 373 dnl Check whether triangle is enabled 374 dnl TODO: After discussing with group, uncomment the following lines to 375 dnl replace the existing ones (where applicable), update Jenkins config 376 dnl files, then cleanup $ISSM_DIR/externalpackages/triangle. 393 dnl }}} 394 dnl Triangle {{{ 395 AC_ARG_WITH( 396 [triangle-dir], 397 AS_HELP_STRING([--with-triangle-dir=DIR], [Triangle root directory]), 398 [TRIANGLE_ROOT=${withval}], 399 [TRIANGLE_ROOT="no"] 400 ) 377 401 AC_MSG_CHECKING([for triangle]) 378 if test "x$ TRIANGLE_ROOT" = "xno"; then402 if test "x${TRIANGLE_ROOT}" == "xno"; then 379 403 HAVE_TRIANGLE=no 380 404 else 381 405 HAVE_TRIANGLE=yes 382 if ! test -d "$ TRIANGLE_ROOT"; then383 AC_MSG_ERROR([ triangle directory provided ($TRIANGLE_ROOT) does not exist]);384 fi 385 if ! test -f "$ TRIANGLE_ROOT/triangle.h"; then406 if ! test -d "${TRIANGLE_ROOT}"; then 407 AC_MSG_ERROR([Triangle directory provided (${TRIANGLE_ROOT}) does not exist!]); 408 fi 409 if ! test -f "${TRIANGLE_ROOT}/include/triangle.h"; then 386 410 AC_MSG_ERROR([Couldn't find triangle.h... check your installation of triangle]) 387 411 fi 388 dnl if ! test -f "${TRIANGLE_ROOT}/include/triangle.h" ; then 389 dnl AC_MSG_ERROR([Couldn't find triangle.h... check your installation of triangle]) 390 dnl fi 391 fi 392 AC_MSG_RESULT($HAVE_TRIANGLE) 393 AM_CONDITIONAL([TRIANGLE],[test x$HAVE_TRIANGLE = xyes]) 394 395 dnl library and header files 396 if test "x$HAVE_TRIANGLE" = "xyes"; then 397 TRIANGLEINCL=-I${TRIANGLE_ROOT} 398 dnl TRIANGLEINCL=-I${TRIANGLE_ROOT}/include 412 fi 413 AC_MSG_RESULT([${HAVE_TRIANGLE}]) 414 AM_CONDITIONAL([TRIANGLE], [test "x${HAVE_TRIANGLE}" == "xyes"]) 415 416 dnl Triangle libraries and header files 417 if test "x${HAVE_TRIANGLE}" == "xyes"; then 418 TRIANGLEINCL=-I${TRIANGLE_ROOT}/include 399 419 case "${host_os}" in 400 420 *cygwin*) 401 TRIANGLEINCL="/I`cygpath -m $TRIANGLE_ROOT/`" 402 TRIANGLELIB="-Wl,`cygpath -m $TRIANGLE_ROOT/`triangle.lib" 421 TRIANGLEINCL="/I`cygpath -m ${TRIANGLE_ROOT}`" 422 TRIANGLELIB="-Wl,`cygpath -m ${TRIANGLE_ROOT}/`triangle.lib" 423 ;; 424 *darwin*) 425 if test "x${HAVE_JAVASCRIPT}" == "xyes"; then 426 dnl Link to the object file, not the library 427 TRIANGLELIB=${TRIANGLE_ROOT}/share/triangle.o 428 else 429 TRIANGLELIB="-L${TRIANGLE_ROOT}/lib -ltriangle" 430 fi 403 431 ;; 404 432 *linux*) 405 if test "x$HAVE_JAVASCRIPT" = "xyes"; then 406 dnl go to the bit code, not the library. 407 TRIANGLELIB=${TRIANGLE_ROOT}/triangle.o 408 dnl TRIANGLELIB=${TRIANGLE_ROOT}/share/triangle.o 409 else 410 TRIANGLELIB=$TRIANGLE_ROOT/triangle.a 411 dnl TRIANGLELIB="-L${TRIANGLE_ROOT}/lib -ltriangle" 412 fi 413 ;; 414 *darwin*) 415 if test "x$HAVE_JAVASCRIPT" = "xyes"; then 416 dnl go to the bit code, not the library. 417 TRIANGLELIB=$TRIANGLE_ROOT/triangle.o 418 dnl TRIANGLELIB=${TRIANGLE_ROOT}/share/triangle.o 419 else 420 TRIANGLELIB=$TRIANGLE_ROOT/triangle.a 421 dnl TRIANGLELIB="-L${TRIANGLE_ROOT}/lib -ltriangle" 422 fi 433 if test "x${HAVE_JAVASCRIPT}" == "xyes"; then 434 dnl Link to the object file, not the library 435 TRIANGLELIB=${TRIANGLE_ROOT}/share/triangle.o 436 else 437 TRIANGLELIB="-L${TRIANGLE_ROOT}/lib -ltriangle" 438 fi 423 439 ;; 424 440 esac 425 AC_DEFINE([_HAVE_TRIANGLE_], [1],[with Triangle in ISSM src])441 AC_DEFINE([_HAVE_TRIANGLE_], [1], [with Triangle in ISSM src]) 426 442 AC_SUBST([TRIANGLEINCL]) 427 443 AC_SUBST([TRIANGLELIB]) 428 444 fi 429 445 dnl }}} 430 dnl boost{{{ 431 AC_ARG_WITH([boost-dir], 432 AS_HELP_STRING([--with-boost-dir=DIR], [boost root directory.]), 433 [BOOST_ROOT=$withval],[BOOST_ROOT="no"]) 434 435 dnl Check whether boost is enabled 436 AC_MSG_CHECKING([for boost]) 437 if test "x$BOOST_ROOT" = "xno" ; then 446 dnl Boost{{{ 447 AC_ARG_WITH( 448 [boost-dir], 449 AS_HELP_STRING([--with-boost-dir=DIR], [Boost root directory]), 450 [BOOST_ROOT=${withval}], 451 [BOOST_ROOT="no"] 452 ) 453 AC_MSG_CHECKING([for Boost]) 454 if test "x${BOOST_ROOT}" == "xno"; then 438 455 HAVE_BOOST=no 439 456 else 440 457 HAVE_BOOST=yes 441 if ! test -d "$BOOST_ROOT"; then 442 AC_MSG_ERROR([boost directory provided ($BOOST_ROOT) does not exist]); 443 fi 444 fi 445 AC_MSG_RESULT($HAVE_BOOST) 446 AM_CONDITIONAL([BOOST],[test x$HAVE_BOOST = xyes]) 447 448 dnl library and header files 449 if test "x$HAVE_BOOST" = "xyes"; then 450 BOOSTINCL=-I$BOOST_ROOT/include 451 BOOSTLIB="-L$BOOST_ROOT/lib -lboost_python" 452 AC_DEFINE([_HAVE_BOOST_],[1],[with Boost in ISSM src]) 458 if ! test -d "${BOOST_ROOT}"; then 459 AC_MSG_ERROR([Boost directory provided (${BOOST_ROOT}) does not exist!]); 460 fi 461 fi 462 AC_MSG_RESULT([${HAVE_BOOST}]) 463 AM_CONDITIONAL([BOOST], [test "x${HAVE_BOOST}" == "xyes"]) 464 465 dnl Boost libraries and header files 466 if test "x${HAVE_BOOST}" == "xyes"; then 467 BOOSTINCL="-I${BOOST_ROOT}/include" 468 #BOOSTLIB="-L$BOOST_ROOT/lib -lboost_python" 469 AC_MSG_CHECKING(for Boost version) 470 BOOST_VERSION=`cat ${BOOST_ROOT}/include/boost/version.hpp | grep "#define BOOST_VERSION " | sed 's/.*BOOST_VERSION //'` 471 BOOST_VERSION_MAJOR=`expr ${BOOST_VERSION} / 100000` 472 BOOST_VERSION_MINOR=`expr ${BOOST_VERSION} / 100 % 1000` 473 AC_MSG_RESULT([${BOOST_VERSION_MAJOR}.${BOOST_VERSION_MINOR}]) 474 AC_DEFINE([_HAVE_BOOST_], [1], [with Boost in ISSM src]) 453 475 AC_SUBST([BOOSTINCL]) 454 476 AC_SUBST([BOOSTLIB]) 455 477 fi 456 478 dnl }}} 457 dnl dakota{{{ 458 AC_ARG_WITH([dakota-dir], 459 AS_HELP_STRING([--with-dakota-dir=DIR], [dakota root directory.]), 460 [DAKOTA_ROOT=$withval],[DAKOTA_ROOT="no"]) 461 462 dnl Check whether dakota is enabled 463 AC_MSG_CHECKING([for dakota]) 464 if test "x$DAKOTA_ROOT" = "xno" ; then 479 dnl Dakota{{{ 480 AC_ARG_WITH( 481 [dakota-dir], 482 AS_HELP_STRING([--with-dakota-dir=DIR], [Dakota root directory]), 483 [DAKOTA_ROOT=${withval}], 484 [DAKOTA_ROOT="no"] 485 ) 486 AC_MSG_CHECKING([for Dakota]) 487 if test "x${DAKOTA_ROOT}" == "xno"; then 465 488 HAVE_DAKOTA=no 466 489 else 467 490 HAVE_DAKOTA=yes 468 if ! test -d "$DAKOTA_ROOT"; then 469 AC_MSG_ERROR([dakota directory provided ($DAKOTA_ROOT) does not exist]); 470 fi 471 fi 472 AC_MSG_RESULT($HAVE_DAKOTA) 473 AM_CONDITIONAL([DAKOTA],[test x$HAVE_DAKOTA = xyes]) 474 475 dnl library and header files 476 if test "x$HAVE_DAKOTA" = "xyes"; then 477 DAKOTAINCL=-I$DAKOTA_ROOT/include 478 479 AC_MSG_CHECKING(for dakota version) 480 if test -f "$DAKOTA_ROOT/VERSION"; then 481 DAKOTA_VERSION=`cat $DAKOTA_ROOT/VERSION | grep 'DAKOTA Version' | sed 's/.*DAKOTA Version //' | sed 's/ .*//' ` 482 else if test -f "$DAKOTA_ROOT/../src/src/CommandLineHandler.C"; then 483 DAKOTA_VERSION=`cat $DAKOTA_ROOT/../src/src/CommandLineHandler.C | grep 'DAKOTA version' | grep 'release' | grep -v // | sed 's/.*DAKOTA version //' | sed 's/ .*//' ` 484 else if test -f "$DAKOTA_ROOT/../src/src/CommandLineHandler.cpp"; then 485 DAKOTA_VERSION=`cat $DAKOTA_ROOT/../src/src/CommandLineHandler.cpp | grep 'DAKOTA version' | grep 'release' | grep -v // | sed 's/.*DAKOTA version //' | sed 's/ .*//' ` 491 if ! test -d "${DAKOTA_ROOT}"; then 492 AC_MSG_ERROR([Dakota directory provided (${DAKOTA_ROOT}) does not exist!]); 493 fi 494 fi 495 AC_MSG_RESULT([${HAVE_DAKOTA}]) 496 AM_CONDITIONAL([DAKOTA], [test "x${HAVE_DAKOTA}" == "xyes"]) 497 498 dnl Dakota libraries and header files 499 if test "x${HAVE_DAKOTA}" == "xyes"; then 500 DAKOTAINCL=-I${DAKOTA_ROOT}/include 501 502 AC_MSG_CHECKING(for Dakota version) 503 dnl TODO: Check if this method applies to all other versions of 504 dnl (it should as long as the Dakota binaries have been 505 dnl compiled). If so, we can remove the other methods of 506 dnl getting the version. 507 dnl 508 DAKOTA_VERSION_OUTPUT=`${DAKOTA_ROOT}/bin/dakota -v` 509 if test -n "${DAKOTA_VERSION_OUTPUT}"; then 510 DAKOTA_VERSION=`echo ${DAKOTA_VERSION_OUTPUT} grep "Dakota version" | sed 's/Dakota version //' | sed 's/ .*//'` 511 elif test -f "${DAKOTA_ROOT}/VERSION"; then 512 DAKOTA_VERSION=`cat ${DAKOTA_ROOT}/VERSION | grep 'DAKOTA Version' | sed 's/.*DAKOTA Version //' | sed 's/ .*//'` 513 elif test -f "${DAKOTA_ROOT}/../src/src/CommandLineHandler.C"; then 514 DAKOTA_VERSION=`cat ${DAKOTA_ROOT}/../src/src/CommandLineHandler.C | grep 'DAKOTA version' | grep 'release' | grep -v // | sed 's/.*DAKOTA version //' | sed 's/ .*//' ` 515 elif test -f "${DAKOTA_ROOT}/../src/src/CommandLineHandler.cpp"; then 516 DAKOTA_VERSION=`cat ${DAKOTA_ROOT}/../src/src/CommandLineHandler.cpp | grep 'DAKOTA version' | grep 'release' | grep -v // | sed 's/.*DAKOTA version //' | sed 's/ .*//' ` 486 517 else 487 AC_MSG_ERROR([Dakota CommandLineHandler.C or CommandLineHandler.cpp file not found to determine DAKOTA_VERSION!]); 488 fi 489 fi 490 fi 491 AC_MSG_RESULT($DAKOTA_VERSION) 492 AC_DEFINE_UNQUOTED([_DAKOTA_VERSION_],"$DAKOTA_VERSION",[Dakota version number]) 518 AC_MSG_ERROR([Dakota CommandLineHandler.C or CommandLineHandler.cpp file not found to determine DAKOTA_VERSION!]); 519 fi 520 AC_MSG_RESULT([${DAKOTA_VERSION}]) 521 AC_DEFINE_UNQUOTED(_DAKOTA_VERSION_, "${DAKOTA_VERSION}", [Dakota version number]) 493 522 494 523 DAKOTAFLAGS="" 495 dnl TODO: Should we also be checking if HAVE_BOOST before adding boost libs? 524 525 dnl NOTE: 526 dnl - See $ISSM_DIR/dakota/build/src/Makefile.export.Dakota for the 527 dnl flags needed by your combination of Boost and Dakota versions 528 dnl - We know $DAKOTA_ROOT cannot be empty at this point, so no need to 529 dnl check again in the following conditionals 530 dnl 531 dnl TODO: 532 dnl - Should we also be checking if HAVE_BOOST before adding boost libs? 533 dnl 496 534 case "${host_os}" in 497 535 *cygwin*) 498 if test x$DAKOTA_VERSION = x5.1 || test x$DAKOTA_VERSION = x5.2; then499 DAKOTALIB="-L$ DAKOTA_ROOT/lib -L$BOOST_ROOT/lib -ldakota -lteuchos -lpecos -llhs -lsparsegrid -lsurfpack -lconmin -lddace -lfsudace -ljega -lcport -loptpp -lpsuade -lncsuopt -lcolin -linterfaces -lmomh -lscolib -lpebbl -ltinyxml -lutilib -l3po -lhopspack -lnidr -lamplsolver -lboost_signals -lboost_regex -lboost_filesystem"500 el se if test x$DAKOTA_VERSION = x6.1 || test x$DAKOTA_VERSION = x6.2; then501 502 DAKOTALIB="-L$ DAKOTA_ROOT/lib -L$BOOST_ROOT/lib -ldakota_src -ldream -lfsudace -lddace -lnomad -lpecos_src -lscolib -ljega_fe -llhs -lpebbl -lcolin -linterfaces -llhs_mods -lmoga -loptpp -lsoga -lsurfpack -lutilib -lconmin -ldakota_src_fortran -llhs_mod -lncsuopt -lsurfpack_fortran -lteuchos -l3po -lamplsolver -lcport -ldfftpack -leutils -lfsudace -lhopspack -ljega -lnidr -lpecos -lpsuade -ltinyxml -lutilities -lsparsegrid -lboost_serialization -lboost_signals -lboost_regex -lboost_filesystem -lboost_system"503 AC_DEFINE([DISABLE_DAKOTA_CONFIG_H], [1],[disabling DAKOTA_CONFIG_H])504 AC_DEFINE([DAKOTA_HAVE_MPI], [1],[enabling parallel MPI])536 if test "${DAKOTA_VERSION}" == "5.1" || test "${DAKOTA_VERSION}" == "5.2"; then 537 DAKOTALIB="-L${DAKOTA_ROOT}/lib -L${BOOST_ROOT}/lib -ldakota -lteuchos -lpecos -llhs -lsparsegrid -lsurfpack -lconmin -lddace -lfsudace -ljega -lcport -loptpp -lpsuade -lncsuopt -lcolin -linterfaces -lmomh -lscolib -lpebbl -ltinyxml -lutilib -l3po -lhopspack -lnidr -lamplsolver -lboost_signals -lboost_regex -lboost_filesystem" 538 elif test "${DAKOTA_VERSION}" == "6.1" || test "${DAKOTA_VERSION}" == "6.2"; then 539 DAKOTAFLAGS="-DDISABLE_DAKOTA_CONFIG_H -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION -DDAKOTA_PLUGIN -DBOOST_DISABLE_ASSERTS -DDAKOTA_HAVE_BOOST_FS -DHAVE_UNISTD_H -DHAVE_SYSTEM -DHAVE_WORKING_FORK -DHAVE_WORKING_VFORK -DHAVE_SYS_WAIT_H -DHAVE_USLEEP -DDAKOTA_F90 -DDAKOTA_HAVE_MPI -DHAVE_PECOS -DHAVE_SURFPACK -DDAKOTA_COLINY -DDAKOTA_UTILIB -DHAVE_ADAPTIVE_SAMPLING -DHAVE_CONMIN -DDAKOTA_DDACE -DHAVE_FSUDACE -DDAKOTA_HOPS -DHAVE_JEGA -DHAVE_NCSU -DHAVE_NL2SOL -DHAVE_OPTPP -DDAKOTA_OPTPP -DHAVE_PSUADE -DHAVE_AMPL" 540 DAKOTALIB="-L${DAKOTA_ROOT}/lib -L${BOOST_ROOT}/lib -ldakota_src -ldream -lfsudace -lddace -lnomad -lpecos_src -lscolib -ljega_fe -llhs -lpebbl -lcolin -linterfaces -llhs_mods -lmoga -loptpp -lsoga -lsurfpack -lutilib -lconmin -ldakota_src_fortran -llhs_mod -lncsuopt -lsurfpack_fortran -lteuchos -l3po -lamplsolver -lcport -ldfftpack -leutils -lfsudace -lhopspack -ljega -lnidr -lpecos -lpsuade -ltinyxml -lutilities -lsparsegrid -lboost_serialization -lboost_signals -lboost_regex -lboost_filesystem -lboost_system" 541 AC_DEFINE([DISABLE_DAKOTA_CONFIG_H], [1], [disabling DAKOTA_CONFIG_H]) 542 AC_DEFINE([DAKOTA_HAVE_MPI], [1], [enabling parallel MPI]) 505 543 else 506 AC_MSG_ERROR([Dakota version not found or version ($ DAKOTA_VERSION) not supported!]);544 AC_MSG_ERROR([Dakota version not found or version (${DAKOTA_VERSION}) not supported!]); 507 545 fi 546 ;; 547 *darwin*) 548 if test "${DAKOTA_VERSION}" == "5.1" || test "${DAKOTA_VERSION}" == "5.2"; then 549 DAKOTALIB="-L${DAKOTA_ROOT}/lib -ldakota -lteuchos -lpecos -llhs -lsparsegrid -lsurfpack -lconmin -lddace -lfsudace -ljega -lcport -loptpp -lpsuade -lncsuopt -lcolin -linterfaces -lmomh -lscolib -lpebbl -ltinyxml -lutilib -l3po -lhopspack -lnidr -lamplsolver -lboost_signals -lboost_regex -lboost_filesystem -lboost_system" 550 elif test "${DAKOTA_VERSION}" == "5.3" || test "${DAKOTA_VERSION}" == "5.3.1"; then 551 DAKOTAFLAGS="-DDISABLE_DAKOTA_CONFIG_H -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION -DDAKOTA_PLUGIN -DBOOST_DISABLE_ASSERTS -DDAKOTA_HAVE_BOOST_FS -DHAVE_UNISTD_H -DHAVE_SYSTEM -DHAVE_WORKING_FORK -DHAVE_WORKING_VFORK -DHAVE_SYS_WAIT_H -DHAVE_USLEEP -DDAKOTA_F90 -DDAKOTA_HAVE_MPI -DHAVE_PECOS -DHAVE_SURFPACK -DDAKOTA_COLINY -DDAKOTA_UTILIB -DHAVE_ADAPTIVE_SAMPLING -DHAVE_CONMIN -DDAKOTA_DDACE -DHAVE_FSUDACE -DDAKOTA_HOPS -DHAVE_JEGA -DHAVE_NCSU -DHAVE_NL2SOL -DHAVE_OPTPP -DDAKOTA_OPTPP -DHAVE_PSUADE -DHAVE_AMPL" 552 DAKOTALIB="-L${DAKOTA_ROOT}/lib -L${BOOST_ROOT}/lib -ldakota_src -lpecos_src -lscolib -ljega_fe -llhs -lpebbl -lcolin -linterfaces -lmods -lmoga -loptpp -lsampling -lsoga -lsurfpack -lutilib -lconmin -ldakota_src_fortran -lmod -lncsuopt -lsurfpack_fortran -lteuchos -l3po -lamplsolver -lanalyzer -lbose -lcport -ldace -ldfftpack -leutils -lfsudace -lhopspack -ljega -lnidr -lpecos -lpsuade -lrandom -ltinyxml -lutilities -lsparsegrid -lboost_signals -lboost_regex -lboost_filesystem -lboost_system" 553 AC_DEFINE([DISABLE_DAKOTA_CONFIG_H], [1], [disabling DAKOTA_CONFIG_H]) 554 AC_DEFINE([DAKOTA_HAVE_MPI], [1], [enabling parallel MPI]) 555 elif test "${DAKOTA_VERSION}" == "6.1" || test "${DAKOTA_VERSION}" == "6.2"; then 556 DAKOTAFLAGS="-DDISABLE_DAKOTA_CONFIG_H -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION -DDAKOTA_PLUGIN -DBOOST_DISABLE_ASSERTS -DDAKOTA_HAVE_BOOST_FS -DHAVE_UNISTD_H -DHAVE_SYSTEM -DHAVE_WORKING_FORK -DHAVE_WORKING_VFORK -DHAVE_SYS_WAIT_H -DHAVE_USLEEP -DDAKOTA_F90 -DDAKOTA_HAVE_MPI -DHAVE_PECOS -DHAVE_SURFPACK -DDAKOTA_UTILIB -DHAVE_ADAPTIVE_SAMPLING -DHAVE_CONMIN -DDAKOTA_DDACE -DHAVE_FSUDACE -DDAKOTA_HOPS -DHAVE_NCSU -DHAVE_NL2SOL -DHAVE_OPTPP -DDAKOTA_OPTPP -DHAVE_PSUADE -DHAVE_AMPL" 557 if test "x${enable_standalone_executables}" == "xyes"; then 558 DAKOTALIB="-L${DAKOTA_ROOT}/lib -ldakota_src -ldream -lfsudace -lddace -lnomad -lpecos_src -llhs -llhs_mods -loptpp -lsurfpack -lconmin -ldakota_src_fortran -llhs_mod -lncsuopt -lsurfpack_fortran -lteuchos -lamplsolver -lcport -ldfftpack -lfsudace -lhopspack -lnidr -lpecos -lpsuade -lsparsegrid ${BOOST_ROOT}/lib/libboost_serialization.a ${BOOST_ROOT}/lib/libboost_signals.a ${BOOST_ROOT}/lib/libboost_regex.a ${BOOST_ROOT}/lib/libboost_filesystem.a ${BOOST_ROOT}/lib/libboost_system.a" 559 else 560 DAKOTALIB="-L${DAKOTA_ROOT}/lib -L${BOOST_ROOT}/lib -ldakota_src -ldream -lfsudace -lddace -lnomad -lpecos_src -llhs -llhs_mods -loptpp -lsurfpack -lconmin -ldakota_src_fortran -llhs_mod -lncsuopt -lsurfpack_fortran -lteuchos -lamplsolver -lcport -ldfftpack -lfsudace -lhopspack -lnidr -lpecos -lpsuade -lsparsegrid -lboost_serialization -lboost_signals -lboost_regex -lboost_filesystem -lboost_system" 561 fi 562 AC_DEFINE([DISABLE_DAKOTA_CONFIG_H], [1], [disabling DAKOTA_CONFIG_H]) 563 AC_DEFINE([DAKOTA_HAVE_MPI], [1], [enabling Dakota with MPI]) 564 elif test "${DAKOTA_VERSION}" == "6.11"; then 565 DAKOTAFLAGS="-DDISABLE_DAKOTA_CONFIG_H -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION -DDAKOTA_PLUGIN -DBOOST_DISABLE_ASSERTS -DDAKOTA_HAVE_BOOST_FS -DHAVE_UNISTD_H -DHAVE_SYSTEM -DHAVE_WORKING_FORK -DHAVE_WORKING_VFORK -DHAVE_SYS_WAIT_H -DHAVE_USLEEP -DDAKOTA_F90 -DDAKOTA_HAVE_MPI -DHAVE_PECOS -DHAVE_SURFPACK -DDAKOTA_UTILIB -DHAVE_ADAPTIVE_SAMPLING -DHAVE_CONMIN -DDAKOTA_DDACE -DHAVE_FSUDACE -DDAKOTA_HOPS -DHAVE_NCSU -DHAVE_NL2SOL -DHAVE_OPTPP -DDAKOTA_OPTPP -DHAVE_PSUADE -DHAVE_AMPL" 566 dnl See $ISSM_DIR/dakota/build/src/Makefile.export.Dakota -> Dakota_LIBRARIES 567 DAKOTALIB="-L${DAKOTA_ROOT}/lib -ldakota_src -ldakota_src_fortran -lnidr -lteuchosremainder -lteuchosnumerics -lteuchoscomm -lteuchosparameterlist -lteuchosparser -lteuchoscore -lpecos_util -lpecos_src -llhs -llhs_mods -llhs_mod -ldfftpack -lsparsegrid -lsurfpack -lsurfpack -lsurfpack_fortran -lapproxnn -lconmin -lddace -ldream -lfsudace -lhopspack -lncsuopt -lcport -lnomad -loptpp -lpsuade -lamplsolver -L${BOOST_ROOT}/lib -lboost_serialization -lboost_regex -lboost_filesystem -lboost_system" 568 AC_DEFINE([DISABLE_DAKOTA_CONFIG_H], [1], [disabling DAKOTA_CONFIG_H]) 569 AC_DEFINE([DAKOTA_HAVE_MPI], [1], [enabling Dakota with MPI]) 570 else 571 AC_MSG_ERROR([Dakota version not found or version (${DAKOTA_VERSION}) not supported!]); 508 572 fi 509 573 ;; 510 574 *linux*) 511 if test x$DAKOTA_VERSION = x5.1 || test x$DAKOTA_VERSION = x5.2; then512 DAKOTALIB="-L$ DAKOTA_ROOT/lib -ldakota -lteuchos -lpecos -llhs -lsparsegrid -lsurfpack -lconmin -lddace -lfsudace -ljega -lcport -loptpp -lpsuade -lncsuopt -lcolin -linterfaces -lmomh -lscolib -lpebbl -ltinyxml -lutilib -l3po -lhopspack -lnidr -lamplsolver -lboost_signals -lboost_regex -lboost_filesystem -lboost_system -ldl"513 el se if test x$DAKOTA_VERSION = x5.3 || test x$DAKOTA_VERSION = x5.3.1; then575 if test "${DAKOTA_VERSION}" == "5.1" || test "${DAKOTA_VERSION}" == "5.2"; then 576 DAKOTALIB="-L${DAKOTA_ROOT}/lib -ldakota -lteuchos -lpecos -llhs -lsparsegrid -lsurfpack -lconmin -lddace -lfsudace -ljega -lcport -loptpp -lpsuade -lncsuopt -lcolin -linterfaces -lmomh -lscolib -lpebbl -ltinyxml -lutilib -l3po -lhopspack -lnidr -lamplsolver -lboost_signals -lboost_regex -lboost_filesystem -lboost_system -ldl" 577 elif test "${DAKOTA_VERSION}" == "5.3" || test "${DAKOTA_VERSION}" == "5.3.1"; then 514 578 DAKOTAFLAGS="-DDISABLE_DAKOTA_CONFIG_H -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION -DDAKOTA_PLUGIN -DBOOST_DISABLE_ASSERTS -DDAKOTA_HAVE_BOOST_FS -DHAVE_UNISTD_H -DHAVE_SYSTEM -DHAVE_WORKING_FORK -DHAVE_WORKING_VFORK -DHAVE_SYS_WAIT_H -DHAVE_USLEEP -DDAKOTA_F90 -DDAKOTA_HAVE_MPI -DHAVE_PECOS -DHAVE_SURFPACK -DDAKOTA_COLINY -DDAKOTA_UTILIB -DHAVE_ADAPTIVE_SAMPLING -DHAVE_CONMIN -DDAKOTA_DDACE -DHAVE_FSUDACE -DDAKOTA_HOPS -DHAVE_JEGA -DHAVE_NCSU -DHAVE_NL2SOL -DHAVE_OPTPP -DDAKOTA_OPTPP -DHAVE_PSUADE -DHAVE_AMPL" 515 DAKOTALIB="-L$DAKOTA_ROOT/lib -L$BOOST_ROOT/lib -ldakota_src -lpecos_src -lscolib -ljega_fe -llhs -lpebbl -lcolin -linterfaces -lmods -lmoga -loptpp -lsampling -lsoga -lsurfpack -lutilib -lconmin -ldakota_src_fortran -lmod -lncsuopt -lsurfpack_fortran -lteuchos -l3po -lamplsolver -lanalyzer -lbose -lcport -ldace -ldfftpack -leutils -lfsudace -lhopspack -ljega -lnidr -lpecos -lpsuade -lrandom -ltinyxml -lutilities -lsparsegrid -lboost_signals -lboost_regex -lboost_filesystem -lboost_system" 516 AC_DEFINE([DISABLE_DAKOTA_CONFIG_H],[1],[disabling DAKOTA_CONFIG_H]) 517 AC_DEFINE([DAKOTA_HAVE_MPI],[1],[enabling parallel MPI]) 518 else if test x$DAKOTA_VERSION = x6.1 || test x$DAKOTA_VERSION = x6.2; then 519 DAKOTAFLAGS="-DDISABLE_DAKOTA_CONFIG_H -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION -DDAKOTA_PLUGIN -DBOOST_DISABLE_ASSERTS -DDAKOTA_HAVE_BOOST_FS -DHAVE_UNISTD_H -DHAVE_SYSTEM -DHAVE_WORKING_FORK -DHAVE_WORKING_VFORK -DHAVE_SYS_WAIT_H -DHAVE_USLEEP -DDAKOTA_F90 -DDAKOTA_HAVE_MPI -DHAVE_PECOS -DHAVE_SURFPACK -DDAKOTA_UTILIB -DHAVE_ADAPTIVE_SAMPLING -DHAVE_CONMIN -DDAKOTA_DDACE -DHAVE_FSUDACE -DDAKOTA_HOPS -DHAVE_NCSU -DHAVE_NL2SOL -DHAVE_OPTPP -DDAKOTA_OPTPP -DHAVE_PSUADE -DHAVE_AMPL" 520 if test "x$enable_standalone_executables" = "xyes"; then 521 DAKOTALIB="-L$DAKOTA_ROOT/lib -ldakota_src -ldream -lfsudace -lddace -lnomad -lpecos_src -llhs -llhs_mods -loptpp -lsurfpack -lconmin -ldakota_src_fortran -llhs_mod -lncsuopt -lsurfpack_fortran -lteuchos -lamplsolver -lcport -ldfftpack -lfsudace -lhopspack -lnidr -lpecos -lpsuade -lsparsegrid $BOOST_ROOT/lib/libboost_serialization.a $BOOST_ROOT/lib/libboost_signals.a $BOOST_ROOT/lib/libboost_regex.a $BOOST_ROOT/lib/libboost_filesystem.a $BOOST_ROOT/lib/libboost_system.a" 522 else 523 DAKOTALIB="-L$DAKOTA_ROOT/lib -L$BOOST_ROOT/lib -ldakota_src -ldream -lfsudace -lddace -lnomad -lpecos_src -llhs -llhs_mods -loptpp -lsurfpack -lconmin -ldakota_src_fortran -llhs_mod -lncsuopt -lsurfpack_fortran -lteuchos -lamplsolver -lcport -ldfftpack -lfsudace -lhopspack -lnidr -lpecos -lpsuade -lsparsegrid -lboost_serialization -lboost_signals -lboost_regex -lboost_filesystem -lboost_system" 579 DAKOTALIB="-L${DAKOTA_ROOT}/lib -L${BOOST_ROOT}/lib -ldakota_src -lpecos_src -lscolib -ljega_fe -llhs -lpebbl -lcolin -linterfaces -lmods -lmoga -loptpp -lsampling -lsoga -lsurfpack -lutilib -lconmin -ldakota_src_fortran -lmod -lncsuopt -lsurfpack_fortran -lteuchos -l3po -lamplsolver -lanalyzer -lbose -lcport -ldace -ldfftpack -leutils -lfsudace -lhopspack -ljega -lnidr -lpecos -lpsuade -lrandom -ltinyxml -lutilities -lsparsegrid -lboost_signals -lboost_regex -lboost_filesystem -lboost_system" 580 AC_DEFINE([DISABLE_DAKOTA_CONFIG_H], [1], [disabling DAKOTA_CONFIG_H]) 581 AC_DEFINE([DAKOTA_HAVE_MPI], [1], [enabling Dakota with MPI]) 582 elif test "${DAKOTA_VERSION}" == "6.1" || test "${DAKOTA_VERSION}" == "6.2"; then 583 if test "${BOOST_VERSION_MAJOR}" == "1"; then 584 if test "${BOOST_VERSION_MINOR}" == "55"; then 585 DAKOTAFLAGS="-DDISABLE_DAKOTA_CONFIG_H -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION -DDAKOTA_PLUGIN -DBOOST_DISABLE_ASSERTS -DDAKOTA_HAVE_BOOST_FS -DHAVE_UNISTD_H -DHAVE_SYSTEM -DHAVE_WORKING_FORK -DHAVE_WORKING_VFORK -DHAVE_SYS_WAIT_H -DHAVE_USLEEP -DDAKOTA_F90 -DDAKOTA_HAVE_MPI -DHAVE_PECOS -DHAVE_SURFPACK -DDAKOTA_UTILIB -DHAVE_ADAPTIVE_SAMPLING -DHAVE_CONMIN -DDAKOTA_DDACE -DHAVE_FSUDACE -DDAKOTA_HOPS -DHAVE_NCSU -DHAVE_NL2SOL -DHAVE_OPTPP -DDAKOTA_OPTPP -DHAVE_PSUADE -DHAVE_AMPL" 586 DAKOTALIB="-L${DAKOTA_ROOT}/lib -ldakota_src -ldream -lfsudace -lddace -lnomad -lpecos_src -llhs -llhs_mods -loptpp -lsurfpack -lconmin -ldakota_src_fortran -llhs_mod -lncsuopt -lsurfpack_fortran -lteuchos -lamplsolver -lcport -ldfftpack -lfsudace -lhopspack -lnidr -lpecos -lpsuade -lsparsegrid -L$BOOST_ROOT/lib -lboost_serialization -lboost_signals -lboost_regex -lboost_filesystem -lboost_system -L${BLASLAPACK_ROOT}/lib -llapack -lblas" 587 elif test "${BOOST_VERSION_MINOR}" = "72"; then 588 DAKOTAFLAGS="-DHAVE_CONFIG_H -DHAVE_CONFIG_H -DDISABLE_DAKOTA_CONFIG_H -DBOOST_DISABLE_ASSERTS -DHAVE_UNISTD_H -DHAVE_SYSTEM -DHAVE_WORKING_FORK -DHAVE_WORKING_VFORK -DHAVE_SYS_WAIT_H -DHAVE_USLEEP -DDAKOTA_F90 -DDAKOTA_HAVE_MPI -DHAVE_PECOS -DHAVE_SURFPACK -DHAVE_ADAPTIVE_SAMPLING -DHAVE_ESM -DHAVE_CONMIN -DHAVE_DDACE -DHAVE_DREAM -DHAVE_FSUDACE -DDAKOTA_HOPS -DHAVE_NCSU -DHAVE_NL2SOL -DHAVE_NOMAD -DHAVE_OPTPP -DDAKOTA_OPTPP -DHAVE_PSUADE -DHAVE_AMPL" 589 dnl See $ISSM_DIR/dakota/build/src/Makefile.export.Dakota -> Dakota_LIBRARIES 590 DAKOTALIB="-L${DAKOTA_ROOT}/lib -ldakota_src -ldakota_src_fortran -lnidr -lteuchos -lpecos -lpecos_src -llhs -llhs_mods -llhs_mod -ldfftpack -lsparsegrid -lsurfpack -lsurfpack -lsurfpack_fortran -lconmin -lddace -ldream -lfsudace -lhopspack -lncsuopt -lcport -lnomad -loptpp -lpsuade -lamplsolver -L${BOOST_ROOT}/lib -lboost_filesystem -lboost_program_options -lboost_regex -lboost_serialization -lboost_system -L${BLASLAPACK_ROOT}/lib -llapack -lblas" 591 fi 524 592 fi 525 AC_DEFINE([DISABLE_DAKOTA_CONFIG_H],[1],[disabling DAKOTA_CONFIG_H]) 526 AC_DEFINE([DAKOTA_HAVE_MPI],[1],[enabling parallel MPI]) 593 AC_DEFINE([DISABLE_DAKOTA_CONFIG_H], [1], [disabling DAKOTA_CONFIG_H]) 594 AC_DEFINE([DAKOTA_HAVE_MPI], [1], [enabling Dakota with MPI]) 595 elif test "${DAKOTA_VERSION}" == "6.11"; then 596 if test "${BOOST_VERSION_MAJOR}" == "1"; then 597 if test "${BOOST_VERSION_MINOR}" == "55"; then 598 DAKOTAFLAGS="-DDISABLE_DAKOTA_CONFIG_H -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION -DDAKOTA_PLUGIN -DBOOST_DISABLE_ASSERTS -DDAKOTA_HAVE_BOOST_FS -DHAVE_UNISTD_H -DHAVE_SYSTEM -DHAVE_WORKING_FORK -DHAVE_WORKING_VFORK -DHAVE_SYS_WAIT_H -DHAVE_USLEEP -DDAKOTA_F90 -DDAKOTA_HAVE_MPI -DHAVE_PECOS -DHAVE_SURFPACK -DDAKOTA_UTILIB -DHAVE_ADAPTIVE_SAMPLING -DHAVE_CONMIN -DDAKOTA_DDACE -DHAVE_FSUDACE -DDAKOTA_HOPS -DHAVE_NCSU -DHAVE_NL2SOL -DHAVE_OPTPP -DDAKOTA_OPTPP -DHAVE_PSUADE -DHAVE_AMPL" 599 DAKOTALIB="-L${DAKOTA_ROOT}/lib -ldakota_src -ldream -lfsudace -lddace -lnomad -lpecos_src -llhs -llhs_mods -loptpp -lsurfpack -lconmin -ldakota_src_fortran -llhs_mod -lncsuopt -lsurfpack_fortran -lteuchos -lamplsolver -lcport -ldfftpack -lfsudace -lhopspack -lnidr -lpecos -lpsuade -lsparsegrid -L$BOOST_ROOT/lib -lboost_serialization -lboost_signals -lboost_regex -lboost_filesystem -lboost_system -L${BLASLAPACK_ROOT}/lib -llapack -lblas" 600 elif test "${BOOST_VERSION_MINOR}" == "72"; then 601 DAKOTAFLAGS="-DHAVE_CONFIG_H -DHAVE_CONFIG_H -DDISABLE_DAKOTA_CONFIG_H -DBOOST_DISABLE_ASSERTS -DHAVE_UNISTD_H -DHAVE_SYSTEM -DHAVE_WORKING_FORK -DHAVE_WORKING_VFORK -DHAVE_SYS_WAIT_H -DHAVE_USLEEP -DDAKOTA_F90 -DDAKOTA_HAVE_MPI -DHAVE_PECOS -DHAVE_SURFPACK -DHAVE_ADAPTIVE_SAMPLING -DHAVE_ESM -DHAVE_CONMIN -DHAVE_DDACE -DHAVE_DREAM -DHAVE_FSUDACE -DDAKOTA_HOPS -DHAVE_NCSU -DHAVE_NL2SOL -DHAVE_NOMAD -DHAVE_OPTPP -DDAKOTA_OPTPP -DHAVE_PSUADE -DHAVE_AMPL" 602 DAKOTALIB="-L${DAKOTA_ROOT}/lib -ldakota_src -ldakota_src_fortran -lnidr -lteuchosremainder -lteuchosnumerics -lteuchoscomm -lteuchosparameterlist -lteuchosparser -lteuchoscore -lpecos_util -lpecos_src -llhs -llhs_mods -llhs_mod -ldfftpack -lsparsegrid -lsurfpack -lsurfpack -lsurfpack_fortran -lapproxnn -lconmin -lddace -ldream -lfsudace -lhopspack -lncsuopt -lcport -lnomad -loptpp -lpsuade -lamplsolver -L${BOOST_ROOT}/lib -lboost_filesystem -lboost_program_options -lboost_regex -lboost_serialization -lboost_system -L${BLASLAPACK_ROOT}/lib -llapack -lblas" 603 fi 604 fi 605 AC_DEFINE([DISABLE_DAKOTA_CONFIG_H], [1], [disabling DAKOTA_CONFIG_H]) 606 AC_DEFINE([DAKOTA_HAVE_MPI], [1], [enabling Dakota with MPI]) 527 607 else 528 AC_MSG_ERROR([Dakota version not found or version ($ DAKOTA_VERSION) not supported!]);608 AC_MSG_ERROR([Dakota version not found or version (${DAKOTA_VERSION}) not supported!]); 529 609 fi 530 fi531 fi532 ;;533 *darwin*)534 if test x$DAKOTA_VERSION = x5.1 || test x$DAKOTA_VERSION = x5.2; then535 DAKOTALIB="-L$DAKOTA_ROOT/lib -ldakota -lteuchos -lpecos -llhs -lsparsegrid -lsurfpack -lconmin -lddace -lfsudace -ljega -lcport -loptpp -lpsuade -lncsuopt -lcolin -linterfaces -lmomh -lscolib -lpebbl -ltinyxml -lutilib -l3po -lhopspack -lnidr -lamplsolver -lboost_signals -lboost_regex -lboost_filesystem -lboost_system"536 else if test x$DAKOTA_VERSION = x5.3 || test x$DAKOTA_VERSION = x5.3.1; then537 DAKOTAFLAGS="-DDISABLE_DAKOTA_CONFIG_H -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION -DDAKOTA_PLUGIN -DBOOST_DISABLE_ASSERTS -DDAKOTA_HAVE_BOOST_FS -DHAVE_UNISTD_H -DHAVE_SYSTEM -DHAVE_WORKING_FORK -DHAVE_WORKING_VFORK -DHAVE_SYS_WAIT_H -DHAVE_USLEEP -DDAKOTA_F90 -DDAKOTA_HAVE_MPI -DHAVE_PECOS -DHAVE_SURFPACK -DDAKOTA_COLINY -DDAKOTA_UTILIB -DHAVE_ADAPTIVE_SAMPLING -DHAVE_CONMIN -DDAKOTA_DDACE -DHAVE_FSUDACE -DDAKOTA_HOPS -DHAVE_JEGA -DHAVE_NCSU -DHAVE_NL2SOL -DHAVE_OPTPP -DDAKOTA_OPTPP -DHAVE_PSUADE -DHAVE_AMPL"538 DAKOTALIB="-L$DAKOTA_ROOT/lib -L$BOOST_ROOT/lib -ldakota_src -lpecos_src -lscolib -ljega_fe -llhs -lpebbl -lcolin -linterfaces -lmods -lmoga -loptpp -lsampling -lsoga -lsurfpack -lutilib -lconmin -ldakota_src_fortran -lmod -lncsuopt -lsurfpack_fortran -lteuchos -l3po -lamplsolver -lanalyzer -lbose -lcport -ldace -ldfftpack -leutils -lfsudace -lhopspack -ljega -lnidr -lpecos -lpsuade -lrandom -ltinyxml -lutilities -lsparsegrid -lboost_signals -lboost_regex -lboost_filesystem -lboost_system"539 AC_DEFINE([DISABLE_DAKOTA_CONFIG_H],[1],[disabling DAKOTA_CONFIG_H])540 AC_DEFINE([DAKOTA_HAVE_MPI],[1],[enabling parallel MPI])541 else if test x$DAKOTA_VERSION = x6.1 || test x$DAKOTA_VERSION = x6.2; then542 DAKOTAFLAGS="-DDISABLE_DAKOTA_CONFIG_H -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION -DDAKOTA_PLUGIN -DBOOST_DISABLE_ASSERTS -DDAKOTA_HAVE_BOOST_FS -DHAVE_UNISTD_H -DHAVE_SYSTEM -DHAVE_WORKING_FORK -DHAVE_WORKING_VFORK -DHAVE_SYS_WAIT_H -DHAVE_USLEEP -DDAKOTA_F90 -DDAKOTA_HAVE_MPI -DHAVE_PECOS -DHAVE_SURFPACK -DDAKOTA_UTILIB -DHAVE_ADAPTIVE_SAMPLING -DHAVE_CONMIN -DDAKOTA_DDACE -DHAVE_FSUDACE -DDAKOTA_HOPS -DHAVE_NCSU -DHAVE_NL2SOL -DHAVE_OPTPP -DDAKOTA_OPTPP -DHAVE_PSUADE -DHAVE_AMPL"543 if test "x$enable_standalone_executables" = "xyes"; then544 DAKOTALIB="-L$DAKOTA_ROOT/lib -ldakota_src -ldream -lfsudace -lddace -lnomad -lpecos_src -llhs -llhs_mods -loptpp -lsurfpack -lconmin -ldakota_src_fortran -llhs_mod -lncsuopt -lsurfpack_fortran -lteuchos -lamplsolver -lcport -ldfftpack -lfsudace -lhopspack -lnidr -lpecos -lpsuade -lsparsegrid $BOOST_ROOT/lib/libboost_serialization.a $BOOST_ROOT/lib/libboost_signals.a $BOOST_ROOT/lib/libboost_regex.a $BOOST_ROOT/lib/libboost_filesystem.a $BOOST_ROOT/lib/libboost_system.a"545 else546 DAKOTALIB="-L$DAKOTA_ROOT/lib -L$BOOST_ROOT/lib -ldakota_src -ldream -lfsudace -lddace -lnomad -lpecos_src -llhs -llhs_mods -loptpp -lsurfpack -lconmin -ldakota_src_fortran -llhs_mod -lncsuopt -lsurfpack_fortran -lteuchos -lamplsolver -lcport -ldfftpack -lfsudace -lhopspack -lnidr -lpecos -lpsuade -lsparsegrid -lboost_serialization -lboost_signals -lboost_regex -lboost_filesystem -lboost_system"547 fi548 AC_DEFINE([DISABLE_DAKOTA_CONFIG_H],[1],[disabling DAKOTA_CONFIG_H])549 AC_DEFINE([DAKOTA_HAVE_MPI],[1],[enabling parallel MPI])550 else551 AC_MSG_ERROR([Dakota version not found or version ($DAKOTA_VERSION) not supported!]);552 fi553 fi554 fi555 610 ;; 556 611 esac 557 612 558 case $ DAKOTA_VERSIONin559 @<:@1-9@:>@ .@<:@0-9@:>@.@<:@0-9@:>@)560 DAKOTA_MAJOR=`echo $ DAKOTA_VERSION| sed -e 's/^\(@<:@0-9@:>@*\)\..*/\1/'`561 DAKOTA_MINOR=`echo $ DAKOTA_VERSION| sed -e 's/^@<:@0-9@:>@*\.\(@<:@0-9@:>@*\)\..*/\1/'`562 DAKOTA_BUILD=`echo $ DAKOTA_VERSION| sed -e 's/^@<:@0-9@:>@*\.@<:@0-9@:>@*\.\(@<:@0-9@:>@*\).*/\1/'`563 ;; 564 @<:@1-9@:>@ .@<:@0-9@:>@)565 DAKOTA_MAJOR=`echo $ DAKOTA_VERSION| sed -e 's/^\(@<:@0-9@:>@*\)\..*/\1/'`566 DAKOTA_MINOR=`echo $ DAKOTA_VERSION| sed -e 's/^@<:@0-9@:>@*\.\(@<:@0-9@:>@*\).*/\1/'`613 case ${DAKOTA_VERSION} in 614 @<:@1-9@:>@*.@<:@0-9@:>@*.@<:@0-9@:>@*) 615 DAKOTA_MAJOR=`echo ${DAKOTA_VERSION} | sed -e 's/^\(@<:@0-9@:>@*\)\..*/\1/'` 616 DAKOTA_MINOR=`echo ${DAKOTA_VERSION} | sed -e 's/^@<:@0-9@:>@*\.\(@<:@0-9@:>@*\)\..*/\1/'` 617 DAKOTA_BUILD=`echo ${DAKOTA_VERSION} | sed -e 's/^@<:@0-9@:>@*\.@<:@0-9@:>@*\.\(@<:@0-9@:>@*\).*/\1/'` 618 ;; 619 @<:@1-9@:>@*.@<:@0-9@:>@*) 620 DAKOTA_MAJOR=`echo ${DAKOTA_VERSION} | sed -e 's/^\(@<:@0-9@:>@*\)\..*/\1/'` 621 DAKOTA_MINOR=`echo ${DAKOTA_VERSION} | sed -e 's/^@<:@0-9@:>@*\.\(@<:@0-9@:>@*\).*/\1/'` 567 622 DAKOTA_BUILD=0 568 623 ;; 569 @<:@1-9@:>@.@<:@0-9@:>@+)570 DAKOTA_MAJOR=`echo $DAKOTA_VERSION | sed -e 's/^\(@<:@0-9@:>@*\)\..*/\1/'`571 DAKOTA_MINOR=`echo $DAKOTA_VERSION | sed -e 's/^@<:@0-9@:>@*\.\(@<:@0-9@:>@*\).*/\1/'`572 DAKOTA_BUILD=0573 ;;574 624 *) 575 AC_MSG_ERROR([Dakota version ($ DAKOTA_VERSION) not supported!]);576 625 AC_MSG_ERROR([Dakota version (${DAKOTA_VERSION}) not supported!]) 626 ;; 577 627 esac 578 AC_MSG_CHECKING(for dakota major version)579 AC_MSG_RESULT($ DAKOTA_MAJOR)580 AC_DEFINE_UNQUOTED( [_DAKOTA_MAJOR_],$DAKOTA_MAJOR,[Dakota major version number])581 AC_MSG_CHECKING(for dakota minor version)582 AC_MSG_RESULT($ DAKOTA_MINOR)583 AC_DEFINE_UNQUOTED( [_DAKOTA_MINOR_],$DAKOTA_MINOR,[Dakota minor version number])628 AC_MSG_CHECKING(for Dakota major version) 629 AC_MSG_RESULT(${DAKOTA_MAJOR}) 630 AC_DEFINE_UNQUOTED(_DAKOTA_MAJOR_, $DAKOTA_MAJOR, [Dakota major version number]) 631 AC_MSG_CHECKING(for Dakota minor version) 632 AC_MSG_RESULT(${DAKOTA_MINOR}) 633 AC_DEFINE_UNQUOTED(_DAKOTA_MINOR_, $DAKOTA_MINOR, [Dakota minor version number]) 584 634 AC_MSG_CHECKING(for dakota build version) 585 AC_MSG_RESULT($ DAKOTA_BUILD)586 AC_DEFINE_UNQUOTED( [_DAKOTA_BUILD_],$DAKOTA_BUILD,[Dakota build version number])587 588 AC_DEFINE([_HAVE_DAKOTA_], [1],[with Dakota in ISSM src])635 AC_MSG_RESULT(${DAKOTA_BUILD}) 636 AC_DEFINE_UNQUOTED(_DAKOTA_BUILD_, $DAKOTA_BUILD, [Dakota build version number]) 637 638 AC_DEFINE([_HAVE_DAKOTA_], [1], [with Dakota in ISSM src]) 589 639 AC_SUBST([DAKOTAINCL]) 590 640 AC_SUBST([DAKOTAFLAGS]) 591 641 AC_SUBST([DAKOTALIB]) 592 642 fi 593 AM_CONDITIONAL([ISSM_DAKOTA],[test x$DAKOTA_MAJOR = x6]) 594 dnl }}} 595 dnl python{{{ 596 AC_ARG_WITH([python-dir], 597 AS_HELP_STRING([--with-python-dir=DIR], [python root directory.]), 598 [PYTHON_ROOT=$withval],[PYTHON_ROOT="no"]) 599 600 AC_ARG_WITH([python-version], 601 AS_HELP_STRING([--with-python-version=DIR], [python forced version.]), 602 [PYTHON_VERSION=$withval],[PYTHON_VERSION="no"]) 603 604 dnl Check whether python is enabled 605 AC_MSG_CHECKING([for python]) 606 if test "x$PYTHON_ROOT" = "xno" ; then 643 AM_CONDITIONAL([ISSM_DAKOTA], [test "x${DAKOTA_MAJOR}" == "x6"]) 644 dnl }}} 645 dnl Python{{{ 646 AC_ARG_WITH( 647 [python-dir], 648 AS_HELP_STRING([--with-python-dir=DIR], [Python root directory]), 649 [PYTHON_ROOT=${withval}], 650 [PYTHON_ROOT="no"] 651 ) 652 653 AC_ARG_WITH( 654 [python-version], 655 AS_HELP_STRING([--with-python-version=DIR], [Python forced version]), 656 [PYTHON_VERSION=${withval}], 657 [PYTHON_VERSION="no"] 658 ) 659 AC_MSG_CHECKING([for Python]) 660 if test "x${PYTHON_ROOT}" == "xno"; then 607 661 HAVE_PYTHON=no 608 662 HAVE_PYTHON3=no 609 663 else 610 664 HAVE_PYTHON=yes 611 if ! test -d "$PYTHON_ROOT"; then 612 AC_MSG_ERROR([python directory provided ($PYTHON_ROOT) does not exist]); 613 fi 614 fi 615 AC_MSG_RESULT($HAVE_PYTHON) 616 AM_CONDITIONAL([PYTHON],[test x$HAVE_PYTHON = xyes]) 617 618 dnl python specifics 619 if test "x$HAVE_PYTHON" = "xyes"; then 620 if test "x$PYTHON_VERSION" = "xno" ; then 621 AC_MSG_CHECKING([for python version]) 622 dnl Query Python for its version number. Getting [:3] seems to be the 623 dnl best way to do this; it's what "site.py" does in the standard library. 624 PYTHON_VERSION=$($PYTHON_ROOT/bin/python -c "import sys; print sys.version[[:3]]") 625 AC_MSG_RESULT($PYTHON_VERSION) 665 if ! test -d "${PYTHON_ROOT}"; then 666 AC_MSG_ERROR([Python directory provided (${PYTHON_ROOT}) does not exist!]); 667 fi 668 fi 669 AC_MSG_RESULT([${HAVE_PYTHON}]) 670 AM_CONDITIONAL([PYTHON], [test "x${HAVE_PYTHON}" == "xyes"]) 671 672 dnl Python specifics 673 if test "x${HAVE_PYTHON}" == "xyes"; then 674 if test "x${PYTHON_VERSION}" == "xno"; then 675 AC_MSG_CHECKING([for Python version]) 676 dnl Query Python for its version number. Getting [:3] seems to be 677 dnl the best way to do this: it's what "site.py" does in the 678 dnl standard library. 679 PYTHON_VERSION=$(${PYTHON_ROOT}/bin/python -c "import sys; print sys.version[[:3]]") 680 AC_MSG_RESULT([${PYTHON_VERSION}]) 626 681 else 627 AC_MSG_RESULT([enforced python version is ]$PYTHON_VERSION)628 fi 629 dnl recover major682 AC_MSG_RESULT([enforced Python version is ${PYTHON_VERSION}]) 683 fi 684 dnl Determine major version 630 685 PYTHON_MAJOR=${PYTHON_VERSION%.*} 631 AC_DEFINE_UNQUOTED( [_PYTHON_MAJOR_],$PYTHON_MAJOR,[python version major])632 if test "x$ PYTHON_MAJOR"= "x3"; then686 AC_DEFINE_UNQUOTED(_PYTHON_MAJOR_, $PYTHON_MAJOR, [Python version major]) 687 if test "x${PYTHON_MAJOR}" == "x3"; then 633 688 HAVE_PYTHON3="yes" 634 689 else … … 636 691 fi 637 692 638 AC_MSG_CHECKING([for python header file Python.h])639 dnl Python.h might ybe in different locations:640 if test -f "$ PYTHON_ROOT/include/Python.h"; then641 PYTHONINCL=-I$ PYTHON_ROOT/include642 el se if test -f "$PYTHON_ROOT/include/python$PYTHON_VERSION/Python.h"; then643 PYTHONINCL=-I$ PYTHON_ROOT/include/python$PYTHON_VERSION644 el se if test -f "$PYTHON_ROOT/include/python$PYTHON_VERSIONm/Python.h"; then645 PYTHONINCL=-I$ PYTHON_ROOT/include/python$PYTHON_VERSIONm693 AC_MSG_CHECKING([for Python header file Python.h]) 694 dnl Python.h might be in different locations: 695 if test -f "${PYTHON_ROOT}/include/Python.h"; then 696 PYTHONINCL=-I${PYTHON_ROOT}/include 697 elif test -f "${PYTHON_ROOT}/include/python${PYTHON_VERSION}/Python.h"; then 698 PYTHONINCL=-I${PYTHON_ROOT}/include/python${PYTHON_VERSION} 699 elif test -f "${PYTHON_ROOT}/include/python${PYTHON_VERSION}m/Python.h"; then 700 PYTHONINCL=-I${PYTHON_ROOT}/include/python${PYTHON_VERSION}m 646 701 else 647 702 AC_MSG_ERROR([Python.h not found, locate this file and contact ISSM developers]); 648 703 fi 649 fi 650 fi 651 AC_MSG_RESULT(found) 652 if test "x$PYTHON_MAJOR" = "x3"; then 653 PYTHONLIB="-L$PYTHON_ROOT/lib -lpython$PYTHON_VERSION""m" 704 AC_MSG_RESULT([found]) 705 if test "x${PYTHON_MAJOR}" == "x3"; then 706 PYTHONLIB="-L${PYTHON_ROOT}/lib -lpython${PYTHON_VERSION}m" 654 707 else 655 PYTHONLIB="-L$PYTHON_ROOT/lib -lpython$PYTHON_VERSION"708 PYTHONLIB="-L${PYTHON_ROOT}/lib -lpython${PYTHON_VERSION}" 656 709 fi 657 710 PYTHONEXT=.so 658 711 case "${host_os}" in 659 712 *cygwin*) 660 PYTHONLINK="-shared"713 PYTHONLINK="-shared" 661 714 ;; 662 715 *linux*) 663 PYTHONLINK="-shared"716 PYTHONLINK="-shared" 664 717 ;; 665 718 *darwin*) 666 PYTHONLINK="-dynamiclib"719 PYTHONLINK="-dynamiclib" 667 720 ;; 668 721 esac 669 AC_DEFINE([_HAVE_PYTHON_], [1],[with python in ISSM src])722 AC_DEFINE([_HAVE_PYTHON_], [1], [with Python in ISSM src]) 670 723 AC_SUBST([PYTHONINCL]) 671 724 AC_SUBST([PYTHONLIB]) 672 PYTHONWRAPPEREXT=$ PYTHONEXT725 PYTHONWRAPPEREXT=${PYTHONEXT} 673 726 AC_SUBST([PYTHONWRAPPEREXT]) 674 727 AC_SUBST([PYTHONLINK]) 675 728 fi 676 AM_CONDITIONAL([PYTHON3], [test x$HAVE_PYTHON3 = xyes]) 677 dnl }}} 678 dnl python-numpy{{{ 679 AC_ARG_WITH([python-numpy-dir], 680 AS_HELP_STRING([--with-python-numpy-dir=DIR], [python-numpy root directory.]), 681 [PYTHON_NUMPY_ROOT=$withval],[PYTHON_NUMPY_ROOT="no"]) 682 683 dnl you can find numpy by typing 684 dnl >>> import numpy 685 dnl >>> numpy.__file__ 686 dnl '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/__init__.pyc' 687 688 dnl Check whether numpy is enabled 729 AM_CONDITIONAL([PYTHON3], [test "x${HAVE_PYTHON3}" == "xyes"]) 730 dnl }}} 731 dnl NumPy{{{ 732 dnl TODO: 733 dnl - Replace references to python-numpy with numpy (and similar terms) 734 dnl project-wide 735 dnl 736 AC_ARG_WITH( 737 [python-numpy-dir], 738 AS_HELP_STRING([--with-python-numpy-dir=DIR], [python-numpy root directory]), 739 [PYTHON_NUMPY_ROOT=${withval}], 740 [PYTHON_NUMPY_ROOT="no"] 741 ) 742 743 dnl NOTE: You can find NumPy by running, 744 dnl 745 dnl >>> import numpy 746 dnl >>> numpy.__file__ 747 dnl 748 689 749 AC_MSG_CHECKING(for python-numpy) 690 if test "x$ PYTHON_NUMPY_ROOT" = "xno"; then750 if test "x${PYTHON_NUMPY_ROOT}" == "xno"; then 691 751 HAVE_PYTHON_NUMPY=no 692 752 else 693 753 HAVE_PYTHON_NUMPY=yes 694 if ! test -d "$ PYTHON_NUMPY_ROOT"; then695 AC_MSG_ERROR([ numpy directory provided ($PYTHON_NUMPY_ROOT) does not exist]);696 fi 697 fi 698 AC_MSG_RESULT( $HAVE_PYTHON_NUMPY)699 700 dnl numpy lib701 if test "x$ HAVE_PYTHON_NUMPY"= "xyes"; then702 PYTHON_NUMPYINCL="-I$ PYTHON_NUMPY_ROOT -I$PYTHON_NUMPY_ROOT/core/include/numpy"703 AC_DEFINE([_HAVE_PYTHON_NUMPY_], [1],[with Python-Numpy in ISSM src])754 if ! test -d "${PYTHON_NUMPY_ROOT}"; then 755 AC_MSG_ERROR([NumPy directory provided (${PYTHON_NUMPY_ROOT}) does not exist!]); 756 fi 757 fi 758 AC_MSG_RESULT([${HAVE_PYTHON_NUMPY}]) 759 760 dnl NumPy libraries and header files 761 if test "x${HAVE_PYTHON_NUMPY}" == "xyes"; then 762 PYTHON_NUMPYINCL="-I${PYTHON_NUMPY_ROOT} -I${PYTHON_NUMPY_ROOT}/core/include/numpy" 763 AC_DEFINE([_HAVE_PYTHON_NUMPY_], [1], [with NumPy in ISSM src]) 704 764 AC_SUBST([PYTHON_NUMPYINCL]) 705 765 fi 706 766 dnl }}} 707 dnl chaco{{{ 708 AC_ARG_WITH([chaco-dir], 709 AS_HELP_STRING([--with-chaco-dir=DIR], [chaco root directory.]), 710 [CHACO_ROOT=$withval],[CHACO_ROOT="no"]) 711 712 dnl Check whether chaco is enabled 713 AC_MSG_CHECKING([for chaco]) 714 if test "x$CHACO_ROOT" = "xno" ; then 767 dnl Chaco{{{ 768 AC_ARG_WITH( 769 [chaco-dir], 770 AS_HELP_STRING([--with-chaco-dir=DIR], [Chaco root directory]), 771 [CHACO_ROOT=${withval}], 772 [CHACO_ROOT="no"] 773 ) 774 AC_MSG_CHECKING([for Chaco]) 775 if test "x${CHACO_ROOT}" == "xno"; then 715 776 HAVE_CHACO=no 716 777 else 717 778 HAVE_CHACO=yes 718 if ! test -d "$ CHACO_ROOT"; then719 AC_MSG_ERROR([ chaco directory provided ($CHACO_ROOT) does not exist]);720 fi 721 fi 722 AC_MSG_RESULT( $HAVE_CHACO)723 AM_CONDITIONAL([CHACO], [test x$HAVE_CHACO = xyes])724 725 dnl libraryand header files726 if test "x$ HAVE_CHACO"= "xyes"; then727 CHACOINCL=-I$ CHACO_ROOT/include728 CHACOLIB="-L$ CHACO_ROOT/lib -lchacominusblas"729 AC_DEFINE([_HAVE_CHACO_], [1],[with Chaco in ISSM src])779 if ! test -d "${CHACO_ROOT}"; then 780 AC_MSG_ERROR([Chaco directory provided (${CHACO_ROOT}) does not exist!]); 781 fi 782 fi 783 AC_MSG_RESULT([${HAVE_CHACO}]) 784 AM_CONDITIONAL([CHACO], [test "x${HAVE_CHACO}" == "xyes"]) 785 786 dnl Chaco libraries and header files 787 if test "x${HAVE_CHACO}" == "xyes"; then 788 CHACOINCL=-I${CHACO_ROOT}/include 789 CHACOLIB="-L${CHACO_ROOT}/lib -lchacominusblas" 790 AC_DEFINE([_HAVE_CHACO_], [1], [with Chaco in ISSM src]) 730 791 AC_SUBST([CHACOINCL]) 731 792 AC_SUBST([CHACOLIB]) 732 793 fi 733 794 dnl }}} 734 dnl scotch{{{ 735 AC_ARG_WITH([scotch-dir], 736 AS_HELP_STRING([--with-scotch-dir=DIR], [scotch root directory.]), 737 [SCOTCH_ROOT=$withval],[SCOTCH_ROOT="no"]) 738 739 dnl Check whether scotch is enabled 740 AC_MSG_CHECKING([for scotch]) 741 if test "x$SCOTCH_ROOT" = "xno" ; then 795 dnl ESMF{{{ 796 AC_ARG_WITH( 797 [esmf-dir], 798 AS_HELP_STRING([--with-esmf-dir=DIR], [ESMF root directory]), 799 [ESMF_ROOT=${withval}], 800 [ESMF_ROOT="no"] 801 ) 802 AC_MSG_CHECKING([for ESMF]) 803 if test "x${ESMF_ROOT}" == "xno"; then 804 HAVE_ESMF=no 805 else 806 HAVE_ESMF=yes 807 if ! test -d "${ESMF_ROOT}"; then 808 AC_MSG_ERROR([ESMF directory provided (${ESMF_ROOT}) does not exist!]); 809 fi 810 fi 811 AC_MSG_RESULT([${HAVE_ESMF}]) 812 813 dnl ESMF libraries and header files 814 if test "x${HAVE_ESMF}" == "xyes"; then 815 ESMFINCL="-I${ESMF_ROOT}/include" 816 ESMFLIB="-L${ESMF_ROOT}/lib -lesmf" 817 AC_DEFINE([_HAVE_ESMF_], [1], [with ESMF in ISSM src]) 818 AC_SUBST([ESMFINCL]) 819 AC_SUBST([ESMFLIB]) 820 fi 821 AM_CONDITIONAL([ESMF], [test "x${HAVE_ESMF}" == "xyes"]) 822 dnl }}} 823 dnl CoDiPack{{{ 824 AC_ARG_WITH( 825 [codipack-dir], 826 AS_HELP_STRING([--with-codipack-dir=DIR], [CoDiPack root directory]), 827 [CODIPACK_ROOT=${withval}], 828 [CODIPACK_ROOT="no"] 829 ) 830 AC_MSG_CHECKING([for CoDiPack]) 831 if test "x${CODIPACK_ROOT}" == "xno"; then 832 HAVE_CODIPACK=no 833 else 834 HAVE_CODIPACK=yes 835 if ! test -d "${CODIPACK_ROOT}"; then 836 AC_MSG_ERROR([CoDiPack directory provided (${CODIPACK_ROOT}) does not exist!]); 837 fi 838 fi 839 AC_MSG_RESULT([${HAVE_CODIPACK}]) 840 841 dnl CoDiPack libraries and header files 842 if test "x${HAVE_CODIPACK}" == "xyes"; then 843 CODIPACKINCL="-I${CODIPACK_ROOT}/include" 844 AC_DEFINE([_HAVE_CODIPACK_], [1], [with CoDiPack in ISSM src]) 845 AC_DEFINE([_HAVE_AD_], [1], [with AD in ISSM src]) 846 AC_SUBST([CODIPACKINCL]) 847 fi 848 AM_CONDITIONAL([CODIPACK], [test "x${HAVE_CODIPACK}" == "xyes"]) 849 AM_COND_IF(CODIPACK, [CXXFLAGS+=" -std=c++11"]) 850 dnl }}} 851 dnl Tape Allocation {{{ 852 AC_ARG_ENABLE( 853 [tape-alloc], dnl feature 854 AS_HELP_STRING([--enable-tape-alloc], [turn tape allocation support on]), 855 [enable_tape_alloc=${enableval}], 856 [enable_tape_alloc=no] 857 ) 858 AC_MSG_CHECKING(for tape allocation) 859 if test "x${enable_tape_alloc}" == "xyes"; then 860 AC_DEFINE([_AD_TAPE_ALLOC_], [1], [enable a priori tape allocation for AD]) 861 fi 862 AC_MSG_RESULT([${enable_tape_alloc}]) 863 dnl }}} 864 dnl ADOL-C {{{ 865 AC_ARG_WITH( 866 [adolc-dir], 867 AS_HELP_STRING([--with-adolc-dir=DIR], [ADOL-C root directory]), 868 [ADOLC_ROOT=${withval}], 869 [ADOLC_ROOT="no"] 870 ) 871 AC_MSG_CHECKING([for ADOL-C]) 872 if test "x${ADOLC_ROOT}" == "xno"; then 873 HAVE_ADOLC=no 874 else 875 HAVE_ADOLC=yes 876 if ! test -d "${ADOLC_ROOT}"; then 877 AC_MSG_ERROR([ADOL-C directory provided (${ADOLC_ROOT}) does not exist!]); 878 fi 879 fi 880 AC_MSG_RESULT([${HAVE_ADOLC}]) 881 882 dnl ADOL-C libraries and header files 883 if test "x${HAVE_ADOLC}" == "xyes"; then 884 ADOLCINCL="-I${ADOLC_ROOT}/include" 885 dnl ADOLCLIB="-L${ADOLC_ROOT}/lib64 -ladolc" used to be the path 886 ADOLCLIB="-L${ADOLC_ROOT}/lib -ladolc" 887 AC_DEFINE([_HAVE_ADOLC_], [1], [with ADOL-C in ISSM src]) 888 AC_DEFINE([_HAVE_AD_], [1], [with AD in ISSM src]) 889 AC_SUBST([ADOLCINCL]) 890 AC_SUBST([ADOLCLIB]) 891 fi 892 AM_CONDITIONAL([ADOLC], [test "x${HAVE_ADOLC}" == "xyes"]) 893 AM_COND_IF(ADOLC, [CXXFLAGS+=" -std=c++11"]) 894 dnl }}} 895 dnl ADOL-C version{{{ 896 AC_ARG_WITH( 897 [adolc-version], 898 AS_HELP_STRING([--with-adolc-version=number], [ADOL-C version]), 899 [ADOLC_VERSION=${withval}], 900 [ADOLC_VERSION=2] 901 ) 902 AC_MSG_CHECKING(for ADOL-C version) 903 904 AC_DEFINE_UNQUOTED(_ADOLC_VERSION_, $ADOLC_VERSION, [ADOL-C version]) 905 AC_MSG_RESULT(${ADOLC_VERSION}) 906 dnl }}} 907 dnl ADIC2 {{{ 908 AC_ARG_WITH( 909 [adic2-dir], 910 AS_HELP_STRING([--with-adic2-dir=DIR], [ADIC2 root directory]), 911 [ADIC2_ROOT=${withval}], 912 [ADIC2_ROOT="no"] 913 ) 914 AC_MSG_CHECKING([for ADIC2]) 915 if test "x${ADIC2_ROOT}" == "xno"; then 916 HAVE_ADIC2=no 917 else 918 HAVE_ADIC2=yes 919 if ! test -d "${ADIC2_ROOT}"; then 920 AC_MSG_ERROR([ADIC2 directory provided (${ADIC2_ROOT}) does not exist!]); 921 fi 922 fi 923 AC_MSG_RESULT([${HAVE_ADIC2}]) 924 925 dnl ADIC2 libraries and header files 926 if test "x${HAVE_ADIC2}" == "xyes"; then 927 ADIC2INCL="-DADIC2_DENSE -I${ADIC2_ROOT}/include -I${ADIC2_ROOT}/share/runtime_dense" 928 ADIC2LIB="" 929 AC_DEFINE([_HAVE_ADIC2_], [1], [with ADIC2 in ISSM src]) 930 AC_SUBST([ADIC2INCL]) 931 AC_SUBST([ADIC2LIB]) 932 fi 933 AM_CONDITIONAL([ADIC2], [test "x${HAVE_ADIC2}" == "xyes"]) 934 dnl }}} 935 dnl ATLAS {{{ 936 AC_ARG_WITH( 937 [atlas-dir], 938 AS_HELP_STRING([--with-atlas-dir=DIR], [ATLAS root directory]), 939 [ATLAS_ROOT=${withval}], 940 [ATLAS_ROOT="no"] 941 ) 942 AC_MSG_CHECKING(for ATLAS and CBLAS libraries) 943 if test "x${ATLAS_ROOT}" == "xno"; then 944 HAVE_ATLAS=no 945 else 946 HAVE_ATLAS=yes 947 if ! test -d "${ATLAS_ROOT}"; then 948 AC_MSG_ERROR([ATLAS directory provided (${ATLAS_ROOT}) does not exist!]); 949 fi 950 fi 951 AC_MSG_RESULT([${HAVE_ATLAS}]) 952 953 dnl ATLAS libraries and header files 954 if test "x${HAVE_ATLAS}" == "xyes"; then 955 case "${host_os}" in 956 *cygwin*) 957 ATLASLIB="-L`cygpath -m ${ATLAS_ROOT}` -Wl,libatlas.lib -Wl,libcblas.lib" 958 ;; 959 *linux*) 960 ATLASLIB="-L${ATLAS_ROOT}/lib -lcblas -latlas -lm " 961 ;; 962 *darwin*) 963 ATLASLIB="-L${ATLAS_ROOT}/lib -lcblas -latlas -lm " 964 ;; 965 esac 966 AC_DEFINE([_HAVE_ATLAS_], [1], [with ATLAS in ISSM src]) 967 AC_SUBST([ATLASLIB]) 968 fi 969 dnl }}} 970 dnl GSL{{{ 971 AC_ARG_WITH( 972 [gsl-dir], 973 AS_HELP_STRING([--with-gsl-dir=DIR], [GSL root directory]), 974 [GSL_ROOT=${withval}], 975 [GSL_ROOT="no"] 976 ) 977 AC_MSG_CHECKING([for GSL]) 978 if test "x${GSL_ROOT}" == "xno"; then 979 HAVE_GSL=no 980 else 981 HAVE_GSL=yes 982 if ! test -d "${GSL_ROOT}"; then 983 AC_MSG_ERROR([GSL directory provided (${GSL_ROOT}) does not exist!]); 984 fi 985 fi 986 AC_MSG_RESULT([${HAVE_GSL}]) 987 988 dnl GSL libraries and header files 989 if test "x${HAVE_GSL}" == "xyes"; then 990 GSLINCL="-I${GSL_ROOT}/include" 991 if test "x${HAVE_ATLAS}" == "xyes"; then 992 GSLLIB="-dy -L${GSL_ROOT}/lib -lgsl -L${ATLAS_ROOT}/lib -lcblas -latlas -lm" 993 else 994 GSLLIB="-L${GSL_ROOT}/lib -lgsl -lgslcblas -lm" 995 fi 996 AC_DEFINE([_HAVE_GSL_], [1], [with GSL in ISSM src]) 997 AC_SUBST([GSLINCL]) 998 AC_SUBST([GSLLIB]) 999 fi 1000 AM_CONDITIONAL([GSL], [test "x${HAVE_GSL}" == "xyes"]) 1001 dnl }}} 1002 dnl AMPI (ADOL-C){{{ 1003 AC_ARG_WITH( 1004 [ampi-dir], 1005 AS_HELP_STRING([--with-ampi-dir=DIR], [Adjoinable MPI root directory]), 1006 [AMPI_ROOT=${withval}], 1007 [AMPI_ROOT="no"] 1008 ) 1009 AC_MSG_CHECKING([for AMPI]) 1010 if test "x${AMPI_ROOT}" == "xno"; then 1011 HAVE_AMPI=no 1012 else 1013 HAVE_AMPI=yes 1014 if ! test -d "${AMPI_ROOT}"; then 1015 AC_MSG_ERROR([AMPI directory provided (${AMPI_ROOT}) does not exist!]); 1016 fi 1017 fi 1018 AC_MSG_RESULT([${HAVE_AMPI}]) 1019 1020 dnl AMPI libraries and header files 1021 if test "x${HAVE_AMPI}" == "xyes"; then 1022 AMPIINCL="-I${AMPI_ROOT}/include" 1023 if test "x${ADOLC_ROOT}" == "xno"; then 1024 AC_MSG_ERROR([cannot run AMPI without ADOL-C]); 1025 fi 1026 dnl AMPILIB="-dy -L${AMPI_ROOT}/lib -lampiCommon -L${ADOLC_ROOT}/lib -ladolc -L${AMPI_ROOT}/lib -lampiCommon -lampiBookkeeping -lampiTape" 1027 dnl AMPILIB="-dy -L${AMPI_ROOT}/lib -L${ADOLC_ROOT}/lib -Wl,--start-group,-lampiCommon,-ladolc,-lampiCommon,-lampiBookkeeping,-lampiTape,-lampiPlainC,-lampiADtoolStubsST,--end-group" 1028 dnl AMPILIB="-L${AMPI_ROOT}/lib -L${ADOLC_ROOT}/lib -Wl,--start-group -lampiCommon -ladolc -lampiCommon -lampiBookkeeping -lampiTape -lampiPlainC -lampiADtoolStubsST -Wl,--end-group" 1029 dnl AMPILIB="${AMPI_ROOT}/lib/libampiCommon.so ${ADOLC_ROOT}/lib/libadolc.so ${AMPI_ROOT}/lib/libampiCommon.so ${AMPI_ROOT}/lib/libampiBookkeeping.so ${AMPI_ROOT}/lib/libampiTape.so ${AMPI_ROOT}/lib/libampiPlainC.so ${AMPI_ROOT}/lib/libampiADtoolStubsST.so" 1030 dnl AMPILIB="-dy -L${AMPI_ROOT}/lib -L${ADOLC_ROOT}/lib -lampiCommon -ladolc -lampiCommon -lampiBookkeeping -lampiTape -lampiPlainC -lampiADtoolStubsST" 1031 AMPILIB="-dy -L${AMPI_ROOT}/lib -lampiCommon -lampiBookkeeping -lampiTape" 1032 AC_DEFINE([_HAVE_AMPI_], [1], [with AMPI in ISSM src]) 1033 AC_SUBST([AMPIINCL]) 1034 AC_SUBST([AMPILIB]) 1035 fi 1036 AM_CONDITIONAL([AMPI], [test "x${HAVE_AMPI}" == "xyes"]) 1037 dnl }}} 1038 dnl Adjoint MPI (CoDiPack){{{ 1039 AC_ARG_WITH( 1040 [adjointmpi-dir], 1041 AS_HELP_STRING([--with-adjointmpi-dir=DIR], [Adjoint MPI root directory]), 1042 [ADJOINTMPI_ROOT=${withval}], 1043 [ADJOINTMPI_ROOT="no"] 1044 ) 1045 AC_MSG_CHECKING([for Adjoint MPI]) 1046 if test "x${ADJOINTMPI_ROOT}" == "xno"; then 1047 HAVE_ADJOINTMPI=no 1048 else 1049 HAVE_ADJOINTMPI=yes 1050 if ! test -d "${ADJOINTMPI_ROOT}"; then 1051 AC_MSG_ERROR([Adjoint MPI directory provided (${ADJOINTMPI_ROOT}) does not exist!]); 1052 fi 1053 fi 1054 AC_MSG_RESULT([${HAVE_ADJOINTMPI}]) 1055 1056 dnl Adjoint MPI libraries and header files 1057 if test "x${HAVE_ADJOINTMPI}" == "xyes"; then 1058 if test "x${CODIPACK_ROOT}" == "xno"; then 1059 AC_MSG_ERROR([cannot run Adjoint MPI without CoDiPack]); 1060 fi 1061 ADJOINTMPIINCL="-I${ADJOINTMPI_ROOT}/include" 1062 ADJOINTMPILIB="-L${ADJOINTMPI_ROOT}/lib -lAMPI" 1063 dnl Also set _HAVE_AMPI_, because the interface is (almost) the same as 1064 dnl for AMPI 1065 AC_DEFINE([_HAVE_AMPI_], [1], [with AMPI in ISSM src]) 1066 AC_DEFINE([_HAVE_ADJOINTMPI_], [1], [with Adjoint MPI in ISSM src]) 1067 AC_SUBST([ADJOINTMPIINCL]) 1068 AC_SUBST([ADJOINTMPILIB]) 1069 fi 1070 AM_CONDITIONAL([ADJOINTMPI], [test "x${HAVE_ADJOINTMPI}" == "xyes"]) 1071 dnl }}} 1072 dnl MeDiPack (CoDiPack, ADOL-C dev){{{ 1073 AC_ARG_WITH( 1074 [medipack-dir], 1075 AS_HELP_STRING([--with-medipack-dir=DIR], [MeDiPack root directory]), 1076 [MEDIPACK_ROOT=${withval}], 1077 [MEDIPACK_ROOT="no"] 1078 ) 1079 AC_MSG_CHECKING([for MeDiPack]) 1080 if test "x${MEDIPACK_ROOT}" == "xno"; then 1081 HAVE_MEDIPACK=no 1082 else 1083 HAVE_MEDIPACK=yes 1084 if ! test -d "${MEDIPACK_ROOT}"; then 1085 AC_MSG_ERROR([MeDiPack directory provided (${MEDIPACK_ROOT}) does not exist!]); 1086 fi 1087 fi 1088 AC_MSG_RESULT([${HAVE_MEDIPACK}]) 1089 1090 dnl MeDiPack libraries and header files 1091 if test "x${HAVE_MEDIPACK}" == "xyes"; then 1092 if test "x${CODIPACK_ROOT}" == "xno"; then 1093 AC_MSG_ERROR([cannot run MeDiPack without CoDiPack]); 1094 fi 1095 MEDIPACKINCL="-I${MEDIPACK_ROOT}/include -I${MEDIPACK_ROOT}/src" 1096 dnl Also set _HAVE_AMPI_, because the interface is (almost) the same as 1097 dnl for AMPI 1098 AC_DEFINE([_HAVE_AMPI_], [1], [with AMPI in ISSM src]) 1099 AC_DEFINE([_HAVE_MEDIPACK_], [1], [with MeDiPack in ISSM src]) 1100 AC_SUBST([MEDIPACKINCL]) 1101 fi 1102 AM_CONDITIONAL([MEDIPACK], [test "x${HAVE_MEDIPACK}" == "xyes"]) 1103 dnl }}} 1104 dnl MPI{{{ 1105 AC_MSG_CHECKING(for MPI) 1106 1107 AC_ARG_WITH( 1108 [mpi-include], 1109 AS_HELP_STRING([--with-mpi-include=DIR], [MPI include directory, necessary for parallel build]), 1110 [MPI_INCLUDE=${withval}], 1111 [MPI_INCLUDE=""] 1112 ) 1113 1114 AC_ARG_WITH( 1115 [mpi-libdir], 1116 AS_HELP_STRING([--with-mpi-libdir=DIR], [MPI library directory, necessary for parallel build]), 1117 [MPI_LIBDIR=${withval}], 1118 [MPI_LIBDIR=""] 1119 ) 1120 1121 AC_ARG_WITH( 1122 [mpi-libflags], 1123 AS_HELP_STRING([--with-mpi-libflags=LIBS], [MPI libraries to be used, necessary for parallel build]), 1124 [MPI_LIBFLAGS=${withval}], 1125 [MPI_LIBFLAGS=""] 1126 ) 1127 1128 if test -z "${MPI_INCLUDE}"; then 1129 HAVE_MPI=no 1130 else 1131 HAVE_MPI=yes 1132 1133 dnl Processing for Windows 1134 dnl 1135 dnl NOTE: We know $VENDOR cannot be empty at this point, so no need to 1136 dnl check again in the following conditionals 1137 dnl 1138 if test "${VENDOR}" == "intel-win7-32"; then 1139 MPI_LIBDIR=`cygpath -m ${MPI_LIBDIR}` 1140 MPI_INCLUDE=`cygpath -m ${MPI_INCLUDE}` 1141 elif test "${VENDOR}" == "intel-win7-64"; then 1142 MPI_LIBDIR="/I`cygpath -m ${MPI_LIBDIR}`" 1143 MPI_INCLUDE=`cygpath -m ${MPI_INCLUDE}` 1144 elif test "${VENDOR}" == "MSVC-Win64" || test "${VENDOR}" == "MSVC-Win64-par"; then 1145 MPI_LIBDIR=`cygpath -m ${MPI_LIBDIR}` 1146 MPI_INCLUDE=`cygpath -m ${MPI_INCLUDE}` 1147 fi 1148 1149 if test -z "${MPI_LIBDIR}"; then 1150 MPILIB="${MPI_LIBFLAGS}" 1151 else 1152 MPILIB="-L${MPI_LIBDIR} ${MPI_LIBFLAGS}" 1153 fi 1154 1155 if test "x${IS_WINDOWS}" == "xyes"; then 1156 MPIINCL=/I"${MPI_INCLUDE}" 1157 else 1158 MPIINCL="-I${MPI_INCLUDE}" 1159 fi 1160 1161 AC_DEFINE([_HAVE_MPI_], [1], [with MPI in ISSM src]) 1162 AC_DEFINE([HAVE_MPI], [1], [MPI flag for Dakota (DO NOT REMOVE)]) 1163 AC_SUBST([MPIINCL]) 1164 AC_SUBST([MPILIB]) 1165 fi 1166 AM_CONDITIONAL([MPI], [test "x${HAVE_MPI}" == "xyes"]) 1167 AC_MSG_RESULT([${HAVE_MPI}]) 1168 dnl }}} 1169 dnl PETSc{{{ 1170 AC_ARG_WITH( 1171 [petsc-dir], 1172 AS_HELP_STRING([--with-petsc-dir=DIR], [PETSc root directory, necessary for parallel build]), 1173 [PETSC_ROOT=${withval}], 1174 [PETSC_ROOT="no"] 1175 ) 1176 AC_MSG_CHECKING([for PETSc]) 1177 if test "x${PETSC_ROOT}" == "xno"; then 1178 HAVE_PETSC=no 1179 else 1180 HAVE_PETSC=yes 1181 if ! test -d "${PETSC_ROOT}"; then 1182 AC_MSG_ERROR([PETSc directory provided (${PETSC_ROOT}) does not exist!]); 1183 fi 1184 fi 1185 AC_MSG_RESULT([${HAVE_PETSC}]) 1186 AM_CONDITIONAL([PETSC], [test "x${HAVE_PETSC}" == "xyes"]) 1187 1188 dnl PETSc libraries and header files 1189 if test "x${HAVE_PETSC}" == "xyes"; then 1190 AC_MSG_CHECKING(for PETSc version) 1191 if ! test -f "${PETSC_ROOT}/include/petscversion.h"; then 1192 AC_MSG_ERROR([PETSc not instaled correctly: file (${PETSC_ROOT}/include/petscversion.h) does not exist!]); 1193 fi 1194 PETSC_MAJOR=`cat ${PETSC_ROOT}/include/petscversion.h | grep "#define PETSC_VERSION_MAJOR" | sed 's/#define PETSC_VERSION_MAJOR//' | sed 's/ //g'` 1195 PETSC_MINOR=`cat ${PETSC_ROOT}/include/petscversion.h | grep "#define PETSC_VERSION_MINOR" | sed 's/#define PETSC_VERSION_MINOR//' | sed 's/ //g'` 1196 AC_DEFINE_UNQUOTED(_PETSC_MAJOR_, $PETSC_MAJOR, [PETSc version major]) 1197 AC_DEFINE_UNQUOTED(_PETSC_MINOR_, $PETSC_MINOR, [PETSc version minor]) 1198 AC_MSG_RESULT([${PETSC_MAJOR}.${PETSC_MINOR}]) 1199 1200 dnl PETSC_VERSION_DATE_HG=`cat ${PETSC_ROOT}/include/petscversion.h | grep "#define PETSC_VERSION_DATE_HG" | sed 's/#define PETSC_VERSION_DATE_HG//' | sed 's/ //g' | sed -e 's/\"//g' ` 1201 PETSC_RELEASE=`cat ${PETSC_ROOT}/include/petscversion.h | grep "#define PETSC_VERSION_RELEASE" | sed 's/#define PETSC_VERSION_RELEASE//' | sed 's/ //g'` 1202 1203 AC_MSG_CHECKING(whether PETSc is the development version) 1204 dnl if test "x${PETSC_VERSION_DATE_HG}" == "xunknown"; then 1205 if test "${PETSC_RELEASE}" == "0"; then 1206 AC_DEFINE([_HAVE_PETSCDEV_], [1], [with PETSc-dev]) 1207 AC_MSG_RESULT([yes]) 1208 else 1209 AC_MSG_RESULT([no]) 1210 fi 1211 1212 AC_ARG_WITH( 1213 [petsc-arch], 1214 AS_HELP_STRING([--with-petsc-arch=DIR], [PETSc arch, necessary for PETSc < 3.0]), 1215 [PETSC_ARCH=${withval}], 1216 [PETSC_ARCH=""] 1217 ) 1218 1219 AC_MSG_CHECKING(for PETSc libraries and header files in ${PETSC_ROOT}) 1220 dnl To get PETSc's libraries, 1221 dnl 1222 dnl cd $ISSM_DIR/externalpackages/petsc/src 1223 dnl make getlinklibs 1224 dnl 1225 PETSCINCL=" -I${PETSC_ROOT}/include" 1226 dnl Add other location (not needed anymore since at least PETSc 3.0) 1227 if test -n "${PETSC_ARCH}" && test -d "${PETSC_ROOT}/${PETSC_ARCH}/include"; then 1228 PETSCINCL+=" ${PETSC_ROOT}/${PETSC_ARCH}/include" 1229 fi 1230 if test -n "${PETSC_ARCH}" && test -d "${PETSC_ROOT}/include/${PETSC_ARCH}"; then 1231 PETSCINCL+=" ${PETSC_ROOT}/include/${PETSC_ARCH}" 1232 fi 1233 1234 case "${host_os}" in 1235 *cygwin*) 1236 if test ${PETSC_MAJOR} -lt 3; then 1237 PETSCLIB=-Wl,/LIBPATH:`cygpath -w ${PETSC_ROOT}/lib` -Wl,libpetscksp.lib -Wl,libpetscdm.lib -Wl,libpetscmat.lib -Wl,libpetscvec.lib -Wl,libpetscsnes.lib -Wl,libpetscts.lib -Wl,libmpiuni.lib -Wl,libpetsc.lib 1238 else 1239 PETSCLIB="/link -Wl,/LIBPATH:`cygpath -m ${PETSC_ROOT}/lib` -Wl,libpetsc.lib" 1240 PETSCINCL="/I`cygpath -m ${PETSC_ROOT}/include`" 1241 fi 1242 ;; 1243 *linux*) 1244 if test ${PETSC_MAJOR} -lt 3; then 1245 PETSCLIB="-L${PETSC_ROOT}/lib -lpetscksp -lpetscdm -lpetscmat -lpetscvec -lpetscsnes -lpetscts -lmpiuni -lpetsc" 1246 else 1247 PETSCLIB="-L${PETSC_ROOT}/lib -lpetsc -ldl" 1248 if test ${PETSC_MAJOR} -gt 3 || test ${PETSC_MINOR} -ge 3; then 1249 PETSCLIB+=" -lparmetis -lmetis" 1250 fi 1251 fi 1252 if test "x$host_os_version" = "x3.0.101-0.31.1_1.0502.8394-cray_gem_s"; then 1253 PETSCLIB="-L${PETSC_ROOT}/lib -lcraypetsc_gnu_real -lmetis" 1254 fi 1255 ;; 1256 *darwin*) 1257 if test ${PETSC_MAJOR} -lt 3; then 1258 PETSCLIB="-L${PETSC_ROOT}/lib -lpetscksp -lpetscdm -lpetscmat -lpetscvec -lpetscsnes -lpetscts -lpetsc" 1259 else 1260 PETSCLIB="-L${PETSC_ROOT}/lib -lpetsc" 1261 if test ${PETSC_MAJOR} -gt 3 || test ${PETSC_MINOR} -ge 3; then 1262 PETSCLIB+=" -lmetis" 1263 fi 1264 fi 1265 ;; 1266 esac 1267 AC_MSG_RESULT([done]) 1268 AC_DEFINE([_HAVE_PETSC_], [1], [with PETSc in ISSM src]) 1269 AC_SUBST([PETSCINCL]) 1270 AC_SUBST([PETSCLIB]) 1271 fi 1272 dnl }}} 1273 dnl SCOTCH{{{ 1274 AC_ARG_WITH( 1275 [scotch-dir], 1276 AS_HELP_STRING([--with-scotch-dir=DIR], [SCOTCH root directory]), 1277 [SCOTCH_ROOT=$withval], 1278 [SCOTCH_ROOT="no"] 1279 ) 1280 AC_MSG_CHECKING([for SCOTCH]) 1281 if test "x${SCOTCH_ROOT}" == "xno"; then 742 1282 HAVE_SCOTCH=no 743 1283 else 744 1284 HAVE_SCOTCH=yes 745 if ! test -d "$SCOTCH_ROOT"; then 746 AC_MSG_ERROR([scotch directory provided ($SCOTCH_ROOT) does not exist]); 747 fi 748 fi 749 AC_MSG_RESULT($HAVE_SCOTCH) 750 AM_CONDITIONAL([SCOTCH],[test x$HAVE_SCOTCH = xyes]) 751 752 dnl scotch libraries 753 if test "x$HAVE_SCOTCH" = "xyes"; then 754 SCOTCHINCL="-DNOFILEIO -I$SCOTCH_ROOT/include -DSCOTCH_VERSION=\\\"UNKNOWN\\\"" 755 SCOTCHLIB="-L$SCOTCH_ROOT/lib -lnfioscotch -lnfioscotcherr -lnfioscotcherrexit " 756 AC_DEFINE([_HAVE_SCOTCH_],[1],[with Scotch in ISSM src]) 1285 if ! test -d "${SCOTCH_ROOT}"; then 1286 AC_MSG_ERROR([SCOTCH directory provided (${SCOTCH_ROOT}) does not exist!]); 1287 fi 1288 fi 1289 AC_MSG_RESULT([${HAVE_SCOTCH}]) 1290 AM_CONDITIONAL([SCOTCH], [test "x${HAVE_SCOTCH}" == "xyes"]) 1291 1292 dnl SCOTCH libraries and header files 1293 if test "x${HAVE_SCOTCH}" == "xyes"; then 1294 if test "x${SCOTCH_ROOT}" == "x${PETSC_ROOT}"; then 1295 AC_DEFINE([_PETSC_SCOTCH_], [1], [is SCOTCH installed via PETSc]) 1296 SCOTCHINCL="-DNOFILEIO -I${SCOTCH_ROOT}/include -DSCOTCH_VERSION=\\\"UNKNOWN\\\"" 1297 SCOTCHLIB="-L${SCOTCH_ROOT}/lib -lnfioscotch -lnfioscotcherr -lnfioscotcherrexit " 1298 else 1299 SCOTCHINCL="-I${SCOTCH_ROOT}/include" 1300 SCOTCHLIB="-L${SCOTCH_ROOT}/lib " 1301 if test "x${HAVE_MPI}" == "xyes"; then 1302 SCOTCHLIB+="-lptesmumps -lptscotch -lptscotcherr -lptscotcherrexit -lscotch" 1303 else 1304 SCOTCHLIB+="-lscotch -lscotcherr -lscotcherrexit" 1305 fi 1306 fi 1307 AC_DEFINE([_HAVE_SCOTCH_], [1], [with SCOTCH in ISSM src]) 757 1308 AC_SUBST([SCOTCHINCL]) 758 1309 AC_SUBST([SCOTCHLIB]) 759 1310 fi 760 1311 dnl }}} 761 dnl esmf{{{ 762 AC_ARG_WITH([esmf-dir], 763 AS_HELP_STRING([--with-esmf-dir=DIR], [esmf root directory.]), 764 [ESMF_ROOT=$withval],[ESMF_ROOT="no"]) 765 766 dnl Check whether esmf is enabled 767 AC_MSG_CHECKING([for esmf]) 768 if test "x$ESMF_ROOT" = "xno" ; then 769 HAVE_ESMF=no 770 else 771 HAVE_ESMF=yes 772 if ! test -d "$ESMF_ROOT"; then 773 AC_MSG_ERROR([esmf directory provided ($ESMF_ROOT) does not exist]); 774 fi 775 fi 776 AC_MSG_RESULT($HAVE_ESMF) 777 778 dnl esmf headers and libraries 779 if test "x$HAVE_ESMF" == "xyes"; then 780 ESMFINCL="-I$ESMF_ROOT/include" 781 ESMFLIB="-L$ESMF_ROOT/lib -lesmf" 782 AC_DEFINE([_HAVE_ESMF_],[1],[with esmf in ISSM src]) 783 AC_SUBST([ESMFINCL]) 784 AC_SUBST([ESMFLIB]) 785 fi 786 AM_CONDITIONAL([ESMF], [test x$HAVE_ESMF = xyes]) 787 dnl }}} 788 dnl codipack{{{ 789 AC_ARG_WITH([codipack-dir], 790 AS_HELP_STRING([--with-codipack-dir=DIR], [CoDiPack root directory.]), 791 [CODIPACK_ROOT=$withval],[CODIPACK_ROOT="no"]) 792 793 dnl Check whether codipack is enabled 794 AC_MSG_CHECKING([for CoDiPack]) 795 if test "x$CODIPACK_ROOT" = "xno" ; then 796 HAVE_CODIPACK=no 797 else 798 HAVE_CODIPACK=yes 799 if ! test -d "$CODIPACK_ROOT"; then 800 AC_MSG_ERROR([codipack directory provided ($CODIPACK_ROOT) does not exist]); 801 fi 802 fi 803 AC_MSG_RESULT($HAVE_CODIPACK) 804 805 dnl codipack headers and libraries 806 if test "x$HAVE_CODIPACK" == "xyes"; then 807 CODIPACKINCL="-I$CODIPACK_ROOT/include" 808 AC_DEFINE([_HAVE_CODIPACK_],[1],[with codipack in ISSM src]) 809 AC_DEFINE([_HAVE_AD_],[1],[with AD in ISSM src]) 810 AC_SUBST([CODIPACKINCL]) 811 fi 812 AM_CONDITIONAL([CODIPACK], [test x$HAVE_CODIPACK = xyes]) 813 AM_COND_IF(CODIPACK,[CXXFLAGS+=" -std=c++11"]) 814 dnl }}} 815 dnl tapeallocation {{{ 816 AC_ARG_ENABLE([tape-alloc], dnl feature 817 AS_HELP_STRING([--enable-tape-alloc],[turn tape allocation support on]), 818 [enable_tape_alloc=$enableval], [enable_tape_alloc=no]) 819 820 dnl check whether enabled 821 AC_MSG_CHECKING(for tape memory allocation) 822 if test "x$enable_tape_alloc" = xyes; then 823 AC_DEFINE([_AD_TAPE_ALLOC_],[1],[Macro to enable a priori tape allocation for AD]) 824 fi 825 AC_MSG_RESULT($enable_tape_alloc) 826 dnl }}} 827 dnl adolc{{{ 828 AC_ARG_WITH([adolc-dir], 829 AS_HELP_STRING([--with-adolc-dir=DIR], [adolc root directory.]), 830 [ADOLC_ROOT=$withval],[ADOLC_ROOT="no"]) 831 832 dnl Check whether adolc is enabled 833 AC_MSG_CHECKING([for adolc]) 834 if test "x$ADOLC_ROOT" = "xno" ; then 835 HAVE_ADOLC=no 836 else 837 HAVE_ADOLC=yes 838 if ! test -d "$ADOLC_ROOT"; then 839 AC_MSG_ERROR([adolc directory provided ($ADOLC_ROOT) does not exist]); 840 fi 841 fi 842 AC_MSG_RESULT($HAVE_ADOLC) 843 844 dnl adolc headers and libraries 845 if test "x$HAVE_ADOLC" == "xyes"; then 846 ADOLCINCL="-I$ADOLC_ROOT/include" 847 dnl ADOLCLIB="-L$ADOLC_ROOT/lib64 -ladolc" used to be the path 848 ADOLCLIB="-L$ADOLC_ROOT/lib -ladolc" 849 AC_DEFINE([_HAVE_ADOLC_],[1],[with adolc in ISSM src]) 850 AC_DEFINE([_HAVE_AD_],[1],[with AD in ISSM src]) 851 AC_SUBST([ADOLCINCL]) 852 AC_SUBST([ADOLCLIB]) 853 fi 854 AM_CONDITIONAL([ADOLC], [test x$HAVE_ADOLC = xyes]) 855 AM_COND_IF(ADOLC,[CXXFLAGS+=" -std=c++11"]) 856 dnl }}} 857 dnl adolc-version{{{ 858 AC_ARG_WITH([adolc-version], 859 AS_HELP_STRING([--with-adolc-version=number], [adolc version.]), 860 [ADOLC_VERSION=$withval],[ADOLC_VERSION=2]) 861 AC_MSG_CHECKING(for adolc-version) 862 863 AC_DEFINE_UNQUOTED([_ADOLC_VERSION_],$ADOLC_VERSION,[ADOLC version]) 864 AC_MSG_RESULT($ADOLC_VERSION) 865 dnl }}} 866 dnl adic2{{{ 867 AC_ARG_WITH([adic2-dir], 868 AS_HELP_STRING([--with-adic2-dir=DIR], [adic2 root directory.]), 869 [ADIC2_ROOT=$withval],[ADIC2_ROOT="no"]) 870 871 dnl Check whether adic2 is enabled 872 AC_MSG_CHECKING([for adic2]) 873 if test "x$ADIC2_ROOT" = "xno" ; then 874 HAVE_ADIC2=no 875 else 876 HAVE_ADIC2=yes 877 if ! test -d "$ADIC2_ROOT"; then 878 AC_MSG_ERROR([adic2 directory provided ($ADIC2_ROOT) does not exist]); 879 fi 880 fi 881 AC_MSG_RESULT($HAVE_ADIC2) 882 883 dnl adic2 headers and libraries 884 if test "x$HAVE_ADIC2" == "xyes"; then 885 ADIC2INCL="-DADIC2_DENSE -I$ADIC2_ROOT/include -I$ADIC2_ROOT/share/runtime_dense/" 886 ADIC2LIB="" 887 AC_DEFINE([_HAVE_ADIC2_],[1],[with adic2 in ISSM src]) 888 AC_SUBST([ADIC2INCL]) 889 AC_SUBST([ADIC2LIB]) 890 fi 891 AM_CONDITIONAL([ADIC2], [test x$HAVE_ADIC2 = xyes]) 892 dnl }}} 893 dnl atlas{{{ 894 AC_ARG_WITH([atlas-dir], 895 AS_HELP_STRING([--with-atlas-dir=DIR],[atlas root directory]), 896 [ATLAS_ROOT=$withval],[ATLAS_ROOT="no"]) 897 898 dnl Check whether atlas is enabled 899 AC_MSG_CHECKING(for atlas and cblas libraries) 900 if test "x$ATLAS_ROOT" = "xno" ; then 901 HAVE_ATLAS=no 902 else 903 HAVE_ATLAS=yes 904 if ! test -d "$ATLAS_ROOT"; then 905 AC_MSG_ERROR([atlas directory provided ($ATLAS_ROOT) does not exist]); 906 fi 907 fi 908 AC_MSG_RESULT($HAVE_ATLAS) 909 910 dnl atlas headers and libraries 911 if test "x$HAVE_ATLAS" == "xyes"; then 912 dnl: branch on whether we are running on windows or linux. 913 case "${host_os}" in 914 *cygwin*) 915 ATLASLIB="-L`cygpath -m $ATLAS_ROOT` -Wl,libatlas.lib -Wl,libcblas.lib" 916 ;; 917 *linux*) 918 ATLASLIB=-L"$ATLAS_ROOT/lib -lcblas -latlas -lm " 919 ;; 920 *darwin*) 921 ATLASLIB=-L"$ATLAS_ROOT/lib -lcblas -latlas -lm" 922 ;; 923 esac 924 AC_DEFINE([_HAVE_ATLAS_],[1],[with ATLAS in ISSM src]) 925 AC_SUBST([ATLASLIB]) 926 fi 927 dnl }}} 928 dnl gsl{{{ 929 AC_ARG_WITH([gsl-dir], 930 AS_HELP_STRING([--with-gsl-dir=DIR], [gsl root directory.]), 931 [GSL_ROOT=$withval],[GSL_ROOT="no"]) 932 933 dnl Check whether gsl is enabled 934 AC_MSG_CHECKING([for gsl]) 935 if test "x$GSL_ROOT" = "xno" ; then 936 HAVE_GSL=no 937 else 938 HAVE_GSL=yes 939 if ! test -d "$GSL_ROOT"; then 940 AC_MSG_ERROR([gsl directory provided ($GSL_ROOT) does not exist]); 941 fi 942 fi 943 AC_MSG_RESULT($HAVE_GSL) 944 945 dnl gsl headers and libraries 946 if test "x$HAVE_GSL" == "xyes"; then 947 GSLINCL="-I$GSL_ROOT/include" 948 if test "x$HAVE_ATLAS" = "xyes" ; then 949 GSLLIB="-dy -L$GSL_ROOT/lib -lgsl -L$ATLAS_ROOT/lib -lcblas -latlas -lm" 950 else 951 GSLLIB="-L$GSL_ROOT/lib -lgsl -lgslcblas -lm" 952 fi 953 AC_DEFINE([_HAVE_GSL_],[1],[with gsl in ISSM src]) 954 AC_SUBST([GSLINCL]) 955 AC_SUBST([GSLLIB]) 956 fi 957 AM_CONDITIONAL([GSL], [test x$HAVE_GSL = xyes]) 958 dnl }}} 959 dnl ampi (ADOLC){{{ 960 AC_ARG_WITH([ampi-dir], 961 AS_HELP_STRING([--with-ampi-dir=DIR], [adjoinable mpi root directory.]), 962 [AMPI_ROOT=$withval],[AMPI_ROOT="no"]) 963 964 dnl Check whether ampi is enabled 965 AC_MSG_CHECKING([for ampi]) 966 if test "x$AMPI_ROOT" = "xno" ; then 967 HAVE_AMPI=no 968 else 969 HAVE_AMPI=yes 970 if ! test -d "$AMPI_ROOT"; then 971 AC_MSG_ERROR([ampi directory provided ($AMPI_ROOT) does not exist]); 972 fi 973 fi 974 AC_MSG_RESULT($HAVE_AMPI) 975 976 dnl ampi headers and libraries 977 if test "x$HAVE_AMPI" == "xyes"; then 978 AMPIINCL="-I$AMPI_ROOT/include" 979 if test "x$ADOLC_ROOT" == "xno"; then 980 AC_MSG_ERROR([cannot run adjoinable mpi without adolc]); 981 fi 982 dnl AMPILIB="-dy -L$AMPI_ROOT/lib -lampiCommon -L$ADOLC_ROOT/lib -ladolc -L$AMPI_ROOT/lib -lampiCommon -lampiBookkeeping -lampiTape" 983 dnl AMPILIB="-dy -L$AMPI_ROOT/lib -L$ADOLC_ROOT/lib -Wl,--start-group,-lampiCommon,-ladolc,-lampiCommon,-lampiBookkeeping,-lampiTape,-lampiPlainC,-lampiADtoolStubsST,--end-group" 984 dnl AMPILIB="-L$AMPI_ROOT/lib -L$ADOLC_ROOT/lib -Wl,--start-group -lampiCommon -ladolc -lampiCommon -lampiBookkeeping -lampiTape -lampiPlainC -lampiADtoolStubsST -Wl,--end-group" 985 dnl AMPILIB="$AMPI_ROOT/lib/libampiCommon.so $ADOLC_ROOT/lib/libadolc.so $AMPI_ROOT/lib/libampiCommon.so $AMPI_ROOT/lib/libampiBookkeeping.so $AMPI_ROOT/lib/libampiTape.so $AMPI_ROOT/lib/libampiPlainC.so $AMPI_ROOT/lib/libampiADtoolStubsST.so" 986 dnl AMPILIB="-dy -L$AMPI_ROOT/lib -L$ADOLC_ROOT/lib -lampiCommon -ladolc -lampiCommon -lampiBookkeeping -lampiTape -lampiPlainC -lampiADtoolStubsST" 987 AMPILIB="-dy -L$AMPI_ROOT/lib -lampiCommon -lampiBookkeeping -lampiTape" 988 AC_DEFINE([_HAVE_AMPI_],[1],[with adjoinable mpi in ISSM src]) 989 AC_SUBST([AMPIINCL]) 990 AC_SUBST([AMPILIB]) 991 fi 992 AM_CONDITIONAL([AMPI], [test x$HAVE_AMPI = xyes]) 993 dnl }}} 994 dnl adjointmpi (CoDiPack){{{ 995 AC_ARG_WITH([adjointmpi-dir], 996 AS_HELP_STRING([--with-adjointmpi-dir=DIR], [adjoinable mpi root directory.]), 997 [ADJOINTMPI_ROOT=$withval],[ADJOINTMPI_ROOT="no"]) 998 999 dnl Check whether adjointmpi is enabled 1000 AC_MSG_CHECKING([for adjointmpi]) 1001 if test "x$ADJOINTMPI_ROOT" = "xno" ; then 1002 HAVE_ADJOINTMPI=no 1003 else 1004 HAVE_ADJOINTMPI=yes 1005 if ! test -d "$ADJOINTMPI_ROOT"; then 1006 AC_MSG_ERROR([adjointmpi directory provided ($ADJOINTMPI_ROOT) does not exist]); 1007 fi 1008 fi 1009 AC_MSG_RESULT($HAVE_ADJOINTMPI) 1010 1011 dnl adjointmpi headers and libraries 1012 if test "x$HAVE_ADJOINTMPI" == "xyes"; then 1013 if test "x$CODIPACK_ROOT" == "xno"; then 1014 AC_MSG_ERROR([cannot run adjoint mpi without CoDiPack]); 1015 fi 1016 ADJOINTMPIINCL="-I$ADJOINTMPI_ROOT/include" 1017 ADJOINTMPILIB="-L$ADJOINTMPI_ROOT/lib -lAMPI" 1018 dnl Also set _HAVE_AMPI_, because the interface is (almost) the 1019 dnl same as for adjoinable mpi... 1020 AC_DEFINE([_HAVE_AMPI_],[1],[with adjoint mpi in ISSM src]) 1021 AC_DEFINE([_HAVE_ADJOINTMPI_],[1],[with adjoint mpi in ISSM src]) 1022 AC_SUBST([ADJOINTMPIINCL]) 1023 AC_SUBST([ADJOINTMPILIB]) 1024 fi 1025 AM_CONDITIONAL([ADJOINTMPI], [test x$HAVE_ADJOINTMPI = xyes]) 1026 dnl }}} 1027 dnl medipack (CoDiPack, ADOLC dev){{{ 1028 AC_ARG_WITH([medipack-dir], 1029 AS_HELP_STRING([--with-medipack-dir=DIR], [MeDiPack root directory.]), 1030 [MEDIPACK_ROOT=$withval],[MEDIPACK_ROOT="no"]) 1031 1032 dnl Check whether medipack is enabled 1033 AC_MSG_CHECKING([for medipack]) 1034 if test "x$MEDIPACK_ROOT" = "xno" ; then 1035 HAVE_MEDIPACK=no 1036 else 1037 HAVE_MEDIPACK=yes 1038 if ! test -d "$MEDIPACK_ROOT"; then 1039 AC_MSG_ERROR([medipack directory provided ($MEDIPACK_ROOT) does not exist]); 1040 fi 1041 fi 1042 AC_MSG_RESULT($HAVE_MEDIPACK) 1043 1044 dnl medipack headers and libraries 1045 if test "x$HAVE_MEDIPACK" == "xyes"; then 1046 if test "x$CODIPACK_ROOT" == "xno"; then 1047 AC_MSG_ERROR([cannot run MeDiPack without CoDiPack]); 1048 fi 1049 MEDIPACKINCL="-I$MEDIPACK_ROOT/include -I$MEDIPACK_ROOT/src" 1050 dnl Also set _HAVE_AMPI_, because the interface is (almost) the 1051 dnl same as for adjoinable mpi... 1052 AC_DEFINE([_HAVE_AMPI_],[1],[with adjoint mpi in ISSM src]) 1053 AC_DEFINE([_HAVE_MEDIPACK_],[1],[with MeDiPack in ISSM src]) 1054 AC_SUBST([MEDIPACKINCL]) 1055 fi 1056 AM_CONDITIONAL([MEDIPACK], [test x$HAVE_MEDIPACK = xyes]) 1057 1058 dnl }}} 1059 dnl rose{{{ 1060 AC_ARG_WITH([rose-dir], 1061 AS_HELP_STRING([--with-rose-dir=DIR], [rose root directory.]), 1062 [ROSE_ROOT=$withval],[ROSE_ROOT="no"]) 1063 1064 dnl Check whether rose is enabled 1065 AC_MSG_CHECKING([for rose]) 1066 if test "x$ROSE_ROOT" = "xno" ; then 1067 HAVE_ROSE=no 1068 else 1069 HAVE_ROSE=yes 1070 if ! test -d "$ROSE_ROOT"; then 1071 AC_MSG_ERROR([rose directory provided ($ROSE_ROOT) does not exist]); 1072 fi 1073 fi 1074 AC_MSG_RESULT($HAVE_ROSE) 1075 AM_CONDITIONAL([ROSE],[test x$HAVE_ROSE = xyes]) 1076 1077 dnl library and header files 1078 if test "x$HAVE_ROSE" = "xyes"; then 1079 ROSEINCL="-I$ROSE_ROOT/include" 1080 ROSELIB="" 1081 AC_DEFINE([_HAVE_ROSE_],[1],[with rose in ISSM src]) 1082 AC_SUBST([ROSEINCL]) 1083 AC_SUBST([ROSELIB]) 1084 fi 1085 dnl }}} 1086 dnl mpi{{{ 1087 AC_MSG_CHECKING(for mpi) 1088 1089 AC_ARG_WITH([mpi-include], 1090 AS_HELP_STRING([--with-mpi-include=DIR],[mpi include directory, necessary for parallel build]), 1091 [MPI_INCLUDE=$withval],[MPI_INCLUDE=""]) 1092 1093 AC_ARG_WITH([mpi-libdir], 1094 AS_HELP_STRING([--with-mpi-libdir=DIR],[mpi lib directory, necessary for parallel build]), 1095 [MPI_LIBDIR=$withval],[MPI_LIBDIR=""]) 1096 1097 AC_ARG_WITH([mpi-libflags], 1098 AS_HELP_STRING([--with-mpi-libflags=LIBS],[mpi libraries to be used, necessary for parallel build]), 1099 [MPI_LIBFLAGS=$withval],[MPI_LIBFLAGS=""]) 1100 1101 1102 if test -z "$MPI_INCLUDE" ; then 1103 HAVE_MPI=no 1104 else 1105 HAVE_MPI=yes 1106 1107 dnl Processing for windows 1108 if test x$VENDOR = xintel-win7-32; then 1109 MPI_LIBDIR=`cygpath -m $MPI_LIBDIR` 1110 MPI_INCLUDE=`cygpath -m $MPI_INCLUDE` 1111 elif test x$VENDOR = xintel-win7-64; then 1112 MPI_LIBDIR="/I`cygpath -m $MPI_LIBDIR`" 1113 MPI_INCLUDE=`cygpath -m $MPI_INCLUDE` 1114 elif test x$VENDOR = xMSVC-Win64 || test x$VENDOR = xMSVC-Win64-par; then 1115 MPI_LIBDIR=`cygpath -m $MPI_LIBDIR` 1116 MPI_INCLUDE=`cygpath -m $MPI_INCLUDE` 1117 fi 1118 1119 if test -z "$MPI_LIBDIR"; then 1120 MPILIB="$MPI_LIBFLAGS" 1121 else 1122 MPILIB="-L$MPI_LIBDIR $MPI_LIBFLAGS" 1123 fi 1124 1125 if test x$IS_WINDOWS = xyes; then 1126 MPIINCL=/I"$MPI_INCLUDE" 1127 else 1128 MPIINCL=-I"$MPI_INCLUDE" 1129 fi 1130 1131 AC_DEFINE([_HAVE_MPI_],[1],[with Mpi in ISSM src]) 1132 AC_DEFINE([HAVE_MPI],[1],[Mpi Flag for Dakota (DO NOT REMOVE)]) 1133 AC_SUBST([MPIINCL]) 1134 AC_SUBST([MPILIB]) 1135 fi 1136 AM_CONDITIONAL([MPI], [test x$HAVE_MPI = xyes]) 1137 AC_MSG_RESULT($HAVE_MPI) 1138 dnl }}} 1139 dnl petsc{{{ 1140 AC_ARG_WITH([petsc-dir], 1141 AS_HELP_STRING([--with-petsc-dir=DIR],[PETSc root directory, necessary for parallel build]), 1142 [PETSC_ROOT=$withval],[PETSC_ROOT="no"]) 1143 1144 dnl Check whether petsc is enabled 1145 AC_MSG_CHECKING([for petsc]) 1146 if test "x$PETSC_ROOT" = "xno" ; then 1147 HAVE_PETSC=no 1148 else 1149 HAVE_PETSC=yes 1150 if ! test -d "$PETSC_ROOT"; then 1151 AC_MSG_ERROR([petsc directory provided ($PETSC_ROOT) does not exist]); 1152 fi 1153 fi 1154 AC_MSG_RESULT($HAVE_PETSC) 1155 AM_CONDITIONAL([PETSC],[test x$HAVE_PETSC = xyes]) 1156 1157 dnl library and header files 1158 if test "x$HAVE_PETSC" = "xyes"; then 1159 AC_MSG_CHECKING(for petsc version) 1160 if ! test -f "$PETSC_ROOT/include/petscversion.h"; then 1161 AC_MSG_ERROR([PETSc not instaled corretly: file ($PETSC_ROOT/include/petscversion.h) does not exist]); 1162 fi 1163 PETSC_MAJOR=`cat $PETSC_ROOT/include/petscversion.h | grep "#define PETSC_VERSION_MAJOR" | sed 's/#define PETSC_VERSION_MAJOR//' | sed 's/ //g'` 1164 PETSC_MINOR=`cat $PETSC_ROOT/include/petscversion.h | grep "#define PETSC_VERSION_MINOR" | sed 's/#define PETSC_VERSION_MINOR//' | sed 's/ //g'` 1165 AC_DEFINE_UNQUOTED([_PETSC_MAJOR_],$PETSC_MAJOR,[PETSc version major]) 1166 AC_DEFINE_UNQUOTED([_PETSC_MINOR_],$PETSC_MINOR,[PETSc version minor]) 1167 AC_MSG_RESULT($PETSC_MAJOR.$PETSC_MINOR) 1168 1169 PETSC_VERSION_DATE_HG=`cat $PETSC_ROOT/include/petscversion.h | grep "#define PETSC_VERSION_DATE_HG" | sed 's/#define PETSC_VERSION_DATE_HG//' | sed 's/ //g' | sed -e 's/\"//g' ` 1170 PETSC_RELEASE=`cat $PETSC_ROOT/include/petscversion.h | grep "#define PETSC_VERSION_RELEASE" | sed 's/#define PETSC_VERSION_RELEASE//' | sed 's/ //g'` 1171 1172 AC_MSG_CHECKING(whether petsc is the development version) 1173 dnl if test x$PETSC_VERSION_DATE_HG = xunknown; then 1174 if test "$PETSC_RELEASE" = "0"; then 1175 AC_DEFINE([_HAVE_PETSCDEV_],[1],[with PETSc-dev]) 1176 AC_MSG_RESULT(yes) 1177 else 1178 AC_MSG_RESULT(no) 1179 fi 1180 1181 AC_ARG_WITH([petsc-arch], 1182 AS_HELP_STRING([--with-petsc-arch=DIR],[PETSc arch, necessary for PETSc < 3.0]), 1183 [PETSC_ARCH=$withval],[PETSC_ARCH=""]) 1184 1185 AC_MSG_CHECKING(for petsc headers and libraries in $PETSC_ROOT) 1186 dnl To ge PETSc's libraries: 1187 dnl cd externalpackages/petsc/src 1188 dnl make getlinklibs 1189 PETSCINCL=" -I$PETSC_ROOT/include" 1190 dnl Add other location (not needed anymore since at least PETSc 3.0) 1191 if test "x$PETSC_ARCH" != "x" && test -d "$PETSC_ROOT/$PETSC_ARCH/include"; then 1192 PETSCINCL+=" $PETSC_ROOT/$PETSC_ARCH/include" 1193 fi 1194 if test "x$PETSC_ARCH" != "x" && test -d "$PETSC_ROOT/include/$PETSC_ARCH"; then 1195 PETSCINCL+=" $PETSC_ROOT/include/$PETSC_ARCH" 1196 fi 1197 1198 case "${host_os}" in 1199 *cygwin*) 1200 if test $PETSC_MAJOR -lt 3 ; then 1201 PETSCLIB=-Wl,/LIBPATH:`cygpath -w $PETSC_ROOT/lib` -Wl,libpetscksp.lib -Wl,libpetscdm.lib -Wl,libpetscmat.lib -Wl,libpetscvec.lib -Wl,libpetscsnes.lib -Wl,libpetscts.lib -Wl,libmpiuni.lib -Wl,libpetsc.lib 1202 else 1203 PETSCLIB="/link -Wl,/LIBPATH:`cygpath -m $PETSC_ROOT/lib` -Wl,libpetsc.lib" 1204 PETSCINCL="/I`cygpath -m $PETSC_ROOT/include`" 1205 fi 1206 ;; 1207 *linux*) 1208 if test $PETSC_MAJOR -lt 3 ; then 1209 PETSCLIB="-L$PETSC_ROOT/lib -lpetscksp -lpetscdm -lpetscmat -lpetscvec -lpetscsnes -lpetscts -lmpiuni -lpetsc" 1210 else 1211 PETSCLIB="-L$PETSC_ROOT/lib -lpetsc -ldl" 1212 if test $PETSC_MAJOR -gt 3 || test $PETSC_MINOR -ge 3; then PETSCLIB+=" -lparmetis -lmetis"; fi 1213 fi 1214 if test "x$host_os_version" = "x3.0.101-0.31.1_1.0502.8394-cray_gem_s" ; then 1215 PETSCLIB="-L$PETSC_ROOT/lib -lcraypetsc_gnu_real -lmetis" 1216 fi 1217 ;; 1218 *darwin*) 1219 if test $PETSC_MAJOR -lt 3 ; then 1220 PETSCLIB="-L$PETSC_ROOT/lib -lpetscksp -lpetscdm -lpetscmat -lpetscvec -lpetscsnes -lpetscts -lpetsc" 1221 else 1222 PETSCLIB="-L$PETSC_ROOT/lib -lpetsc" 1223 if test $PETSC_MAJOR -gt 3 || test $PETSC_MINOR -ge 3; then PETSCLIB+=" -lmetis"; fi 1224 fi 1225 ;; 1226 esac 1227 AC_MSG_RESULT(done) 1228 AC_DEFINE([_HAVE_PETSC_],[1],[with PETSc in ISSM src]) 1229 AC_SUBST([PETSCINCL]) 1230 AC_SUBST([PETSCLIB]) 1231 fi 1232 dnl }}} 1233 dnl metis{{{ 1234 if test "$HAVE_PETSC" = "yes" && test "x$PETSC_MAJOR" = "x3" && test $PETSC_MINOR -ge 3 && test "x$VENDOR" != "xMSVC-Win64" && test "x$VENDOR" != "xMSVC-Win64-par"; then 1235 dnl in petsc >=3.3, metis is provided 1312 dnl METIS{{{ 1313 1314 dnl NOTE: We know $VENDOR cannot be empty at this point, so no need to 1315 dnl check again in the following conditionals 1316 dnl 1317 if test "x${HAVE_PETSC}" == "xyes" && test "x${PETSC_MAJOR}" == "x3" && test ${PETSC_MINOR} -ge 3 && test "${VENDOR}" != "MSVC-Win64" && test "${VENDOR}" != "MSVC-Win64-par"; then 1318 dnl In PETSc >=3.3, METIS is provided 1236 1319 HAVE_METIS="yes" 1237 AC_DEFINE([_METIS_VERSION_],[5],[ Metis version number]) 1238 AC_DEFINE([_HAVE_METIS_],[1],[with Metis in ISSM src]) 1239 else 1240 AC_ARG_WITH([metis-dir], 1241 AS_HELP_STRING([--with-metis-dir=DIR],[metis root directory. necessary for serial build]), 1242 [METIS_ROOT=$withval],[METIS_ROOT="no"]) 1243 1244 dnl Check whether metis is enabled 1245 AC_MSG_CHECKING([for metis]) 1246 if test "x$METIS_ROOT" = "xno" ; then 1320 AC_DEFINE([_METIS_VERSION_], [5], [METIS version number]) 1321 AC_DEFINE([_HAVE_METIS_], [1], [with METIS in ISSM src]) 1322 else 1323 AC_ARG_WITH( 1324 [metis-dir], 1325 AS_HELP_STRING([--with-metis-dir=DIR], [METIS root directory, necessary for serial build]), 1326 [METIS_ROOT=${withval}], 1327 [METIS_ROOT="no"] 1328 ) 1329 AC_MSG_CHECKING([for METIS]) 1330 if test "x${METIS_ROOT}" == "xno"; then 1247 1331 HAVE_METIS=no 1248 1332 else 1249 1333 HAVE_METIS=yes 1250 if ! test -d "$ METIS_ROOT"; then1251 AC_MSG_ERROR([ metis directory provided ($METIS_ROOT) does not exist]);1334 if ! test -d "${METIS_ROOT}"; then 1335 AC_MSG_ERROR([METIS directory provided (${METIS_ROOT}) does not exist!]); 1252 1336 fi 1253 1337 fi 1254 AC_MSG_RESULT($HAVE_METIS) 1255 AM_CONDITIONAL([METIS],[test x$HAVE_METIS = xyes]) 1256 1257 dnl library and header files 1258 if test "x$HAVE_METIS" = "xyes"; then 1259 1260 AC_MSG_CHECKING(for metis headers and libraries in $METIS_ROOT) 1261 dnl first figure out version of metis: does the VERSION file exist? 1262 if test -e "$METIS_ROOT/VERSION"; then 1338 AC_MSG_RESULT([${HAVE_METIS}]) 1339 AM_CONDITIONAL([METIS], [test "x${HAVE_METIS}" == "xyes"]) 1340 1341 dnl METIS libraries and header files 1342 if test "x${HAVE_METIS}" == "xyes"; then 1343 AC_MSG_CHECKING(for METIS libraries and header files in ${METIS_ROOT}) 1344 dnl Retrieve METIS version (does the VERSION file exist?) 1345 if test -f "${METIS_ROOT}/VERSION"; then 1263 1346 METIS_VERSION=4 1264 1347 else … … 1266 1349 fi 1267 1350 1268 if test " $METIS_VERSION" = "4"; then1269 METISINCL= -I"$METIS_ROOT/Lib"1351 if test "x${METIS_VERSION}" == "x4"; then 1352 METISINCL="-I${METIS_ROOT}/Lib" 1270 1353 case "${host_os}" in 1271 1354 *cygwin*) 1272 METISINCL="/I`cygpath -m $METIS_ROOT/Lib`"1273 METISLIB="-Wl,/link -Wl,/LIBPATH:`cygpath -m $METIS_ROOT` -Wl,libmetis.lib"1355 METISINCL="/I`cygpath -m ${METIS_ROOT}/Lib`" 1356 METISLIB="-Wl,/link -Wl,/LIBPATH:`cygpath -m ${METIS_ROOT}` -Wl,libmetis.lib" 1274 1357 ;; 1275 1358 *linux*) 1276 METISLIB=-L"$METIS_ROOT/-lmetis"1359 METISLIB="-L${METIS_ROOT} -lmetis" 1277 1360 ;; 1278 1361 *darwin*) 1279 METISLIB=-L"$METIS_ROOT/-lmetis"1362 METISLIB="-L${METIS_ROOT} -lmetis" 1280 1363 ;; 1281 1364 esac 1282 AC_DEFINE([_METIS_VERSION_], [4],[ Metisversion number])1365 AC_DEFINE([_METIS_VERSION_], [4], [ METIS version number]) 1283 1366 fi 1284 1367 1285 if test " $METIS_VERSION" = "5"; then1368 if test "x${METIS_VERSION}" == "x5"; then 1286 1369 case "${host_os}" in 1287 1370 *cygwin*) 1288 METISLIB="-L$METIS_ROOTlibmetis.lib"1371 METISLIB="-L${METIS_ROOT} libmetis.lib" 1289 1372 ;; 1290 1373 *linux*) 1291 METISLIB=-L"$METIS_ROOT/lib -lmetis"1374 METISLIB="-L${METIS_ROOT}/lib -lmetis" 1292 1375 ;; 1293 1376 *darwin*) 1294 METISLIB=-L"$METIS_ROOT/lib -lmetis"1377 METISLIB="-L${METIS_ROOT}/lib -lmetis" 1295 1378 ;; 1296 1379 esac 1297 METISINCL= -I"$METIS_ROOT/include"1298 AC_DEFINE([_METIS_VERSION_], [5],[ Metisversion number])1380 METISINCL="-I${METIS_ROOT}/include" 1381 AC_DEFINE([_METIS_VERSION_], [5], [METIS version number]) 1299 1382 fi 1300 1383 1301 AC_DEFINE([_HAVE_METIS_], [1],[with Metisin ISSM src])1384 AC_DEFINE([_HAVE_METIS_], [1], [with METIS in ISSM src]) 1302 1385 AC_SUBST([METISINCL]) 1303 1386 AC_SUBST([METISLIB]) 1304 1387 fi 1305 1388 fi 1306 AM_CONDITIONAL([METIS],[test x$HAVE_METIS = xyes]) 1307 dnl }}} 1308 dnl tao{{{ 1309 AC_ARG_WITH([tao-dir], 1310 AS_HELP_STRING([--with-tao-dir=DIR], [tao root directory.]), 1311 [TAO_ROOT=$withval],[TAO_ROOT="no"]) 1312 1313 dnl Check whether tao is enabled 1314 AC_MSG_CHECKING([for tao]) 1315 1316 if test "$HAVE_PETSC" = "yes" && test "x$PETSC_MAJOR" = "x3" && test $PETSC_MINOR -ge 5; then 1317 dnl in petsc >=3.5, tao is provided 1389 AM_CONDITIONAL([METIS], [test "x${HAVE_METIS}" == "xyes"]) 1390 dnl }}} 1391 dnl Toolkit for Advanced Optimization (TAO){{{ 1392 AC_ARG_WITH( 1393 [tao-dir], 1394 AS_HELP_STRING([--with-tao-dir=DIR], [TAO root directory]), 1395 [TAO_ROOT=${withval}], 1396 [TAO_ROOT="no"] 1397 ) 1398 AC_MSG_CHECKING([for TAO]) 1399 1400 if test "x${HAVE_PETSC}" == "xyes" && test "x${PETSC_MAJOR}" == "x3" && test ${PETSC_MINOR} -ge 5; then 1401 dnl In PETSc >= 3.5, TAO is provided 1318 1402 HAVE_TAO="yes" 1319 AC_DEFINE([_HAVE_TAO_],[1],[with Tao in ISSM src]) 1320 AC_MSG_RESULT($HAVE_TAO) 1321 else 1322 1323 if test "x$TAO_ROOT" = "xno" ; then 1403 AC_DEFINE([_HAVE_TAO_], [1], [with TAO in ISSM src]) 1404 AC_MSG_RESULT([${HAVE_TAO}]) 1405 else 1406 if test "x${TAO_ROOT}" == "xno"; then 1324 1407 HAVE_TAO=no 1325 1408 else 1326 1409 HAVE_TAO=yes 1327 if ! test -d "$ TAO_ROOT"; then1328 AC_MSG_ERROR([ tao directory provided ($TAO_ROOT) does not exist]);1410 if ! test -d "${TAO_ROOT}"; then 1411 AC_MSG_ERROR([TAO directory provided (${TAO_ROOT}) does not exist!]); 1329 1412 fi 1330 1413 fi 1331 AC_MSG_RESULT($HAVE_TAO) 1332 1333 dnl tao headers and libraries 1334 if test "x$HAVE_TAO" == "xyes"; then 1335 TAOINCL="-I$TAO_ROOT/ -I$TAO_ROOT/include -I$TAO_ROOT/bmake/ " 1336 TAOLIB="-L$TAO_ROOT/lib -ltao -lpetsc" 1337 AC_DEFINE([_HAVE_TAO_],[1],[with Tao in ISSM src]) 1338 AC_SUBST([TAOINCL]) 1339 AC_SUBST([TAOLIB]) 1340 fi 1341 fi 1342 dnl }}} 1343 dnl m1qn3{{{ 1344 AC_ARG_WITH([m1qn3-dir], 1345 AS_HELP_STRING([--with-m1qn3-dir=DIR], [m1qn3 root directory.]), 1346 [M1QN3_ROOT=$withval],[M1QN3_ROOT="no"]) 1347 1348 dnl Check whether m1qn3 is enabled 1349 AC_MSG_CHECKING([for m1qn3]) 1350 if test "x$M1QN3_ROOT" = "xno" ; then 1414 AC_MSG_RESULT([${HAVE_TAO}]) 1415 1416 dnl TAO libraries and header files 1417 if test "x${HAVE_TAO}" == "xyes"; then 1418 TAOINCL="-I${TAO_ROOT} -I${TAO_ROOT}/include -I${TAO_ROOT}/bmake" 1419 TAOLIB="-L${TAO_ROOT}/lib -ltao -lpetsc" 1420 AC_DEFINE([_HAVE_TAO_], [1], [with Tao in ISSM src]) 1421 AC_SUBST([TAOINCL]) 1422 AC_SUBST([TAOLIB]) 1423 fi 1424 fi 1425 dnl }}} 1426 dnl M1QN3{{{ 1427 AC_ARG_WITH( 1428 [m1qn3-dir], 1429 AS_HELP_STRING([--with-m1qn3-dir=DIR], [M1QN3 root directory]), 1430 [M1QN3_ROOT=${withval}], 1431 [M1QN3_ROOT="no"] 1432 ) 1433 AC_MSG_CHECKING([for M1QN3]) 1434 if test "x${M1QN3_ROOT}" == "xno"; then 1351 1435 HAVE_M1QN3=no 1352 1436 else 1353 1437 HAVE_M1QN3=yes 1354 if ! test -d "$M1QN3_ROOT"; then 1355 AC_MSG_ERROR([m1qn3 directory provided ($M1QN3_ROOT) does not exist]); 1356 fi 1357 fi 1358 AC_MSG_RESULT($HAVE_M1QN3) 1359 1360 dnl m1qn3 headers and libraries 1361 if test "x$HAVE_M1QN3" == "xyes"; then 1362 M1QN3LIB="$M1QN3_ROOT/libm1qn3.a $M1QN3_ROOT/libddot.a" 1363 AC_DEFINE([_HAVE_M1QN3_],[1],[with M1QN3 in ISSM src]) 1364 AC_SUBST([M1QN3LIB]) 1365 fi 1366 dnl }}} 1367 dnl proj.4{{{ 1368 AC_ARG_WITH([proj4-dir], 1369 AS_HELP_STRING([--with-proj4-dir=DIR], [proj4 root directory.]), 1370 [PROJ4_ROOT=$withval],[PROJ4_ROOT="no"]) 1371 1372 dnl Check whether proj4 is enabled 1373 AC_MSG_CHECKING([for proj.4]) 1374 if test "x$PROJ4_ROOT" = "xno" ; then 1438 if ! test -d "${M1QN3_ROOT}"; then 1439 AC_MSG_ERROR([M1QN3 directory provided (${M1QN3_ROOT}) does not exist!]); 1440 fi 1441 fi 1442 AC_MSG_RESULT([${HAVE_M1QN3}]) 1443 1444 dnl M1QN3 libraries and header files 1445 if test "x${HAVE_M1QN3}" == "xyes"; then 1446 M1QN3LIB="${M1QN3_ROOT}/libm1qn3.a ${M1QN3_ROOT}/libddot.a" 1447 AC_DEFINE([_HAVE_M1QN3_], [1], [with M1QN3 in ISSM src]) 1448 AC_SUBST([M1QN3LIB]) 1449 fi 1450 dnl }}} 1451 dnl PROJ.4{{{ 1452 AC_ARG_WITH( 1453 [proj4-dir], 1454 AS_HELP_STRING([--with-proj4-dir=DIR], [PROJ.4 root directory]), 1455 [PROJ4_ROOT=${withval}], 1456 [PROJ4_ROOT="no"] 1457 ) 1458 AC_MSG_CHECKING([for PROJ.4]) 1459 if test "x${PROJ4_ROOT}" == "xno"; then 1375 1460 HAVE_PROJ4=no 1376 1461 else 1377 1462 HAVE_PROJ4=yes 1378 if ! test -d "$PROJ4_ROOT"; then 1379 AC_MSG_ERROR([proj4 directory provided ($PROJ4_ROOT) does not exist]); 1380 fi 1381 fi 1382 AC_MSG_RESULT($HAVE_PROJ4) 1383 1384 dnl proj4 headers and libraries 1385 if test "x$HAVE_PROJ4" == "xyes"; then 1386 PROJ4INCL="-I$PROJ4_ROOT/include " 1387 PROJ4LIB="-L$PROJ4_ROOT/lib -lproj" 1388 AC_DEFINE([_HAVE_PROJ4_],[1],[with PROJ4 in ISSM src]) 1389 AC_SUBST([PROJ4INCL]) 1390 AC_SUBST([PROJ4LIB]) 1391 fi 1392 AM_CONDITIONAL([PROJ4],[test x$HAVE_PROJ4 = xyes]) 1393 dnl }}} 1394 dnl slepc{{{ 1395 AC_ARG_WITH([slepc-dir], 1396 AS_HELP_STRING([--with-slepc-dir=DIR],[slepc root directory]), 1397 [SLEPC_ROOT=$withval],[SLEPC_ROOT="no"]) 1398 1399 dnl Check whether slepc is enabled 1400 AC_MSG_CHECKING([for slepc]) 1401 if test "x$SLEPC_ROOT" = "xno" ; then 1463 if ! test -d "${PROJ4_ROOT}"; then 1464 AC_MSG_ERROR([PROJ.4 directory provided (${PROJ4_ROOT}) does not exist!]); 1465 fi 1466 fi 1467 AC_MSG_RESULT([${HAVE_PROJ4}]) 1468 1469 dnl PROJ.4 libraries and header files 1470 if test "x${HAVE_PROJ4}" == "xyes"; then 1471 PROJ4INCL="-I${PROJ4_ROOT}/include" 1472 PROJ4LIB="-L${PROJ4_ROOT}/lib -lproj" 1473 AC_DEFINE([_HAVE_PROJ4_], [1], [with PROJ4 in ISSM src]) 1474 AC_SUBST([PROJ4INCL]) 1475 AC_SUBST([PROJ4LIB]) 1476 fi 1477 AM_CONDITIONAL([PROJ4], [test "x${HAVE_PROJ4}" == "xyes"]) 1478 dnl }}} 1479 dnl SLEPc{{{ 1480 AC_ARG_WITH( 1481 [slepc-dir], 1482 AS_HELP_STRING([--with-slepc-dir=DIR], [SLEPc root directory]), 1483 [SLEPC_ROOT=${withval}], 1484 [SLEPC_ROOT="no"] 1485 ) 1486 AC_MSG_CHECKING([for SLEPc]) 1487 if test "x${SLEPC_ROOT}" == "xno"; then 1402 1488 HAVE_SLEPC=no 1403 1489 else 1404 1490 HAVE_SLEPC=yes 1405 if ! test -d "$ SLEPC_ROOT"; then1406 AC_MSG_ERROR([ slepc directory provided ($SLEPC_ROOT) does not exist]);1407 fi 1408 fi 1409 AC_MSG_RESULT( $HAVE_SLEPC)1410 1411 dnl slepc headers and libraries1412 if test "x$ HAVE_SLEPC" == "xyes"; then1413 SLEPCINCL= -I"$SLEPC_ROOT/include"1414 SLEPCLIB= -L"$SLEPC_ROOT/lib/-lslepc"1415 AC_DEFINE([_HAVE_SLEPC_], [1],[with Slepc in ISSM src])1491 if ! test -d "${SLEPC_ROOT}"; then 1492 AC_MSG_ERROR([SLEPc directory provided (${SLEPC_ROOT}) does not exist!]); 1493 fi 1494 fi 1495 AC_MSG_RESULT([${HAVE_SLEPC}]) 1496 1497 dnl SLEPc libraries and header files 1498 if test "x${HAVE_SLEPC}" == "xyes"; then 1499 SLEPCINCL="-I${SLEPC_ROOT}/include" 1500 SLEPCLIB="-L${SLEPC_ROOT}/lib -lslepc" 1501 AC_DEFINE([_HAVE_SLEPC_], [1], [with SLEPc in ISSM src]) 1416 1502 AC_SUBST([SLEPCINCL]) 1417 1503 AC_SUBST([SLEPCLIB]) … … 1419 1505 dnl }}} 1420 1506 dnl shapelib{{{ 1421 AC_ARG_WITH([shapelib-dir], 1422 AS_HELP_STRING([--with-shapelib-dir=DIR], [shapelib root directory]), 1423 [SHAPELIB_ROOT=$withval],[SHAPELIB_ROOT="no"]) 1424 1425 dnl Check whether shapelib is enabled 1507 AC_ARG_WITH( 1508 [shapelib-dir], 1509 AS_HELP_STRING([--with-shapelib-dir=DIR], [shapelib root directory]), 1510 [SHAPELIB_ROOT=${withval}], 1511 [SHAPELIB_ROOT="no"] 1512 ) 1426 1513 AC_MSG_CHECKING([for shapelib]) 1427 if test "x$ SHAPELIB_ROOT" = "xno"; then1514 if test "x${SHAPELIB_ROOT}" == "xno"; then 1428 1515 HAVE_SHAPELIB=no 1429 1516 else 1430 1517 HAVE_SHAPELIB=yes 1431 if ! test -d "$ SHAPELIB_ROOT"; then1432 AC_MSG_ERROR([shapelib directory provided ($ SHAPELIB_ROOT) does not exist]);1433 fi 1434 fi 1435 AC_MSG_RESULT( $HAVE_SHAPELIB)1436 1437 dnl shapelib headers and libraries1438 if test "x$ HAVE_SHAPELIB" == "xyes"; then1439 SHAPELIBINCL= -I"$SHAPELIB_ROOT/include"1440 SHAPELIBLIB= -L"$SHAPELIB_ROOT/lib/-lshape"1441 AC_DEFINE([_HAVE_SHAPELIB_], [1],[with Shapelib in ISSM src])1518 if ! test -d "${SHAPELIB_ROOT}"; then 1519 AC_MSG_ERROR([shapelib directory provided (${SHAPELIB_ROOT}) does not exist!]); 1520 fi 1521 fi 1522 AC_MSG_RESULT([${HAVE_SHAPELIB}]) 1523 1524 dnl shapelib libraries and header files 1525 if test "x${HAVE_SHAPELIB}" == "xyes"; then 1526 SHAPELIBINCL="-I${SHAPELIB_ROOT}/include" 1527 SHAPELIBLIB="-L${SHAPELIB_ROOT}/lib -lshape" 1528 AC_DEFINE([_HAVE_SHAPELIB_], [1], [with shapelib in ISSM src]) 1442 1529 AC_SUBST([SHAPELIBINCL]) 1443 1530 AC_SUBST([SHAPELIBLIB]) 1444 1531 fi 1445 1532 dnl }}} 1446 dnl scalapack{{{ 1447 1448 dnl Here, either just the directory is provided, or the library, we handle both cases 1449 AC_ARG_WITH([scalapack-dir], 1450 AS_HELP_STRING([--with-scalapack-dir=DIR],[scalapack root directory]), 1451 [SCALAPACK_ROOT=$withval],[SCALAPACK_ROOT="no"]) 1452 1453 AC_ARG_WITH([scalapack-lib], 1454 AS_HELP_STRING([--with-scalapack-lib=LIBS],[scalapack libraries to include]), 1455 [SCALAPACKLIB=$withval],[SCALAPACKLIB="no"]) 1456 1457 dnl Check whether scalapack is enabled 1458 AC_MSG_CHECKING([for scalapack]) 1459 if test "x$SCALAPACK_ROOT" = "xno" && test "x$SCALAPACKLIB" = "xno"; then 1460 HAVE_SCALAPACK=no 1461 SCALAPACKLIB= 1462 else if test "x$SCALAPACK_ROOT" != "xno"; then 1463 if ! test -d "$SCALAPACK_ROOT"; then 1464 AC_MSG_ERROR([scalapack directory provided ($SCALAPACK_ROOT) does not exist]); 1533 dnl ScaLAPACK{{{ 1534 1535 dnl NOTE: User should supply path to root directory or libraries, but not both 1536 AC_ARG_WITH( 1537 [scalapack-dir], 1538 AS_HELP_STRING([--with-scalapack-dir=DIR], [ScaLAPACK root directory]), 1539 [SCALAPACK_ROOT=${withval}], 1540 [SCALAPACK_ROOT="no"] 1541 ) 1542 AC_ARG_WITH( 1543 [scalapack-lib], 1544 AS_HELP_STRING([--with-scalapack-lib=LIBS], [ScaLAPACK libraries to link to]), 1545 [SCALAPACKLIB=${withval}], 1546 [SCALAPACKLIB="no"] 1547 ) 1548 AC_MSG_CHECKING([for ScaLAPACK]) 1549 if test "x${SCALAPACK_ROOT}" == "xno" && test "x${SCALAPACKLIB}" == "xno"; then 1550 HAVE_SCALAPACK=no 1551 SCALAPACKLIB="" 1552 elif test "x${SCALAPACK_ROOT}" != "xno"; then 1553 if ! test -d "${SCALAPACK_ROOT}"; then 1554 AC_MSG_ERROR([ScaLAPACK directory provided (${SCALAPACK_ROOT}) does not exist!]); 1465 1555 fi 1466 1556 HAVE_SCALAPACK=yes 1467 #SCALAPACKLIB=-L"$SCALAPACK_ROOT/ -lscalapack-openmpi"1468 SCALAPACKLIB=-L"$SCALAPACK_ROOT/ -lscalapack"1469 else if test "x$SCALAPACKLIB" != "xno"; then1557 SCALAPACKLIB="-L${SCALAPACK_ROOT}/lib -lscalapack" 1558 elif test "x${SCALAPACKLIB}" != "xno"; then 1559 dnl Value of SCALAPACKLIB should be valid here, so no need to set it (as above) 1470 1560 HAVE_SCALAPACK=yes 1471 1561 else 1472 AC_MSG_ERROR([cannot provide both scalapack dir and scalapack-lib]) 1473 fi 1474 fi 1475 fi 1476 AC_MSG_RESULT($HAVE_SCALAPACK) 1477 1478 dnl scalapack headers and libraries 1479 if test "x$HAVE_SCALAPACK" = "xyes"; then 1480 AC_DEFINE([_HAVE_SCALAPACK_],[1],[with Scalapack in ISSM src]) 1562 AC_MSG_ERROR([use --with-scalapack-dir or --with-scalapack-lib, but not both]) 1563 fi 1564 AC_MSG_RESULT([${HAVE_SCALAPACK}]) 1565 1566 dnl ScaLAPACK libraries and header files 1567 if test "x${HAVE_SCALAPACK}" == "xyes"; then 1568 AC_DEFINE([_HAVE_SCALAPACK_], [1], [with ScaLAPACK in ISSM src]) 1481 1569 AC_SUBST([SCALAPACKLIB]) 1482 1570 fi 1483 1571 dnl }}} 1484 dnl blas-lapack{{{ 1485 AC_ARG_WITH([blas-lapack-dir], 1486 AS_HELP_STRING([--with-blas-lapack-dir=DIR],[blas-lapack root directory]), 1487 [BLASLAPACK_ROOT=$withval],[BLASLAPACK_ROOT="no"]) 1488 1489 dnl Check whether blas-lapack is enabled 1490 AC_MSG_CHECKING([for blas-lapack]) 1491 if test "x$BLASLAPACK_ROOT" = "xno" ; then 1572 dnl BLAS/LAPACK{{{ 1573 AC_ARG_WITH( 1574 [blas-lapack-dir], 1575 AS_HELP_STRING([--with-blas-lapack-dir=DIR], [BLAS/LAPACK root directory]), 1576 [BLASLAPACK_ROOT=$withval], 1577 [BLASLAPACK_ROOT="no"] 1578 ) 1579 AC_MSG_CHECKING([for BLAS/LAPACK]) 1580 if test "x${BLASLAPACK_ROOT}" == "xno" ; then 1492 1581 HAVE_BLASLAPACK=no 1493 1582 else 1494 1583 HAVE_BLASLAPACK=yes 1495 if ! test -d "$ BLASLAPACK_ROOT"; then1496 AC_MSG_ERROR([ blas-lapack directory provided ($BLASLAPACK_ROOT) does not exist]);1497 fi 1498 fi 1499 AC_MSG_RESULT( $HAVE_BLASLAPACK)1500 1501 dnl blas-lapack headers and libraries1502 if test "x$ HAVE_BLASLAPACK"= "xyes"; then1584 if ! test -d "${BLASLAPACK_ROOT}"; then 1585 AC_MSG_ERROR([BLAS/LAPACK directory provided (${BLASLAPACK_ROOT}) does not exist!]); 1586 fi 1587 fi 1588 AC_MSG_RESULT([${HAVE_BLASLAPACK}]) 1589 1590 dnl BLAS/LAPACK libraries and header files 1591 if test "x${HAVE_BLASLAPACK}" == "xyes"; then 1503 1592 BLASLAPACKINCL="" 1504 1593 case "${host_os}" in 1505 *cygwin*) 1506 BLASLAPACKLIB="-L`cygpath -m $BLASLAPACK_ROOT` -Wl,libf2cblas.lib -Wl,libf2clapack.lib" 1507 ;; 1508 *linux*) 1509 BLASLAPACKLIB="-L${BLASLAPACK_ROOT}/lib" 1510 if ls ${BLASLAPACK_ROOT}/lib/liblapack.* 1> /dev/null 2>&1; then 1511 BLASLAPACKLIB+=" -llapack -lblas" 1512 else 1513 BLASLAPACKLIB+=" -lflapack -lfblas" 1514 fi 1515 ;; 1516 *darwin*) 1517 BLASLAPACKLIB="-L${BLASLAPACK_ROOT}/lib" 1518 if ls ${BLASLAPACKLIB}/libflapack.* 1> /dev/null 2>&1; then 1519 BLASLAPACKLIB+=" -lflapack -lfblas" 1520 else 1521 BLASLAPACKLIB+=" -llapack -lblas" 1522 fi 1523 ;; 1594 *cygwin*) 1595 BLASLAPACKLIB="-L`cygpath -m ${BLASLAPACK_ROOT}` -Wl,libf2cblas.lib -Wl,libf2clapack.lib" 1596 ;; 1597 *darwin*) 1598 BLASLAPACKLIB="-L${BLASLAPACK_ROOT}/lib" 1599 if ls ${BLASLAPACK_ROOT}/lib/libopenblas.* 1> /dev/null 2>&1; then 1600 BLASLAPACKLIB+=" -lopenblas" 1601 elif ls ${BLASLAPACK_ROOT}/lib/liblapack.* 1> /dev/null 2>&1; then 1602 BLASLAPACKLIB+=" -llapack -lblas" 1603 else 1604 BLASLAPACKLIB+=" -lflapack -lfblas" 1605 fi 1606 ;; 1607 *linux*) 1608 BLASLAPACKLIB="-L${BLASLAPACK_ROOT}/lib" 1609 if ls ${BLASLAPACK_ROOT}/lib/libopenblas.* 1> /dev/null 2>&1; then 1610 BLASLAPACKLIB+=" -lopenblas" 1611 elif ls ${BLASLAPACK_ROOT}/lib/liblapack.* 1> /dev/null 2>&1; then 1612 BLASLAPACKLIB+=" -llapack -lblas" 1613 else 1614 BLASLAPACKLIB+=" -lflapack -lfblas" 1615 fi 1616 ;; 1524 1617 esac 1525 AC_DEFINE([_HAVE_BLASLAPACK_], [1],[with blas lapackin ISSM src])1618 AC_DEFINE([_HAVE_BLASLAPACK_], [1], [with BLAS/LAPACK in ISSM src]) 1526 1619 AC_SUBST([BLASLAPACKLIB]) 1527 1620 AC_SUBST([BLASLAPACKINCL]) 1528 1621 fi 1529 1622 dnl }}} 1530 dnl mkl{{{ 1531 AC_ARG_WITH([mkl-libflags], 1532 AS_HELP_STRING([--with-mkl-libflags=LIBS],[mkl libraries to be used]), 1533 [MKL_LIBFLAGS=$withval],[MKL_LIBFLAGS="no"]) 1534 1535 dnl Check whether mkl is enabled 1536 AC_MSG_CHECKING([for mkl]) 1537 if test "x$MKL_LIBFLAGS" = "xno" ; then 1538 HAVE_MKL=no 1539 else 1540 HAVE_MKL=yes 1541 MKLLIB="$MKL_LIBFLAGS" 1542 AC_DEFINE([_HAVE_MKL_],[1],[with mkl in ISSM src]) 1543 AC_SUBST([MKLLIB]) 1544 AC_SUBST([MKLINCL]) 1545 fi 1546 AC_MSG_RESULT($HAVE_MKL) 1547 dnl }}} 1548 dnl plapack{{{ 1549 AC_MSG_CHECKING(for plapack) 1550 1551 AC_ARG_WITH([plapack-lib], 1552 AS_HELP_STRING([--with-plapack-lib = lib],[plapack library]), 1553 [PLAPACK_LIB=$withval],[PLAPACK_LIB=""]) 1554 1555 AC_ARG_WITH([plapack-include], 1556 AS_HELP_STRING([--with-plapack-include = include], 1557 [plapack include ]), 1558 [PLAPACK_INCLUDE=$withval],[PLAPACK_INCLUDE=""]) 1559 1560 if test -n "$PLAPACK_LIB"; then 1561 if test -n "$PLAPACK_INCLUDE"; then 1562 1623 dnl Math Kernel Library (MKL){{{ 1624 AC_ARG_WITH( 1625 [mkl-libflags], 1626 AS_HELP_STRING([--with-mkl-libflags=LIBS], [MKL libraries to be used]), 1627 [MKL_LIBFLAGS=${withval}], 1628 [MKL_LIBFLAGS="no"] 1629 ) 1630 AC_MSG_CHECKING([for MKL]) 1631 if test "x${MKL_LIBFLAGS}" == "xno"; then 1632 HAVE_MKL=no 1633 else 1634 HAVE_MKL=yes 1635 MKLLIB="${MKL_LIBFLAGS}" 1636 AC_DEFINE([_HAVE_MKL_], [1], [with MKL in ISSM src]) 1637 AC_SUBST([MKLLIB]) 1638 AC_SUBST([MKLINCL]) 1639 fi 1640 AC_MSG_RESULT([${HAVE_MKL}]) 1641 dnl }}} 1642 dnl PlaLAPACK{{{ 1643 1644 dnl TODO: Handle user supplying path to root directory *or* individual 1645 dnl arguments (like ScaLAPACK) 1646 dnl 1647 AC_MSG_CHECKING(for PlaLAPACK) 1648 AC_ARG_WITH( 1649 [plapack-lib], 1650 AS_HELP_STRING([--with-plapack-lib=<LIB>], [PlaLAPACK library]), 1651 [PLAPACK_LIB=${withval}], 1652 [PLAPACK_LIB=""] 1653 ) 1654 AC_ARG_WITH( 1655 [plapack-include], 1656 AS_HELP_STRING([--with-plapack-include=<INC>], [PlaLAPACK include]), 1657 [PLAPACK_INCLUDE=${withval}], 1658 [PLAPACK_INCLUDE=""] 1659 ) 1660 1661 if test -n "${PLAPACK_LIB}"; then 1662 if test -n "${PLAPACK_INCLUDE}"; then 1563 1663 HAVE_PLAPACK=yes 1564 PLAPACKINCL="$ PLAPACK_INCLUDE"1565 PLAPACKLIB="$ PLAPACK_LIB"1566 AC_DEFINE([_HAVE_PLAPACK_], [1],[with Plapackin ISSM src])1664 PLAPACKINCL="${PLAPACK_INCLUDE}" 1665 PLAPACKLIB="${PLAPACK_LIB}" 1666 AC_DEFINE([_HAVE_PLAPACK_], [1], [with PlaLAPACK in ISSM src]) 1567 1667 AC_SUBST([PLAPACKINCL]) 1568 1668 AC_SUBST([PLAPACKLIB]) … … 1570 1670 HAVE_PLAPACK=no 1571 1671 fi 1572 else 1672 elses 1573 1673 HAVE_PLAPACK=no 1574 1674 fi 1575 AC_MSG_RESULT($HAVE_PLAPACK) 1576 dnl }}} 1577 dnl mumps{{{ 1578 AC_ARG_WITH([mumps-dir], 1579 AS_HELP_STRING([--with-mumps-dir=DIR],[mumps root directory]), 1580 [MUMPS_ROOT=$withval],[MUMPS_ROOT="no"]) 1581 1582 dnl Check whether mumps is enabled 1583 AC_MSG_CHECKING([for mumps]) 1584 if test "x$MUMPS_ROOT" = "xno" ; then 1675 AC_MSG_RESULT([${HAVE_PLAPACK}]) 1676 dnl }}} 1677 dnl MUMPS{{{ 1678 AC_ARG_WITH( 1679 [mumps-dir], 1680 AS_HELP_STRING([--with-mumps-dir=DIR], [MUMPS root directory]), 1681 [MUMPS_ROOT=${withval}], 1682 [MUMPS_ROOT="no"] 1683 ) 1684 AC_MSG_CHECKING([for MUMPS]) 1685 if test "x${MUMPS_ROOT}" == "xno"; then 1585 1686 HAVE_MUMPS=no 1586 1687 else 1587 1688 HAVE_MUMPS=yes 1588 if ! test -d "$MUMPS_ROOT"; then 1589 AC_MSG_ERROR([mumps directory provided ($MUMPS_ROOT) does not exist]); 1590 fi 1591 fi 1592 AC_MSG_RESULT($HAVE_MUMPS) 1593 1594 dnl mumps headers and libraries 1595 if test "x$HAVE_MUMPS" == "xyes"; then 1596 MUMPSINCL=-I"$MUMPS_ROOT/include" 1597 if test "$PETSC_MAJOR" = "2" ; then 1598 MUMPSLIB=-L"$MUMPS_ROOT/lib " 1689 if ! test -d "${MUMPS_ROOT}"; then 1690 AC_MSG_ERROR([MUMPS directory provided (${MUMPS_ROOT}) does not exist!]); 1691 fi 1692 fi 1693 AC_MSG_RESULT([${HAVE_MUMPS}]) 1694 1695 dnl MUMPS libraries and header files 1696 if test "x${HAVE_MUMPS}" == "xyes"; then 1697 MUMPSINCL="-I${MUMPS_ROOT}/include" 1698 if test "x${MUMPS_ROOT}" == "x${PETSC_ROOT}"; then 1699 if test "x${PETSC_MAJOR}" == "x2"; then 1700 MUMPSLIB="-L${MUMPS_ROOT}/lib " 1701 else 1702 MUMPSLIB="-L${MUMPS_ROOT}/lib -ldmumps -lcmumps -lmumps_common -lpord -lparmetis -lzmumps -lmetis" 1703 fi 1599 1704 else 1600 MUMPSLIB=-L"$MUMPS_ROOT/lib -ldmumps -lcmumps -lmumps_common -lpord -lparmetis -lzmumps -lmetis" 1601 dnl MUMPSLIB=-L"$MUMPS_ROOT/lib " 1602 fi 1603 AC_DEFINE([_HAVE_MUMPS_],[1],[with Mumps in ISSM src]) 1705 MUMPSLIB="-L${MUMPS_ROOT}/lib -ldmumps -lmumps_common -lpord" 1706 fi 1707 AC_DEFINE([_HAVE_MUMPS_], [1], [with MUMPS in ISSM src]) 1604 1708 AC_SUBST([MUMPSINCL]) 1605 1709 AC_SUBST([MUMPSLIB]) 1606 1710 fi 1607 AM_CONDITIONAL([MUMPS], [test x$HAVE_MUMPS = xyes]) 1608 dnl }}} 1609 dnl mumps2{{{ 1610 if test "x$HAVE_MUMPS" != "xyes"; then 1611 AC_MSG_CHECKING(for mumps2 (stand alone)) 1612 1613 AC_ARG_WITH([mumps2-include], 1614 AS_HELP_STRING([--with-mumps2-include=DIR],[mumps2 include directory, necessary for parallel build]), 1615 [MUMPS_INCLUDE=$withval],[MUMPS_INCLUDE=""]) 1616 1617 AC_ARG_WITH([mumps2-libflags], 1618 AS_HELP_STRING([--with-mumps2-libflags=LIBS],[mumps2 libraries to be used, necessary for parallel build]), 1619 [MUMPS_LIBFLAGS=$withval],[MUMPS_LIBFLAGS=""]) 1620 1621 1622 if test -z "$MUMPS_INCLUDE" ; then 1623 HAVE_MUMPS=no 1624 else 1625 HAVE_MUMPS=yes 1626 1627 if test -z "$MUMPS_LIBDIR"; then 1628 MUMPSINCL=-I"$MUMPS_INCLUDE" 1629 MUMPSLIB="$MUMPS_LIBFLAGS" 1711 AM_CONDITIONAL([MUMPS], [test "x${HAVE_MUMPS}" == "xyes"]) 1712 dnl }}} 1713 dnl MUMPS2{{{ 1714 if test "x${HAVE_MUMPS}" != "xyes"; then 1715 AC_MSG_CHECKING(for MUMPS2 (standalone)) 1716 AC_ARG_WITH( 1717 [mumps2-include], 1718 AS_HELP_STRING([--with-mumps2-include=DIR], [MUMPS2 include directory, necessary for parallel build]), 1719 [MUMPS_INCLUDE=${withval}], 1720 [MUMPS_INCLUDE=""] 1721 ) 1722 AC_ARG_WITH( 1723 [mumps2-libflags], 1724 AS_HELP_STRING([--with-mumps2-libflags=LIBS], [MUMPS2 libraries to be used, necessary for parallel build]), 1725 [MUMPS_LIBFLAGS=${withval}], 1726 [MUMPS_LIBFLAGS=""] 1727 ) 1728 if test -z "${MUMPS_INCLUDE}"; then 1729 HAVE_MUMPS=no 1630 1730 else 1631 MUMPSINCL=-I"$MUMPS_INCLUDE" 1632 MUMPSLIB="-L$MUMPS_LIBDIR $MUMPS_LIBFLAGS" 1633 fi 1634 AC_DEFINE([_HAVE_MUMPS_],[1],[with MUMPS]) 1635 AC_SUBST([MUMPSINCL]) 1636 AC_SUBST([MUMPSLIB]) 1637 fi 1638 AM_CONDITIONAL([MUMPS], [test x$HAVE_MUMPS = xyes]) 1639 AC_MSG_RESULT($HAVE_MUMPS) 1640 1641 fi 1642 dnl }}} 1643 dnl blacs{{{ 1644 AC_ARG_WITH([blacs-dir], 1645 AS_HELP_STRING([--with-blacs-dir=DIR],[blacs root directory]), 1646 [BLACS_ROOT=$withval],[BLACS_ROOT="no"]) 1647 1648 dnl Check whether blacs is enabled 1649 AC_MSG_CHECKING([for blacs]) 1650 if test "x$BLACS_ROOT" = "xno" ; then 1731 HAVE_MUMPS=yes 1732 1733 if test -z "${MUMPS_LIBDIR}"; then 1734 MUMPSINCL="-I${MUMPS_INCLUDE}" 1735 MUMPSLIB="${MUMPS_LIBFLAGS}" 1736 else 1737 MUMPSINCL="-I${MUMPS_INCLUDE}" 1738 MUMPSLIB="-L${MUMPS_LIBDIR} ${MUMPS_LIBFLAGS}" 1739 fi 1740 AC_DEFINE([_HAVE_MUMPS_], [1], [with MUMPS]) 1741 AC_SUBST([MUMPSINCL]) 1742 AC_SUBST([MUMPSLIB]) 1743 fi 1744 AM_CONDITIONAL([MUMPS], [test "x${HAVE_MUMPS}" == "xyes"]) 1745 AC_MSG_RESULT([${HAVE_MUMPS}]) 1746 fi 1747 dnl }}} 1748 dnl BLACS{{{ 1749 AC_ARG_WITH( 1750 [blacs-dir], 1751 AS_HELP_STRING([--with-blacs-dir=DIR], [BLACS root directory]), 1752 [BLACS_ROOT=${withval}], 1753 [BLACS_ROOT="no"] 1754 ) 1755 AC_MSG_CHECKING([for BLACS]) 1756 if test "x${BLACS_ROOT}" == "xno"; then 1651 1757 HAVE_BLACS=no 1652 1758 else 1653 1759 HAVE_BLACS=yes 1654 if ! test -d "$ BLACS_ROOT"; then1655 AC_MSG_ERROR([ blacs directory provided ($BLACS_ROOT) does not exist]);1656 fi 1657 fi 1658 AC_MSG_RESULT( $HAVE_BLACS)1659 1660 dnl blacs headers and libraries1661 if test "x$ HAVE_BLACS" == "xyes"; then1760 if ! test -d "${BLACS_ROOT}"; then 1761 AC_MSG_ERROR([BLACS directory provided (${BLACS_ROOT}) does not exist!]); 1762 fi 1763 fi 1764 AC_MSG_RESULT([${HAVE_BLACS}]) 1765 1766 dnl BLACS libraries and header files 1767 if test "x${HAVE_BLACS}" == "xyes"; then 1662 1768 BLACSINCL="" 1663 BLACSLIB= -L"$BLACS_ROOT/-lblacs"1664 AC_DEFINE([_HAVE_BLACS_], [1],[with Blacsin ISSM src])1769 BLACSLIB="-L${BLACS_ROOT} -lblacs" 1770 AC_DEFINE([_HAVE_BLACS_], [1], [with BLACS in ISSM src]) 1665 1771 AC_SUBST([BLACSINCL]) 1666 1772 AC_SUBST([BLACSLIB]) 1667 1773 fi 1668 1774 dnl }}} 1669 dnl hypre{{{ 1670 AC_ARG_WITH([hypre-dir], 1671 AS_HELP_STRING([--with-hypre-dir=DIR],[hypre root directory]), 1672 [HYPRE_ROOT=$withval],[HYPRE_ROOT="no"]) 1673 1674 dnl Check whether hypre is enabled 1675 AC_MSG_CHECKING([for hypre]) 1676 if test "x$HYPRE_ROOT" = "xno" ; then 1775 dnl HYPRE{{{ 1776 AC_ARG_WITH( 1777 [hypre-dir], 1778 AS_HELP_STRING([--with-hypre-dir=DIR], [HYPRE root directory]), 1779 [HYPRE_ROOT=${withval}], 1780 [HYPRE_ROOT="no"] 1781 ) 1782 AC_MSG_CHECKING([for HYPRE]) 1783 if test "x${HYPRE_ROOT}" == "xno"; then 1677 1784 HAVE_HYPRE=no 1678 1785 else 1679 1786 HAVE_HYPRE=yes 1680 if ! test -d "$ HYPRE_ROOT"; then1681 AC_MSG_ERROR([ hypre directory provided ($HYPRE_ROOT) does not exist]);1682 fi 1683 fi 1684 AC_MSG_RESULT( $HAVE_HYPRE)1685 1686 dnl hypre headers and libraries1687 if test "x$ HAVE_HYPRE" == "xyes"; then1787 if ! test -d "${HYPRE_ROOT}"; then 1788 AC_MSG_ERROR([HYPRE directory provided (${HYPRE_ROOT}) does not exist!]); 1789 fi 1790 fi 1791 AC_MSG_RESULT([${HAVE_HYPRE}]) 1792 1793 dnl HYPRE libraries and header files 1794 if test "x${HAVE_HYPRE}" == "xyes"; then 1688 1795 HYPREINCL="" 1689 HYPRELIB= -L"$HYPRE_ROOT/lib -lHYPRE"1690 AC_DEFINE([_HAVE_HYPRE_], [1],[with Hyprein ISSM src])1796 HYPRELIB="-L${HYPRE_ROOT}/lib -lHYPRE" 1797 AC_DEFINE([_HAVE_HYPRE_], [1], [with HYPRE in ISSM src]) 1691 1798 AC_SUBST([HYPREINCL]) 1692 1799 AC_SUBST([HYPRELIB]) 1693 1800 fi 1694 1801 dnl }}} 1695 dnl prometheus{{{ 1696 AC_ARG_WITH([prometheus-dir], 1697 AS_HELP_STRING([--with-prometheus-dir=DIR],[prometheus root directory]), 1698 [PROMETHEUS_ROOT=$withval],[PROMETHEUS_ROOT="no"]) 1699 1700 dnl Check whether prometheus is enabled 1701 AC_MSG_CHECKING([for prometheus]) 1702 if test "x$PROMETHEUS_ROOT" = "xno" ; then 1703 HAVE_PROMETHEUS=no 1704 else 1705 HAVE_PROMETHEUS=yes 1706 if ! test -d "$PROMETHEUS_ROOT"; then 1707 AC_MSG_ERROR([prometheus directory provided ($PROMETHEUS_ROOT) does not exist]); 1708 fi 1709 fi 1710 AC_MSG_RESULT($HAVE_PROMETHEUS) 1711 1712 dnl prometheus headers and libraries 1713 if test "x$HAVE_PROMETHEUS" == "xyes"; then 1714 PROMETHEUSINCL=-I"$PROMETHEUS_ROOT/include" 1715 PROMETHEUSLIB=-L"$PROMETHEUS_ROOT/lib -lpromfei -lprometheus -lparmetis" 1716 AC_DEFINE([_HAVE_PROMETHEUS_],[1],[with Prometheus in ISSM src]) 1717 AC_SUBST([PROMETHEUSINCL]) 1718 AC_SUBST([PROMETHEUSLIB]) 1719 fi 1720 dnl }}} 1721 dnl semic{{{ 1722 AC_ARG_WITH([semic-dir], 1723 AS_HELP_STRING([--with-semic-dir=DIR], [Semic root directory.]), 1724 [SEMIC_ROOT=$withval],[SEMIC_ROOT="no"]) 1725 1726 dnl Check whether semic is enabled 1727 AC_MSG_CHECKING([for semic]) 1728 if test "x$SEMIC_ROOT" = "xno" ; then 1802 dnl Prometheus{{{ 1803 AC_ARG_WITH( 1804 [prometheus-dir], 1805 AS_HELP_STRING([--with-prometheus-dir=DIR], [Prometheus root directory]), 1806 [PROMETHEUS_ROOT=${withval}], 1807 [PROMETHEUS_ROOT="no"] 1808 ) 1809 AC_MSG_CHECKING([for Prometheus]) 1810 if test "x${PROMETHEUS_ROOT}" == "xno"; then 1811 HAVE_PROMETHEUS=no 1812 else 1813 HAVE_PROMETHEUS=yes 1814 if ! test -d "${PROMETHEUS_ROOT}"; then 1815 AC_MSG_ERROR([Prometheus directory provided (${PROMETHEUS_ROOT}) does not exist!]); 1816 fi 1817 fi 1818 AC_MSG_RESULT([${HAVE_PROMETHEUS}]) 1819 1820 dnl Prometheus libraries and header files 1821 if test "x${HAVE_PROMETHEUS}" == "xyes"; then 1822 PROMETHEUSINCL="-I${PROMETHEUS_ROOT}/include" 1823 PROMETHEUSLIB="-L${PROMETHEUS_ROOT}/lib -lpromfei -lprometheus -lparmetis" 1824 AC_DEFINE([_HAVE_PROMETHEUS_], [1], [with Prometheus in ISSM src]) 1825 AC_SUBST([PROMETHEUSINCL]) 1826 AC_SUBST([PROMETHEUSLIB]) 1827 fi 1828 dnl }}} 1829 dnl SEMIC{{{ 1830 AC_ARG_WITH( 1831 [semic-dir], 1832 AS_HELP_STRING([--with-semic-dir=DIR], [SEMIC root directory]), 1833 [SEMIC_ROOT=${withval}], 1834 [SEMIC_ROOT="no"] 1835 ) 1836 AC_MSG_CHECKING([for SEMIC]) 1837 if test "x${SEMIC_ROOT}" == "xno"; then 1729 1838 HAVE_SEMIC=no 1730 1839 else 1731 1840 HAVE_SEMIC=yes 1732 if ! test -d "$ SEMIC_ROOT"; then1733 AC_MSG_ERROR([ semic directory provided ($SEMIC_ROOT) does not exist]);1734 fi 1735 fi 1736 AC_MSG_RESULT( $HAVE_SEMIC)1737 1738 dnl semic headers and libraries1739 if test "x$ HAVE_SEMIC" == "xyes"; then1740 SEMICINCL="-I$ SEMIC_ROOT/"1741 AC_DEFINE([_HAVE_SEMIC_], [1],[with semicin ISSM src])1742 SEMICLIB=" $SEMIC_ROOT/libsurface_physics.a $SEMIC_ROOT/libutils.a"1841 if ! test -d "${SEMIC_ROOT}"; then 1842 AC_MSG_ERROR([SEMIC directory provided (${SEMIC_ROOT}) does not exist!]); 1843 fi 1844 fi 1845 AC_MSG_RESULT([${HAVE_SEMIC}]) 1846 1847 dnl SEMIC libraries and header files 1848 if test "x${HAVE_SEMIC}" == "xyes"; then 1849 SEMICINCL="-I${SEMIC_ROOT}" 1850 AC_DEFINE([_HAVE_SEMIC_], [1], [with SEMIC in ISSM src]) 1851 SEMICLIB="-L${SEMIC_ROOT} -lsurface_physics -lutils" 1743 1852 AC_SUBST([SEMICLIB]) 1744 1853 AC_SUBST([SEMICINCL]) 1745 1854 fi 1746 AM_CONDITIONAL([SEMIC],[test x$HAVE_SEMIC = xyes]) 1747 dnl }}} 1748 dnl spai{{{ 1749 AC_ARG_WITH([spai-dir], 1750 AS_HELP_STRING([--with-spai-dir=DIR],[spai root directory]), 1751 [SPAI_ROOT=$withval],[SPAI_ROOT="no"]) 1752 1753 dnl Check whether spai is enabled 1754 AC_MSG_CHECKING([for spai]) 1755 if test "x$SPAI_ROOT" = "xno" ; then 1756 HAVE_SPAI=no 1757 else 1758 HAVE_SPAI=yes 1759 if ! test -d "$SPAI_ROOT"; then 1760 AC_MSG_ERROR([spai directory provided ($SPAI_ROOT) does not exist]); 1761 fi 1762 fi 1763 AC_MSG_RESULT($HAVE_SPAI) 1764 1765 dnl spai headers and libraries 1766 if test "x$HAVE_SPAI" == "xyes"; then 1767 SPAIINCL=-I"$SPAI_ROOT/include" 1768 SPAILIB=-L"$SPAI_ROOT/lib -lspai" 1769 AC_DEFINE([_HAVE_SPAI_],[1],[with Spai in ISSM src]) 1770 AC_SUBST([SPAIINCL]) 1771 AC_SUBST([SPAILIB]) 1772 fi 1773 dnl }}} 1774 dnl superlu{{{ 1775 AC_ARG_WITH([superlu-dir], 1776 AS_HELP_STRING([--with-superlu-dir=DIR],[superlu root directory]), 1777 [SUPERLU_ROOT=$withval],[SUPERLU_ROOT="no"]) 1778 1779 dnl Check whether superlu is enabled 1780 AC_MSG_CHECKING([for superlu]) 1781 if test "x$SUPERLU_ROOT" = "xno" ; then 1855 AM_CONDITIONAL([SEMIC], [test "x${HAVE_SEMIC}" == "xyes"]) 1856 dnl }}} 1857 dnl SPAI{{{ 1858 AC_ARG_WITH( 1859 [spai-dir], 1860 AS_HELP_STRING([--with-spai-dir=DIR], [SPAI root directory]), 1861 [SPAI_ROOT=${withval}], 1862 [SPAI_ROOT="no"] 1863 ) 1864 AC_MSG_CHECKING([for SPAI]) 1865 if test "x${SPAI_ROOT}" == "xno"; then 1866 HAVE_SPAI=no 1867 else 1868 HAVE_SPAI=yes 1869 if ! test -d "${SPAI_ROOT}"; then 1870 AC_MSG_ERROR([SPAI directory provided (${SPAI_ROOT}) does not exist!]); 1871 fi 1872 fi 1873 AC_MSG_RESULT([${HAVE_SPAI}]) 1874 1875 dnl SPAI libraries and header files 1876 if test "x${HAVE_SPAI}" == "xyes"; then 1877 SPAIINCL="-I${SPAI_ROOT}/include" 1878 SPAILIB="-L${SPAI_ROOT}/lib -lspai" 1879 AC_DEFINE([_HAVE_SPAI_], [1], [with SPAI in ISSM src]) 1880 AC_SUBST([SPAIINCL]) 1881 AC_SUBST([SPAILIB]) 1882 fi 1883 dnl }}} 1884 dnl SuperLU{{{ 1885 AC_ARG_WITH( 1886 [superlu-dir], 1887 AS_HELP_STRING([--with-superlu-dir=DIR], [SuperLU root directory]), 1888 [SUPERLU_ROOT=${withval}], 1889 [SUPERLU_ROOT="no"] 1890 ) 1891 AC_MSG_CHECKING([for SuperLU]) 1892 if test "x${SUPERLU_ROOT}" == "xno"; then 1782 1893 HAVE_SUPERLU=no 1783 1894 else 1784 1895 HAVE_SUPERLU=yes 1785 if ! test -d "$SUPERLU_ROOT"; then 1786 AC_MSG_ERROR([superlu directory provided ($SUPERLU_ROOT) does not exist]); 1787 fi 1788 fi 1789 AC_MSG_RESULT($HAVE_SUPERLU) 1790 1791 dnl superlu headers and libraries 1792 if test "x$HAVE_SUPERLU" == "xyes"; then 1793 SUPERLUINCL=-I"$SUPERLU_ROOT/include" 1794 SUPERLULIB=-L"$SUPERLU_ROOT/lib -lsuperlu_dist" 1795 AC_DEFINE([_HAVE_SUPERLU_],[1],[with Superlu in ISSM src]) 1796 AC_SUBST([SUPERLUINCL]) 1797 AC_SUBST([SUPERLULIB]) 1798 fi 1799 dnl }}} 1800 dnl spooles{{{ 1801 AC_ARG_WITH([spooles-dir], 1802 AS_HELP_STRING([--with-spooles-dir=DIR],[spooles root directory]), 1803 [SPOOLES_ROOT=$withval],[SPOOLES_ROOT="no"]) 1804 1805 dnl Check whether spooles is enabled 1806 AC_MSG_CHECKING([for spooles]) 1807 if test "x$SPOOLES_ROOT" = "xno" ; then 1896 if ! test -d "${SUPERLU_ROOT}"; then 1897 AC_MSG_ERROR([SuperLU directory provided (${SUPERLU_ROOT}) does not exist!]); 1898 fi 1899 fi 1900 AC_MSG_RESULT([${HAVE_SUPERLU}]) 1901 1902 dnl SuperLU libraries and header files 1903 if test "x${HAVE_SUPERLU}" == "xyes"; then 1904 SUPERLUINCL="-I${SUPERLU_ROOT}/include" 1905 SUPERLULIB="-L${SUPERLU_ROOT}/lib -lsuperlu_dist" 1906 AC_DEFINE([_HAVE_SUPERLU_], [1], [with SuperLU in ISSM src]) 1907 AC_SUBST([SUPERLUINCL]) 1908 AC_SUBST([SUPERLULIB]) 1909 fi 1910 dnl }}} 1911 dnl SPOOLES{{{ 1912 AC_ARG_WITH( 1913 [spooles-dir], 1914 AS_HELP_STRING([--with-spooles-dir=DIR], [SPOOLES root directory]), 1915 [SPOOLES_ROOT=${withval}], 1916 [SPOOLES_ROOT="no"] 1917 ) 1918 AC_MSG_CHECKING([for SPOOLES]) 1919 if test "x${SPOOLES_ROOT}" == "xno"; then 1808 1920 HAVE_SPOOLES=no 1809 1921 else 1810 1922 HAVE_SPOOLES=yes 1811 if ! test -d "$SPOOLES_ROOT"; then 1812 AC_MSG_ERROR([spooles directory provided ($SPOOLES_ROOT) does not exist]); 1813 fi 1814 fi 1815 AC_MSG_RESULT($HAVE_SPOOLES) 1816 1817 dnl spooles headers and libraries 1818 if test "x$HAVE_SPOOLES" == "xyes"; then 1819 SPOOLESINCL=-I"$SPOOLES_ROOT/include" 1820 SPOOLESLIB=-L"$SPOOLES_ROOT/lib -lspooles" 1821 AC_DEFINE([_HAVE_SPOOLES_],[1],[with Spooles in ISSM src]) 1822 AC_SUBST([SPOOLESINCL]) 1823 AC_SUBST([SPOOLESLIB]) 1824 fi 1825 dnl }}} 1826 dnl pastix{{{ 1827 AC_ARG_WITH([pastix-dir], 1828 AS_HELP_STRING([--with-pastix-dir=DIR],[pastix root directory]), 1829 [PASTIX_ROOT=$withval],[PASTIX_ROOT="no"]) 1830 1831 dnl Check whether pastix is enabled 1832 AC_MSG_CHECKING([for pastix]) 1833 if test "x$PASTIX_ROOT" = "xno" ; then 1923 if ! test -d "${SPOOLES_ROOT}"; then 1924 AC_MSG_ERROR([SPOOLES directory provided (${SPOOLES_ROOT}) does not exist!]); 1925 fi 1926 fi 1927 AC_MSG_RESULT([${HAVE_SPOOLES}]) 1928 1929 dnl SPOOLES libraries and header files 1930 if test "x${HAVE_SPOOLES}" == "xyes"; then 1931 SPOOLESINCL="-I${SPOOLES_ROOT}/include" 1932 SPOOLESLIB="-L${SPOOLES_ROOT}/lib -lspooles" 1933 AC_DEFINE([_HAVE_SPOOLES_], [1], [with SPOOLES in ISSM src]) 1934 AC_SUBST([SPOOLESINCL]) 1935 AC_SUBST([SPOOLESLIB]) 1936 fi 1937 dnl }}} 1938 dnl PaStiX{{{ 1939 AC_ARG_WITH( 1940 [pastix-dir], 1941 AS_HELP_STRING([--with-pastix-dir=DIR], [PaStiX root directory]), 1942 [PASTIX_ROOT=${withval}], 1943 [PASTIX_ROOT="no"] 1944 ) 1945 AC_MSG_CHECKING([for PaStiX]) 1946 if test "x${PASTIX_ROOT}" == "xno"; then 1834 1947 HAVE_PASTIX=no 1835 1948 else 1836 1949 HAVE_PASTIX=yes 1837 if ! test -d "$PASTIX_ROOT"; then 1838 AC_MSG_ERROR([pastix directory provided ($PASTIX_ROOT) does not exist]); 1839 fi 1840 fi 1841 AC_MSG_RESULT($HAVE_PASTIX) 1842 1843 dnl pastix headers and libraries 1844 if test "x$HAVE_PASTIX" == "xyes"; then 1845 PASTIXINCL=-I"$PASTIX_ROOT/include" 1846 PASTIXLIB=-L"$PASTIX_ROOT/lib -lpastix_XXbit_mpi_smp_nobubble_int32_simple_real_scotch_i686_pc_linux -lptscotch -lptscotcherr -lpastix" 1847 AC_DEFINE([_HAVE_PASTIX_],[1],[with Pastix in ISSM src]) 1848 AC_SUBST([PASTIXINCL]) 1849 AC_SUBST([PASTIXLIB]) 1850 fi 1851 dnl }}} 1950 if ! test -d "${PASTIX_ROOT}"; then 1951 AC_MSG_ERROR([PaStiX directory provided (${PASTIX_ROOT}) does not exist!]); 1952 fi 1953 fi 1954 AC_MSG_RESULT([${HAVE_PASTIX}]) 1955 1956 dnl PaStiX libraries and header files 1957 if test "x${HAVE_PASTIX}" == "xyes"; then 1958 PASTIXINCL="-I${PASTIX_ROOT}/include" 1959 PASTIXLIB="-L${PASTIX_ROOT}/lib -lpastix_XXbit_mpi_smp_nobubble_int32_simple_real_scotch_i686_pc_linux -lptscotch -lptscotcherr -lpastix" 1960 AC_DEFINE([_HAVE_PASTIX_], [1], [with PaStiX in ISSM src]) 1961 AC_SUBST([PASTIXINCL]) 1962 AC_SUBST([PASTIXLIB]) 1963 fi 1964 dnl }}} 1965 dnl }}} 1852 1966 dnl ml{{{ 1853 AC_ARG_WITH([ml-dir], 1854 AS_HELP_STRING([--with-ml-dir=DIR],[ml root directory]), 1855 [ML_ROOT=$withval],[ML_ROOT="no"]) 1856 1857 dnl Check whether ml is enabled 1967 AC_ARG_WITH( 1968 [ml-dir], 1969 AS_HELP_STRING([--with-ml-dir=DIR],[ml root directory]), 1970 [ML_ROOT=$withval], 1971 [ML_ROOT="no"] 1972 ) 1858 1973 AC_MSG_CHECKING([for ml]) 1859 if test "x$ ML_ROOT" = "xno"; then1974 if test "x${ML_ROOT}" == "xno"; then 1860 1975 HAVE_ML=no 1861 1976 else 1862 1977 HAVE_ML=yes 1863 if ! test -d "$ ML_ROOT"; then1864 AC_MSG_ERROR([ml directory provided ($ ML_ROOT) does not exist]);1865 fi 1866 fi 1867 AC_MSG_RESULT( $HAVE_ML)1868 1869 dnl ml headers and libraries1870 if test "x$ HAVE_ML" == "xyes"; then1871 MLINCL=-I"$ ML_ROOT/include"1872 MLLIB=-L"$ ML_ROOT/lib -lml"1873 AC_DEFINE([_HAVE_ML_], [1],[with Blacsin ISSM src])1978 if ! test -d "${ML_ROOT}"; then 1979 AC_MSG_ERROR([ml directory provided (${ML_ROOT}) does not exist!]); 1980 fi 1981 fi 1982 AC_MSG_RESULT([${HAVE_ML}]) 1983 1984 dnl ml libraries and header files 1985 if test "x${HAVE_ML}" == "xyes"; then 1986 MLINCL=-I"${ML_ROOT}/include" 1987 MLLIB=-L"${ML_ROOT}/lib -lml" 1988 AC_DEFINE([_HAVE_ML_], [1], [with ml in ISSM src]) 1874 1989 AC_SUBST([MLINCL]) 1875 1990 AC_SUBST([MLLIB]) 1876 1991 fi 1877 1992 dnl }}} 1878 dnl umfpack{{{ 1879 AC_ARG_WITH([umfpack-dir], 1880 AS_HELP_STRING([--with-umfpack-dir=DIR],[UMFPACK root directory]), 1881 [UMFPACK_ROOT=$withval],[UMFPACK_ROOT="no"]) 1882 1883 dnl Check whether umfpack is enabled 1884 AC_MSG_CHECKING([for umfpack]) 1885 if test "x$UMFPACK_ROOT" = "xno" ; then 1993 dnl UMFPACK{{{ 1994 AC_ARG_WITH( 1995 [umfpack-dir], 1996 AS_HELP_STRING([--with-umfpack-dir=DIR], [UMFPACK root directory]), 1997 [UMFPACK_ROOT=${withval}], 1998 [UMFPACK_ROOT="no"] 1999 ) 2000 AC_MSG_CHECKING([for UMFPACK]) 2001 if test "x${UMFPACK_ROOT}" == "xno"; then 1886 2002 HAVE_UMFPACK=no 1887 2003 else 1888 2004 HAVE_UMFPACK=yes 1889 if ! test -d "$ UMFPACK_ROOT"; then1890 AC_MSG_ERROR([ umfpack directory provided ($UMFPACK_ROOT) does not exist]);1891 fi 1892 fi 1893 AC_MSG_RESULT( $HAVE_UMFPACK)1894 1895 dnl umfpack headers and libraries1896 if test "x$ HAVE_UMFPACK" == "xyes"; then2005 if ! test -d "${UMFPACK_ROOT}"; then 2006 AC_MSG_ERROR([UMFPACK directory provided (${UMFPACK_ROOT}) does not exist!]); 2007 fi 2008 fi 2009 AC_MSG_RESULT([${HAVE_UMFPACK}]) 2010 2011 dnl UMFPACK libraries and header files 2012 if test "x${HAVE_UMFPACK}" == "xyes"; then 1897 2013 UMFPACKINCL="" 1898 UMFPACKLIB= -L"$UMFPACK_ROOT/lib -lumfpack -lumfpack.5.5.1"1899 AC_DEFINE([_HAVE_UMFPACK_], [1],[with UMFPACK in ISSM src])2014 UMFPACKLIB="-L${UMFPACK_ROOT}/lib -lumfpack -lumfpack.5.5.1" 2015 AC_DEFINE([_HAVE_UMFPACK_], [1], [with UMFPACK in ISSM src]) 1900 2016 AC_SUBST([UMFPACKINCL]) 1901 2017 AC_SUBST([UMFPACKLIB]) 1902 2018 fi 1903 2019 dnl }}} 1904 dnl math{{{ 1905 AC_MSG_CHECKING(for math library) 1906 AC_ARG_WITH([math-lib], 1907 AS_HELP_STRING([--with-math-lib = otions],[math options, for ex: "/usr/lib/libm.a]), 1908 [MATH_LIB=$withval],[MATH_LIB=""]) 1909 1910 dnl check that --with-math-lib may have been provided 1911 if test -n "$MATH_LIB" ; then 2020 dnl libm (GNU math library){{{ 2021 AC_MSG_CHECKING(for libm) 2022 AC_ARG_WITH( 2023 [math-lib], 2024 AS_HELP_STRING([--with-math-lib=LIB], [libm (GNU math library) to use]), 2025 [MATH_LIB=${withval}], 2026 [MATH_LIB=""] 2027 ) 2028 if test -n "${MATH_LIB}"; then 1912 2029 HAVE_MATH=yes 1913 MATHLIB="$ MATH_LIB"1914 AC_DEFINE([_HAVE_MATH_], [1],[with MATHin ISSM src])2030 MATHLIB="${MATH_LIB}" 2031 AC_DEFINE([_HAVE_MATH_], [1], [with libm (GNU math library) in ISSM src]) 1915 2032 AC_SUBST([MATHLIB]) 1916 2033 fi 1917 AC_MSG_RESULT(done) 1918 dnl }}} 1919 dnl math77{{{ 1920 AC_ARG_WITH([math77-dir], 1921 AS_HELP_STRING([--with-math77-dir=DIR], [math77 root directory.]), 1922 [MATH77_ROOT=$withval],[MATH77_ROOT="no"]) 1923 1924 dnl Check whether math77 is enabled 1925 AC_MSG_CHECKING([for math77]) 1926 if test "x$MATH77_ROOT" = "xno" ; then 2034 AC_MSG_RESULT([done]) 2035 dnl }}} 2036 dnl MATH77{{{ 2037 AC_ARG_WITH( 2038 [math77-dir], 2039 AS_HELP_STRING([--with-math77-dir=DIR], [MATH77 root directory]), 2040 [MATH77_ROOT=${withval}], 2041 [MATH77_ROOT="no"] 2042 ) 2043 AC_MSG_CHECKING([for MATH77]) 2044 if test "x${MATH77_ROOT}" == "xno"; then 1927 2045 HAVE_MATH77=no 1928 2046 else 1929 2047 HAVE_MATH77=yes 1930 if ! test -d "$ MATH77_ROOT"; then1931 AC_MSG_ERROR([ math77 directory provided ($MATH77_ROOT) does not exist]);1932 fi 1933 fi 1934 AC_MSG_RESULT( $HAVE_MATH77)1935 1936 dnl math77 headers and libraries1937 if test "x$ HAVE_MATH77" == "xyes"; then1938 MATH77LIB="-L$ MATH77_ROOT/-lmath77"1939 AC_DEFINE([_HAVE_MATH77_], [1],[with math77 in ISSM src])2048 if ! test -d "${MATH77_ROOT}"; then 2049 AC_MSG_ERROR([MATH77 directory provided (${MATH77_ROOT}) does not exist!]); 2050 fi 2051 fi 2052 AC_MSG_RESULT([${HAVE_MATH77}]) 2053 2054 dnl MATH77 libraries and header files 2055 if test "x${HAVE_MATH77}" == "xyes"; then 2056 MATH77LIB="-L${MATH77_ROOT} -lmath77" 2057 AC_DEFINE([_HAVE_MATH77_], [1], [with MATH77 in ISSM src]) 1940 2058 AC_SUBST([MATH77LIB]) 1941 fi 1942 dnl }}} 1943 dnl fortran{{{ 1944 AC_ARG_WITH([fortran], 1945 AS_HELP_STRING([--with-fortran = YES], [do we compile fortran code (default is yes)]), 1946 [FORTRAN=$withval],[FORTRAN=yes]) 1947 AC_MSG_CHECKING(for fortran compilation) 1948 if test "x$FORTRAN" = "xyes"; then 1949 dnl defaults 2059 fi 2060 dnl }}} 2061 dnl Fortran{{{ 2062 AC_ARG_WITH( 2063 [fortran], 2064 AS_HELP_STRING([--with-fortran=YES], [do we compile Fortran code (default: yes)]), 2065 [FORTRAN=${withval}], 2066 [FORTRAN=yes] 2067 ) 2068 AC_MSG_CHECKING(for Fortran compilation) 2069 if test "x${FORTRAN}" == "xyes"; then 1950 2070 HAVE_FORTRAN=yes 1951 AC_DEFINE([_HAVE_FORTRAN_], [1],[with fortran capability])2071 AC_DEFINE([_HAVE_FORTRAN_], [1], [with Fortran capability]) 1952 2072 else 1953 2073 HAVE_FORTRAN=no 1954 2074 fi 1955 AM_CONDITIONAL([FORTRAN], [test x$FORTRAN = xyes])1956 AC_MSG_RESULT( $FORTRAN)1957 1958 if test "x$ FORTRAN"= "xyes"; then1959 dnl fortran library option1960 AC_MSG_CHECKING( for fortran library)1961 AC_ARG_WITH( [fortran-lib],1962 AS_HELP_STRING([--with-fortran-lib = options],[fortran options, for ex: "/usr/lib/gfortran.a]),1963 [FORTRAN_LIB=$withval],[FORTRAN_LIB=""])1964 1965 dnl check that --with-fortran-lib may have been provided1966 if test -n "$FORTRAN_LIB" ; then1967 dnl check that library provided EXISTS!1968 FORTRAN_DIR=$(echo $FORTRAN_LIB| sed -e "s/-L//g" | awk '{print $[1]}')1969 if test -d "$ FORTRAN_DIR" || test -f "$FORTRAN_DIR"; then1970 FORTRANLIB="$ FORTRAN_LIB"1971 AC_DEFINE([_HAVE_FORTRAN_], [1],[with FORTRANin ISSM src])2075 AM_CONDITIONAL([FORTRAN], [test "x${FORTRAN}" == "xyes"]) 2076 AC_MSG_RESULT([${FORTRAN}]) 2077 2078 if test "x${FORTRAN}" == "xyes"; then 2079 dnl Fortran library 2080 AC_MSG_CHECKING([for Fortran library]) 2081 AC_ARG_WITH( 2082 [fortran-lib], 2083 AS_HELP_STRING([--with-fortran-lib=LIB], [Fortran library to use (and, if needed, libraries on which it depends)]), 2084 [FORTRAN_LIB=${withval}], 2085 [FORTRAN_LIB=""] 2086 ) 2087 if test -n "${FORTRAN_LIB}"; then 2088 FORTRAN_DIR=$(echo ${FORTRAN_LIB} | sed -e "s/-L//g" | awk '{print $[1]}') 2089 if test -d "${FORTRAN_DIR}" || test -f "${FORTRAN_DIR}"; then 2090 FORTRANLIB="${FORTRAN_LIB}" 2091 AC_DEFINE([_HAVE_FORTRAN_], [1], [with Fortran library in ISSM src]) 1972 2092 AC_SUBST([FORTRANLIB]) 1973 2093 else 1974 if test "x$HAVE_MPI"= "xyes"; then1975 FORTRANLIB=$(mpif77 -print-file-name="libgfortran.a")1976 if test -f "$FORTRANLIB"; then1977 AC_MSG_ERROR([fortran library provided ($FORTRAN_LIB) does not exist, MPI suggests the following library: $FORTRANLIB]);1978 fi1979 fi1980 AC_MSG_ERROR([ fortran library provided ($FORTRAN_LIB) does not exist!]);2094 if test "x${HAVE_MPI}" == "xyes"; then 2095 MPI_REC_FORTRAN_LIB=$(mpif77 -print-file-name="libgfortran.a") 2096 if test -f "${FORTRANLIB}"; then 2097 AC_MSG_ERROR([Fortran library provided (${FORTRAN_LIB}) does not exist! MPI suggests the following library: ${MPI_REC_FORTRAN_LIB}]); 2098 fi 2099 fi 2100 AC_MSG_ERROR([Fortran library provided (${FORTRAN_LIB}) does not exist!]); 1981 2101 fi 1982 2102 fi 1983 AC_MSG_RESULT( done)1984 fi 1985 dnl }}} 1986 dnl graphics{{{1987 AC_MSG_CHECKING( for graphics library)1988 AC_ARG_WITH( [graphics-lib],1989 AS_HELP_STRING([--with-graphics-lib = options],[graphics options, for ex: "/usr/X11/lib/libX11.a]),1990 [GRAPHICS_LIB=$withval],[GRAPHICS_LIB=""])1991 1992 dnl check that --with-graphics-lib may have been provided1993 if test -n "$GRAPHICS_LIB" ; then1994 dnl check that library provided EXISTS!1995 GRAPHICS_DIR=$(echo $ GRAPHICS_LIB| sed -e "s/-L//g" | awk '{print $[1]}')1996 if test -d "$ GRAPHICS_DIR" || test -f "$GRAPHICS_DIR"; then2103 AC_MSG_RESULT([done]) 2104 fi 2105 dnl }}} 2106 dnl Xlib (graphics library){{{ 2107 AC_MSG_CHECKING([for Xlib (graphics library)]) 2108 AC_ARG_WITH( 2109 [graphics-lib], 2110 AS_HELP_STRING([--with-graphics-lib=options], [Xlib (graphics library) to use]), 2111 [GRAPHICS_LIB=${withval}], 2112 [GRAPHICS_LIB=""] 2113 ) 2114 if test -n "${GRAPHICS_LIB}"; then 2115 GRAPHICS_DIR=$(echo ${GRAPHICS_LIB} | sed -e "s/-L//g" | awk '{print $[1]}') 2116 if test -d "${GRAPHICS_DIR}" || test -f "${GRAPHICS_DIR}"; then 1997 2117 HAVE_GRAPHICS=yes 1998 GRAPHICSLIB="$ GRAPHICS_LIB"1999 AC_DEFINE([_HAVE_GRAPHICS_], [1],[with GRAPHICSin ISSM src])2118 GRAPHICSLIB="${GRAPHICS_LIB}" 2119 AC_DEFINE([_HAVE_GRAPHICS_], [1], [with Xlib (graphics library) in ISSM src]) 2000 2120 AC_SUBST([GRAPHICSLIB]) 2001 2121 else 2002 if test -f "$ PETSC_ROOT/conf/petscvariables"; then2003 GRAPHICSLIB=$(cat $PETSC_ROOT/conf/petscvariables | grep X_LIB)2004 AC_MSG_ERROR([ graphics library provided ($GRAPHICS_LIB) does not exist, PETSc suggests the following library: $GRAPHICSLIB]);2122 if test -f "${PETSC_ROOT}/conf/petscvariables"; then 2123 PETSC_REC_GRAPHICS_LIB=$(cat ${PETSC_ROOT}/conf/petscvariables | grep X_LIB) 2124 AC_MSG_ERROR([Xlib (graphics library) provided (${GRAPHICS_LIB}) does not exist! PETSc suggests the following library: ${PETSC_REC_GRAPHICS_LIB}]); 2005 2125 fi 2006 AC_MSG_ERROR([graphics library provided ($GRAPHICS_LIB$) does not exist!]); 2007 fi 2008 fi 2009 AC_MSG_RESULT(done) 2010 dnl }}} 2011 dnl meteoio{{{ 2012 AC_ARG_WITH([meteoio-dir], 2013 AS_HELP_STRING([--with-meteoio-dir=DIR], [use meteoio in conjunction with snowpack model.]), 2014 [METEOIO_ROOT=$withval],[METEOIO_ROOT="no"]) 2015 2016 dnl Check whether meteoio is enabled 2017 AC_MSG_CHECKING([for meteoio]) 2018 if test "x$METEOIO_ROOT" = "xno" ; then 2126 AC_MSG_ERROR([Xlib (graphics library) provided (${GRAPHICS_LIB}) does not exist!]); 2127 fi 2128 fi 2129 AC_MSG_RESULT([done]) 2130 dnl }}} 2131 dnl MeteoIO{{{ 2132 AC_ARG_WITH( 2133 [meteoio-dir], 2134 AS_HELP_STRING([--with-meteoio-dir=DIR], [use MeteoIO in conjunction with SNOWPACK model]), 2135 [METEOIO_ROOT=${withval}], 2136 [METEOIO_ROOT="no"] 2137 ) 2138 AC_MSG_CHECKING([for MeteoIO]) 2139 if test "x${METEOIO_ROOT}" == "xno"; then 2019 2140 HAVE_METEOIO=no 2020 2141 else 2021 2142 HAVE_METEOIO=yes 2022 if ! test -d "$ METEOIO_ROOT"; then2023 AC_MSG_ERROR([ meteoio directory provided ($METEOIO_ROOT) does not exist]);2024 fi 2025 fi 2026 AC_MSG_RESULT( $HAVE_METEOIO)2027 2028 dnl meteoio headers and libraries2029 if test "x$ HAVE_METEOIO" == "xyes"; then2030 METEOIOINCL="-I$ METEOIO_ROOT/include"2031 METEOIOLIB="-dy -L$ METEOIO_ROOT/lib -lmeteoio"2032 2033 AC_DEFINE([_HAVE_METEOIO_], [1],[with meteoio])2143 if ! test -d "${METEOIO_ROOT}"; then 2144 AC_MSG_ERROR([MeteoIO directory provided (${METEOIO_ROOT}) does not exist!]); 2145 fi 2146 fi 2147 AC_MSG_RESULT([${HAVE_METEOIO}]) 2148 2149 dnl MeteoIO libraries and header files 2150 if test "x${HAVE_METEOIO}" == "xyes"; then 2151 METEOIOINCL="-I${METEOIO_ROOT}/include" 2152 METEOIOLIB="-dy -L${METEOIO_ROOT}/lib -lmeteoio" 2153 2154 AC_DEFINE([_HAVE_METEOIO_], [1], [with MeteoIO]) 2034 2155 AC_SUBST([METEOIOINCL]) 2035 2156 AC_SUBST([METEOIOLIB]) 2036 2157 fi 2037 AM_CONDITIONAL([METEOIO], [test x$HAVE_METEOIO = xyes]) 2038 dnl }}} 2039 dnl snowpack{{{ 2040 AC_ARG_WITH([snowpack-dir], 2041 AS_HELP_STRING([--with-snowpack-dir=DIR], [use snowpack for surface mass balance model.]), 2042 [SNOWPACK_ROOT=$withval],[SNOWPACK_ROOT="no"]) 2043 2044 dnl Check whether snowpack is enabled 2045 AC_MSG_CHECKING([for snowpack]) 2046 if test "x$SNOWPACK_ROOT" = "xno" ; then 2158 AM_CONDITIONAL([METEOIO], [test "x${HAVE_METEOIO}" == "xyes"]) 2159 dnl }}} 2160 dnl SNOWPACK{{{ 2161 AC_ARG_WITH( 2162 [snowpack-dir], 2163 AS_HELP_STRING([--with-snowpack-dir=DIR], [use SNOWPACK for surface mass balance model]), 2164 [SNOWPACK_ROOT=${withval}], 2165 [SNOWPACK_ROOT="no"] 2166 ) 2167 AC_MSG_CHECKING([for SNOWPACK]) 2168 if test "x${SNOWPACK_ROOT}" == "xno"; then 2047 2169 HAVE_SNOWPACK=no 2048 2170 else 2049 2171 HAVE_SNOWPACK=yes 2050 if ! test -d "$SNOWPACK_ROOT"; then 2051 AC_MSG_ERROR([snowpack directory provided ($SNOWPACK_ROOT) does not exist]); 2052 fi 2053 fi 2054 AC_MSG_RESULT($HAVE_SNOWPACK) 2055 2056 dnl snowpack headers and libraries 2057 if test "x$HAVE_SNOWPACK" == "xyes"; then 2058 SNOWPACKINCL="-I$SNOWPACK_ROOT/include" 2059 SNOWPACKLIB="-dy -L$SNOWPACK_ROOT/lib -lsnowpack " 2060 2061 AC_DEFINE([_HAVE_SNOWPACK_],[1],[with snowpack for surface mass balance model]) 2172 if ! test -d "${SNOWPACK_ROOT}"; then 2173 AC_MSG_ERROR([SNOWPACK directory provided (${SNOWPACK_ROOT}) does not exist!]); 2174 fi 2175 fi 2176 AC_MSG_RESULT([${HAVE_SNOWPACK}]) 2177 2178 dnl SNOWPACK libraries and header files 2179 if test "x${HAVE_SNOWPACK}" == "xyes"; then 2180 SNOWPACKINCL="-I${SNOWPACK_ROOT}/include" 2181 SNOWPACKLIB="-dy -L${SNOWPACK_ROOT}/lib -lsnowpack" 2182 AC_DEFINE([_HAVE_SNOWPACK_], [1], [with SNOWPACK for surface mass balance model]) 2062 2183 AC_SUBST([SNOWPACKINCL]) 2063 2184 AC_SUBST([SNOWPACKLIB]) 2064 2185 fi 2065 AM_CONDITIONAL([SNOWPACK], [test x$HAVE_SNOWPACK = xyes]) 2066 dnl }}} 2067 dnl neopz{{{ 2068 AC_ARG_WITH([neopz-dir], 2069 AS_HELP_STRING([--with-neopz-dir=DIR], [neopz root directory.]), 2070 [NEOPZ_ROOT=$withval],[NEOPZ_ROOT="no"]) 2071 2072 dnl Check whether neopz is enabled 2073 AC_MSG_CHECKING([for neopz]) 2074 if test "x$NEOPZ_ROOT" = "xno" ; then 2186 AM_CONDITIONAL([SNOWPACK], [test "x${HAVE_SNOWPACK}" == "xyes"]) 2187 dnl }}} 2188 dnl NeoPZ{{{ 2189 AC_ARG_WITH( 2190 [neopz-dir], 2191 AS_HELP_STRING([--with-neopz-dir=DIR], [NeoPZ root directory]), 2192 [NEOPZ_ROOT=${withval}], 2193 [NEOPZ_ROOT="no"] 2194 ) 2195 AC_MSG_CHECKING([for NeoPZ]) 2196 if test "x${NEOPZ_ROOT}" == "xno"; then 2075 2197 HAVE_NEOPZ=no 2076 2198 else 2077 2199 HAVE_NEOPZ=yes 2078 if ! test -d "$NEOPZ_ROOT"; then 2079 AC_MSG_ERROR([neopz directory provided ($NEOPZ_ROOT) does not exist]); 2080 fi 2081 fi 2082 AC_MSG_RESULT($HAVE_NEOPZ) 2083 2084 dnl neopz headers and libraries 2085 if test "x$HAVE_NEOPZ" == "xyes"; then 2086 NEOPZLIB="$NEOPZ_ROOT/lib/libpz.a" 2087 NEOPZINCL=" -I$NEOPZ_ROOT/include" 2088 NEOPZINCL+=" -I$NEOPZ_ROOT/include/Analysis" 2089 NEOPZINCL+=" -I$NEOPZ_ROOT/include/Common" 2090 NEOPZINCL+=" -I$NEOPZ_ROOT/include/External" 2091 NEOPZINCL+=" -I$NEOPZ_ROOT/include/Frontal" 2092 NEOPZINCL+=" -I$NEOPZ_ROOT/include/Geom" 2093 NEOPZINCL+=" -I$NEOPZ_ROOT/include/Integral" 2094 NEOPZINCL+=" -I$NEOPZ_ROOT/include/LinearSolvers" 2095 NEOPZINCL+=" -I$NEOPZ_ROOT/include/Material" 2096 NEOPZINCL+=" -I$NEOPZ_ROOT/include/Matrix" 2097 NEOPZINCL+=" -I$NEOPZ_ROOT/include/Mesh" 2098 NEOPZINCL+=" -I$NEOPZ_ROOT/include/Multigrid" 2099 NEOPZINCL+=" -I$NEOPZ_ROOT/include/PerfUtil" 2100 NEOPZINCL+=" -I$NEOPZ_ROOT/include/Post" 2101 NEOPZINCL+=" -I$NEOPZ_ROOT/include/Pre" 2102 NEOPZINCL+=" -I$NEOPZ_ROOT/include/Refine" 2103 NEOPZINCL+=" -I$NEOPZ_ROOT/include/Save" 2104 NEOPZINCL+=" -I$NEOPZ_ROOT/include/Shape" 2105 NEOPZINCL+=" -I$NEOPZ_ROOT/include/SpecialMaps" 2106 NEOPZINCL+=" -I$NEOPZ_ROOT/include/StrMatrix" 2107 NEOPZINCL+=" -I$NEOPZ_ROOT/include/SubStruct" 2108 NEOPZINCL+=" -I$NEOPZ_ROOT/include/Topology" 2109 NEOPZINCL+=" -I$NEOPZ_ROOT/include/Util" 2110 CXXFLAGS+=" -std=c++11" 2111 AC_DEFINE([_HAVE_NEOPZ_],[1],[with NEOPZ in ISSM src]) 2112 AC_SUBST([NEOPZINCL]) 2113 AC_SUBST([NEOPZLIB]) 2114 fi 2115 AM_CONDITIONAL([NEOPZ], [test x$HAVE_NEOPZ = xyes]) 2116 dnl }}} 2117 2200 if ! test -d "${NEOPZ_ROOT}"; then 2201 AC_MSG_ERROR([NeoPZ directory provided (${NEOPZ_ROOT}) does not exist!]); 2202 fi 2203 fi 2204 AC_MSG_RESULT([${HAVE_NEOPZ}]) 2205 2206 dnl NeoPZ libraries and header files 2207 if test "x${HAVE_NEOPZ}" == "xyes"; then 2208 NEOPZLIB="${NEOPZ_ROOT}/lib/libpz.a" 2209 NEOPZINCL="-I${NEOPZ_ROOT}/include" 2210 NEOPZINCL+=" -I${NEOPZ_ROOT}/include/Analysis" 2211 NEOPZINCL+=" -I${NEOPZ_ROOT}/include/Common" 2212 NEOPZINCL+=" -I${NEOPZ_ROOT}/include/External" 2213 NEOPZINCL+=" -I${NEOPZ_ROOT}/include/Frontal" 2214 NEOPZINCL+=" -I${NEOPZ_ROOT}/include/Geom" 2215 NEOPZINCL+=" -I${NEOPZ_ROOT}/include/Integral" 2216 NEOPZINCL+=" -I${NEOPZ_ROOT}/include/LinearSolvers" 2217 NEOPZINCL+=" -I${NEOPZ_ROOT}/include/Material" 2218 NEOPZINCL+=" -I${NEOPZ_ROOT}/include/Matrix" 2219 NEOPZINCL+=" -I${NEOPZ_ROOT}/include/Mesh" 2220 NEOPZINCL+=" -I${NEOPZ_ROOT}/include/Multigrid" 2221 NEOPZINCL+=" -I${NEOPZ_ROOT}/include/PerfUtil" 2222 NEOPZINCL+=" -I${NEOPZ_ROOT}/include/Post" 2223 NEOPZINCL+=" -I${NEOPZ_ROOT}/include/Pre" 2224 NEOPZINCL+=" -I${NEOPZ_ROOT}/include/Refine" 2225 NEOPZINCL+=" -I${NEOPZ_ROOT}/include/Save" 2226 NEOPZINCL+=" -I${NEOPZ_ROOT}/include/Shape" 2227 NEOPZINCL+=" -I${NEOPZ_ROOT}/include/SpecialMaps" 2228 NEOPZINCL+=" -I${NEOPZ_ROOT}/include/StrMatrix" 2229 NEOPZINCL+=" -I${NEOPZ_ROOT}/include/SubStruct" 2230 NEOPZINCL+=" -I${NEOPZ_ROOT}/include/Topology" 2231 NEOPZINCL+=" -I${NEOPZ_ROOT}/include/Util" 2232 CXXFLAGS+=" -std=c++11" 2233 AC_DEFINE([_HAVE_NEOPZ_], [1], [with NeoPZ in ISSM src]) 2234 AC_SUBST([NEOPZINCL]) 2235 AC_SUBST([NEOPZLIB]) 2236 fi 2237 AM_CONDITIONAL([NEOPZ], [test "x${HAVE_NEOPZ}" == "xyes"]) 2238 dnl }}} 2118 2239 dnl Capabilities 2119 2240 dnl with-bamg{{{ 2120 AC_ARG_WITH([bamg], 2121 AS_HELP_STRING([--with-bamg = YES],[compile with bamg capabilities (default is yes)]), 2122 [BAMG=$withval],[BAMG=yes]) 2123 AC_MSG_CHECKING(for bamg capability compilation) 2124 2241 AC_ARG_WITH( 2242 [bamg], 2243 AS_HELP_STRING([--with-bamg=YES], [compile with BAMG capabilities (default: yes)]), 2244 [BAMG=${withval}], 2245 [BAMG=yes] 2246 ) 2247 AC_MSG_CHECKING([for BAMG capability compilation]) 2125 2248 HAVE_BAMG=no 2126 if test "x$ BAMG"= "xyes"; then2249 if test "x${BAMG}" == "xyes"; then 2127 2250 HAVE_BAMG=yes 2128 AC_DEFINE([_HAVE_BAMG_], [1],[with bamgmeshing capability])2129 fi 2130 AM_CONDITIONAL([BAMG], [test x$HAVE_BAMG = xyes])2131 AC_MSG_RESULT( $HAVE_BAMG)2251 AC_DEFINE([_HAVE_BAMG_], [1], [with BAMG meshing capability]) 2252 fi 2253 AM_CONDITIONAL([BAMG], [test "x${HAVE_BAMG}" == "xyes"]) 2254 AC_MSG_RESULT([${HAVE_BAMG}]) 2132 2255 dnl }}} 2133 2256 dnl with-ocean{{{ 2134 AC_ARG_WITH([ocean], 2135 AS_HELP_STRING([--with-ocean = YES],[compile with ice/ocean coupling (default is no)]), 2136 [OCEAN=$withval],[OCEAN=no]) 2137 AC_MSG_CHECKING(for ice/ocean capability compilation) 2257 AC_ARG_WITH( 2258 [ocean], 2259 AS_HELP_STRING([--with-ocean = YES], [compile with ice/ocean coupling capability (default: no)]), 2260 [OCEAN=${withval}], 2261 [OCEAN=no] 2262 ) 2263 AC_MSG_CHECKING(for ice/ocean coupling capability compilation) 2138 2264 2139 2265 HAVE_OCEAN=no 2140 if test "x$ OCEAN"= "xyes"; then2266 if test "x${OCEAN}" == "xyes"; then 2141 2267 HAVE_OCEAN=yes 2142 AC_DEFINE([_HAVE_OCEAN_], [1],[with ice/ocean coupling capability])2143 fi 2144 AM_CONDITIONAL([OCEAN], [test x$HAVE_OCEAN = xyes])2145 AC_MSG_RESULT( $HAVE_OCEAN)2268 AC_DEFINE([_HAVE_OCEAN_], [1], [with ice/ocean coupling capability]) 2269 fi 2270 AM_CONDITIONAL([OCEAN], [test "x${HAVE_OCEAN}" == "xyes"]) 2271 AC_MSG_RESULT([${HAVE_OCEAN}]) 2146 2272 dnl }}} 2147 2273 dnl with-kml{{{ 2148 AC_ARG_WITH([kml], 2149 AS_HELP_STRING([--with-kml = YES],[compile with kml capabilities (default is no)]), 2150 [KML=$withval],[KML=no]) 2274 AC_ARG_WITH( 2275 [kml], 2276 AS_HELP_STRING([--with-kml=YES], [compile with kml capabilities (default: no)]), 2277 [KML=${withval}], 2278 [KML=no] 2279 ) 2151 2280 AC_MSG_CHECKING(for kml capability compilation) 2152 2281 2153 2282 HAVE_KML=no 2154 if test "x$ KML"= "xyes"; then2283 if test "x${KML}" == "xyes"; then 2155 2284 HAVE_KML=yes 2156 AC_DEFINE([_HAVE_KML_], [1],[with kml capability])2157 fi 2158 AM_CONDITIONAL([KML], [test x$HAVE_KML = xyes])2159 AC_MSG_RESULT( $HAVE_KML)2285 AC_DEFINE([_HAVE_KML_], [1], [with kml capability]) 2286 fi 2287 AM_CONDITIONAL([KML], [test "x${HAVE_KML}" == "xyes"]) 2288 AC_MSG_RESULT([${HAVE_KML}]) 2160 2289 dnl }}} 2161 2290 dnl with-kriging{{{ 2162 AC_ARG_WITH([kriging], 2163 AS_HELP_STRING([--with-kriging = YES],[compile with kriging capabilities (default is yes)]), 2164 [KRIGING=$withval],[KRIGING=yes]) 2291 AC_ARG_WITH( 2292 [kriging], 2293 AS_HELP_STRING([--with-kriging=YES], [compile with kriging capabilities (default: yes)]), 2294 [KRIGING=${withval}], 2295 [KRIGING=yes] 2296 ) 2165 2297 AC_MSG_CHECKING(for kriging capability compilation) 2166 2298 2167 2299 HAVE_KRIGING=no 2168 if test "x$ KRIGING"= "xyes"; then2300 if test "x${KRIGING}" == "xyes"; then 2169 2301 HAVE_KRIGING=yes 2170 AC_DEFINE([_HAVE_KRIGING_], [1],[with kriging capability])2171 fi 2172 AM_CONDITIONAL([KRIGING], [test x$HAVE_KRIGING = xyes])2173 AC_MSG_RESULT( $HAVE_KRIGING)2302 AC_DEFINE([_HAVE_KRIGING_], [1], [with kriging capability]) 2303 fi 2304 AM_CONDITIONAL([KRIGING], [test "x${HAVE_KRIGING}" == "xyes"]) 2305 AC_MSG_RESULT([${HAVE_KRIGING}]) 2174 2306 dnl }}} 2175 2307 … … 2179 2311 dnl Platform specifics 2180 2312 dnl with-ios{{{ 2181 AC_ARG_WITH([ios], 2182 AS_HELP_STRING([--with-ios = YES], [compile with iOS capabilities (default is no, alternatives are yes)]), 2183 [IOS=$withval],[IOS=no]) 2313 AC_ARG_WITH( 2314 [ios], 2315 AS_HELP_STRING([--with-ios=YES], [compile with iOS capabilities (default: no)]), 2316 [IOS=${withval}], 2317 [IOS=no] 2318 ) 2184 2319 AC_MSG_CHECKING(for iOS compilation) 2185 2320 2186 if test "x$IOS" = "xyes"; then2187 dnl defaults2321 HAVE_IOS=no 2322 if test "x${IOS}" == "xyes"; then 2188 2323 HAVE_IOS=yes 2189 2190 AC_DEFINE([_HAVE_IOS_],[1],[with android capability]) 2191 elif test "x$IOS" = "xno"; then 2192 HAVE_IOS=no 2193 else 2194 AC_MSG_ERROR([--with-ios should be either no or yes]) 2195 fi 2196 AM_CONDITIONAL([IOS], [test x$HAVE_IOS != xno]) 2197 AC_MSG_RESULT($HAVE_IOS) 2324 AC_DEFINE([_HAVE_IOS_], [1], [with iOS capability]) 2325 fi 2326 AM_CONDITIONAL([IOS], [test "x${HAVE_IOS}" != "xno"]) 2327 AC_MSG_RESULT([${HAVE_IOS}]) 2198 2328 dnl }}} 2199 2329 dnl with-android{{{ 2200 AC_ARG_WITH( [android],2201 AS_HELP_STRING([--with-android = EXE], [compile with android capabilities (default is no, alternatives are exe and jni)]),2202 [ANDROID=$withval],[ANDROID=no])2203 AC_MSG_CHECKING(for android capability compilation)2204 2205 if test "x$ANDROID" = "xjni"; then2206 2207 dnl defaults2330 AC_ARG_WITH( 2331 [android], 2332 AS_HELP_STRING([--with-android=EXE], [compile with Android capabilities (default: "no"; alternatives: "exe", "jni")]), 2333 [ANDROID=${withval}], 2334 [ANDROID=no]) 2335 AC_MSG_CHECKING([for Android capability compilation]) 2336 2337 if test "x${ANDROID}" == "xjni"; then 2208 2338 HAVE_ANDROID=jni 2209 AC_DEFINE([_HAVE_ANDROID_],[1],[with android capability]) 2210 AC_DEFINE([_HAVE_ANDROID_JNI_],[1],[with android jni]) 2211 elif test "x$ANDROID" = "xexe"; then 2212 dnl defaults 2339 AC_DEFINE([_HAVE_ANDROID_], [1], [with Android capability]) 2340 AC_DEFINE([_HAVE_ANDROID_JNI_], [1], [with Android Java Native Interface (JNI)]) 2341 elif test "x${ANDROID}" == "xexe"; then 2213 2342 HAVE_ANDROID=exe 2214 2215 AC_DEFINE([_HAVE_ANDROID_],[1],[with android capability]) 2216 elif test "x$ANDROID" = "xno"; then 2343 AC_DEFINE([_HAVE_ANDROID_], [1], [with Android capability]) 2344 elif test "x${ANDROID}" == "xno"; then 2217 2345 HAVE_ANDROID=no 2218 2346 else 2219 AC_MSG_ERROR([--with-android should be either no, exe or jni])2220 fi 2221 AM_CONDITIONAL([ANDROID], [test x$HAVE_ANDROID != xno])2222 AM_CONDITIONAL([ANDROIDJNI], [test x$HAVE_ANDROID = xjni])2223 AM_CONDITIONAL([ANDROIDEXE], [test x$HAVE_ANDROID = xexe])2224 AC_MSG_RESULT( $HAVE_ANDROID)2347 AC_MSG_ERROR([--with-android should be either "no", "exe" or "jni"]) 2348 fi 2349 AM_CONDITIONAL([ANDROID], [test "x${HAVE_ANDROID}" != "xno"]) 2350 AM_CONDITIONAL([ANDROIDJNI], [test "x${HAVE_ANDROID}" == "xjni"]) 2351 AM_CONDITIONAL([ANDROIDEXE], [test "x${HAVE_ANDROID}" == "xexe"]) 2352 AC_MSG_RESULT([${HAVE_ANDROID}]) 2225 2353 dnl }}} 2226 2354 dnl with-android-ndk{{{ 2227 AC_ARG_WITH([android-ndk], 2228 AS_HELP_STRING([--with-android-ndk=DIR], [android-ndk root directory.]), 2229 [ANDROID_NDK_ROOT=$withval],[ANDROID_NDK_ROOT=""]) 2230 AC_MSG_CHECKING(with android ndk) 2231 2232 if test -d "$ANDROID_NDK_ROOT"; then 2233 dnl defaults 2355 AC_ARG_WITH( 2356 [android-ndk], 2357 AS_HELP_STRING([--with-android-ndk=DIR], [Android NDK root directory]), 2358 [ANDROID_NDK_ROOT=${withval}], 2359 [ANDROID_NDK_ROOT=""] 2360 ) 2361 AC_MSG_CHECKING([with Android Native Development Kit (NDK)]) 2362 2363 if test -d "${ANDROID_NDK_ROOT}"; then 2234 2364 HAVE_ANDROID_NDK=yes 2235 ANDROID_NDKINCL="-I$ANDROID_NDK_ROOT/arm-linux-android-install/sysroot/usr/include" 2236 2237 AC_DEFINE([_HAVE_ANDROID_NDK_],[1],[with android ndk in ISSM src]) 2365 ANDROID_NDKINCL="-I${ANDROID_NDK_ROOT}/arm-linux-android-install/sysroot/usr/include" 2366 AC_DEFINE([_HAVE_ANDROID_NDK_], [1], [with Android NDK in ISSM src]) 2238 2367 AC_SUBST([ANDROID_NDKINCL]) 2239 2368 else 2240 2369 HAVE_ANDROID_NDK=no 2241 2370 fi 2242 AC_MSG_RESULT( $HAVE_ANDROID_NDK)2371 AC_MSG_RESULT([${HAVE_ANDROID_NDK}]) 2243 2372 dnl }}} 2244 2373 … … 2246 2375 dnl optimization{{{ 2247 2376 dnl -- bypass standard optimization -g -O2 -fPIC ? 2248 AC_ARG_WITH([cxxoptflags], 2249 AS_HELP_STRING([--with-cxxoptflags = CXXOPTFLAGS], [optimization using CXX flags, ex: --with-cxxoptflags=-march=opteron -O3]), 2250 [CXXOPTFLAGS=$withval],[CXXOPTFLAGS="-g -O2 -fPIC"]) 2251 AC_MSG_CHECKING(for c++ optimization flags) 2377 AC_ARG_WITH( 2378 [cxxoptflags], 2379 AS_HELP_STRING([--with-cxxoptflags=CXXOPTFLAGS], [C++ optimization flags (i.e. --with-cxxoptflags="-march=opteron -O3"]), 2380 [CXXOPTFLAGS=${withval}], 2381 [CXXOPTFLAGS="-g -O2 -fPIC"] 2382 ) 2383 AC_MSG_CHECKING(for C++ optimization flags) 2252 2384 AC_SUBST([CXXOPTFLAGS]) 2253 AC_MSG_RESULT( done)2385 AC_MSG_RESULT([done]) 2254 2386 dnl }}} 2255 2387 dnl multithreading{{{ 2256 AC_ARG_WITH([numthreads], 2257 AS_HELP_STRING([--with-numthreads = NUMTHREADS_VALUE],[numthreads, default is 1. ]), 2258 [NUMTHREADS_VALUE=$withval],[NUMTHREADS_VALUE=1]) 2388 AC_ARG_WITH( 2389 [numthreads], 2390 AS_HELP_STRING([--with-numthreads=NUMTHREADS_VALUE], [number of threads (default: 1)]), 2391 [NUMTHREADS_VALUE=${withval}], 2392 [NUMTHREADS_VALUE=1] 2393 ) 2259 2394 AC_MSG_CHECKING(for number of threads) 2260 dnl defaults 2395 dnl Check that supplied value is an integer 2396 if [[ "${NUMTHREADS_VALUE}" != "${NUMTHREADS_VALUE}" 2> /dev/null ]]; then 2397 AC_MSG_ERROR([Number of threads provided (${NUMTHREADS_VALUE}) is not an integer!]); 2398 elif test "${NUMTHREADS_VALUE}" == "0"; then 2399 AC_MSG_ERROR([Number of threads must be at least 1!]); 2400 fi 2261 2401 MULTITHREADING=no 2262 2402 MULTITHREADINLIB="" 2263 if test "$NUMTHREADS_VALUE" != "1"; then 2264 2403 if test "x${NUMTHREADS_VALUE}" != "x1"; then 2265 2404 MULTITHREADINGLIB="-lpthread -lrt" 2266 2405 case "${host_os}" in 2267 *cygwin*)2268 MULTITHREADINGLIB="-lpthread -lrt"2269 ;;2270 *linux*)2271 MULTITHREADINGLIB="-lpthread -lrt"2272 ;;2273 *darwin*)2274 MULTITHREADINGLIB="-lpthread"2275 ;;2406 *cygwin*) 2407 MULTITHREADINGLIB="-lpthread -lrt" 2408 ;; 2409 *linux*) 2410 MULTITHREADINGLIB="-lpthread -lrt" 2411 ;; 2412 *darwin*) 2413 MULTITHREADINGLIB="-lpthread" 2414 ;; 2276 2415 esac 2277 AC_DEFINE([_MULTITHREADING_],[1],[with numthreads enabled]) 2278 fi 2279 dnl check that it is an integer 2280 if [[ "$NUMTHREADS_VALUE" -eq "$NUMTHREADS_VALUE" 2> /dev/null ]] ; then 2281 dnl cool we have an integer ! 2282 : 2283 else 2284 AC_MSG_ERROR([Number of threads provided ($NUMTHREADS_VALUE) is not an integer]); 2285 fi 2286 AC_DEFINE_UNQUOTED([_NUMTHREADS_],[$NUMTHREADS_VALUE],[number of threads]) 2416 AC_DEFINE([_MULTITHREADING_], [1], [with multithreading enabled]) 2417 fi 2418 AC_DEFINE_UNQUOTED(_NUMTHREADS_, $NUMTHREADS_VALUE, [number of threads]) 2287 2419 AC_SUBST([MULTITHREADINGLIB]) 2288 AC_MSG_RESULT($NUMTHREADS_VALUE) 2289 dnl }}} 2290 dnl 64bit {{{ 2291 AC_ARG_WITH([64bit-indices], 2292 AS_HELP_STRING([--with-64bit-indices = bool], [use 64 bit integers, default 0, ex: --with-64bit-indices=1]), 2293 [USE_64BIT_INDICES=$withval],[USE_64BIT_INDICES=0]) 2294 AC_MSG_CHECKING(for 64 bit indices) 2295 2296 if test "$USE_64BIT_INDICES" == "1"; then 2297 AC_DEFINE([ISSM_USE_64BIT_INDICES],[1],[with 64 bits indices]) 2298 else 2299 AC_DEFINE([ISSM_USE_64BIT_INDICES],[0],[with 64 bits indices]) 2300 fi 2301 AC_MSG_RESULT($USE_64BIT_INDICES) 2302 dnl }}} 2303 2304 dnl Checks 2305 dnl checks{{{ 2306 AC_MSG_CHECKING(consistency between all libraries) 2307 2308 dnl check that if petsc is requested , mpi should be specified 2309 if test "$HAVE_PETSC" = "yes" ; then 2310 if test "$HAVE_MPI" = "NO"; then 2311 AC_MSG_ERROR([petsc requires mpi!]); 2312 fi 2313 fi 2314 2315 dnl check that we have either python or matlab support if we compile the modules 2316 if test "$MODULES_VALUE" = "yes" && test "$HAVE_MATLAB" = "no" && test "$HAVE_PYTHON" = "no"; then 2317 AC_MSG_ERROR([need at least python or matlab support to compile modules (or use --with-modules=no)]); 2318 fi 2319 2320 dnl check that fortran is provided if GiaIvins is on 2321 if test "$HAVE_GIAIVINS" = "yes" && test "$HAVE_FORTRAN" = "no" ; then 2322 AC_MSG_ERROR([need fortran compiler to compile GiaIvins (or use --without-GiaIvins )]); 2323 fi 2324 2325 dnl check that fortran is provided if Love is on 2326 if test "$HAVE_LOVE" = "yes" && test "$HAVE_FORTRAN" = "no" ; then 2327 AC_MSG_ERROR([need fortran compiler to compile Love (or use --without-Love)]); 2328 fi 2329 2330 dnl check that if we have MPI, we have metis 2331 if test "$HAVE_METIS" = "yes" && test "$HAVE_MPI" = "no" ; then 2332 AC_MSG_ERROR([need mpi if using the metis partitioner!]); 2333 fi 2334 2335 dnl check that if we run adolc, we don't compile krigging.exe 2336 if test "$HAVE_ADOLC" = "yes" && test "$HAVE_KRIGING" = "yes" ; then 2337 AC_MSG_ERROR([cannot compile kriging.exe under adolc conditions!]); 2338 fi 2339 dnl check that if we run adolc, we don't use PETSc for now 2340 if test "$HAVE_ADOLC" = "yes" && test "$HAVE_PETSC" = "yes" ; then 2341 AC_MSG_ERROR([cannot compile ISSM with both PETSc and adolc]); 2342 fi 2343 if test "$HAVE_ADOLC" = "yes" && test "$HAVE_CODIPACK" = "yes" ; then 2344 AC_MSG_ERROR([cannot compile ISSM with both ADOLC and CoDiPack]); 2345 fi 2346 if test "$HAVE_ADJOINTMPI" = "yes" && test "$HAVE_MEDIPACK" = "yes" ; then 2347 AC_MSG_ERROR([cannot compile ISSM with both MeDiPack and AdjointMPI]); 2348 fi 2349 dnl check that if we run meteoio, we have snowpack also 2350 if test "$HAVE_METEOIO" = "yes" && test "$HAVE_SNOWPACK" = "no" ; then 2351 AC_MSG_ERROR([cannot compile MeteoIO package without Snowpack!]); 2352 fi 2353 dnl check that if we run snowpack, we have meteoio also 2354 if test "$HAVE_METEOIO" = "no" && test "$HAVE_SNOWPACK" = "yes" ; then 2355 AC_MSG_ERROR([cannot compile Snowpack package without MeteoIO!]); 2356 fi 2357 2358 AC_MSG_RESULT(done) 2359 dnl }}} 2420 AC_MSG_RESULT([${NUMTHREADS_VALUE}]) 2421 dnl }}} 2422 dnl 64-bit indices{{{ 2423 AC_ARG_WITH( 2424 [64bit-indices], 2425 AS_HELP_STRING([--with-64bit-indices=bool], [use 64-bit indices (default: 0)]), 2426 [USE_64BIT_INDICES=${withval}], 2427 [USE_64BIT_INDICES=0] 2428 ) 2429 AC_MSG_CHECKING([for 64-bit indices]) 2430 2431 if test "x${USE_64BIT_INDICES}" == "x1"; then 2432 AC_DEFINE([ISSM_USE_64BIT_INDICES], [1], [with 64-bit indices]) 2433 else 2434 AC_DEFINE([ISSM_USE_64BIT_INDICES], [0], [with 64-bit indices]) 2435 fi 2436 AC_MSG_RESULT([${USE_64BIT_INDICES}]) 2437 dnl }}} 2438 2439 dnl Checks {{{ 2440 AC_MSG_CHECKING(consistency between all libraries) 2441 2442 dnl Check that if PETSc is requested, MPI is specified 2443 if test "x${HAVE_PETSC}" == "xyes"; then 2444 if test "x${HAVE_MPI}" == "xno"; then 2445 AC_MSG_ERROR([PETSc requires MPI!]); 2446 fi 2447 fi 2448 2449 dnl Check that we have MATLAB and/or Python support if we compile the modules 2450 if test "x${MODULES_VALUE}" == "xyes" && test "${HAVE_MATLAB}" == "xno" && test "${HAVE_PYTHON}" == "xno"; then 2451 AC_MSG_ERROR([need at least MATLAB and/or Python support to compile modules! (or use --with-modules=no)]); 2452 fi 2453 2454 dnl Check that Fortran is provided if GiaIvins is on 2455 if test "x${HAVE_GIAIVINS}" == "xyes" && test "${HAVE_FORTRAN}" == "xno"; then 2456 AC_MSG_ERROR([need Fortran compiler to compile GiaIvins! (or use --without-GiaIvins )]); 2457 fi 2458 2459 dnl Check that Fortran is provided if Love is on 2460 if test "x${HAVE_LOVE}" == "xyes" && test "x${HAVE_FORTRAN}" == "xno"; then 2461 AC_MSG_ERROR([need Fortran compiler to compile Love! (or use --without-Love)]); 2462 fi 2463 2464 dnl Check that if we have MPI, we have METIS 2465 if test "x${HAVE_METIS}" == "xyes" && test "x${HAVE_MPI}" == "xno"; then 2466 AC_MSG_ERROR([need MPI if using the METIS partitioner!]); 2467 fi 2468 2469 dnl Check that if we run ADOL-C, we don't compile kriging.exe 2470 if test "x$HAVE_ADOLC" == "xyes" && test "${HAVE_KRIGING}" == "xyes"; then 2471 AC_MSG_ERROR([cannot compile kriging.exe under ADOL-C conditions!]); 2472 fi 2473 2474 dnl Check that if we run ADOL-C, we don't use PETSc for now 2475 if test "x${HAVE_ADOLC}" == "xyes" && test "x${HAVE_PETSC}" == "xyes"; then 2476 AC_MSG_ERROR([cannot compile ISSM with both PETSc and ADOL-C!]); 2477 fi 2478 if test "x${HAVE_ADOLC}" == "xyes" && test "x${HAVE_CODIPACK}" == "xyes"; then 2479 AC_MSG_ERROR([cannot compile ISSM with both ADOL-C and CoDiPack!]); 2480 fi 2481 if test "x${HAVE_ADJOINTMPI}" == "xyes" && test "x${HAVE_MEDIPACK}" == "xyes"; then 2482 AC_MSG_ERROR([cannot compile ISSM with both MeDiPack and AdjointMPI!]); 2483 fi 2484 dnl Check that if we run MeteoIO, we have SNOWPACK also 2485 if test "x${HAVE_METEOIO}" == "xyes" && test "x${HAVE_SNOWPACK}" == "xno"; then 2486 AC_MSG_ERROR([cannot compile MeteoIO package without SNOWPACK!]); 2487 fi 2488 dnl Check that if we run SNOWPACK, we have MeteoIO also 2489 if test "${HAVE_METEOIO}" == "xno" && test "${HAVE_SNOWPACK}" == "xyes"; then 2490 AC_MSG_ERROR([cannot compile SNOWPACK package without MeteoIO!]); 2491 fi 2492 2493 AC_MSG_RESULT([done]) 2494 dnl }}} 2360 2495 ]) -
issm/trunk-jpl/src/c/Makefile.am
r24379 r24593 8 8 #Library declaration {{{ 9 9 if !WINDOWS 10 lib_LTLIBRARIES = libISSMCore.la libISSMOverload.la 10 lib_LTLIBRARIES = libISSMCore.la libISSMOverload.la 11 11 if WRAPPERS 12 12 lib_LTLIBRARIES += libISSMModules.la 13 13 endif 14 14 else 15 noinst_LTLIBRARIES = libISSMCore.la libISSMOverload.la 15 noinst_LTLIBRARIES = libISSMCore.la libISSMOverload.la 16 16 if WRAPPERS 17 17 noinst_LTLIBRARIES += libISSMModules.la … … 22 22 #Core sources 23 23 #BAMG sources {{{ 24 issm_sources = 24 issm_sources = 25 25 if BAMG 26 issm_sources += ./bamg/BamgGeom.cpp\ 27 ./bamg/BamgMesh.cpp\ 28 ./bamg/BamgOpts.cpp\ 29 ./bamg/CrackedEdge.cpp\ 30 ./bamg/Curve.cpp\ 31 ./bamg/Edge.cpp\ 32 ./bamg/GeomEdge.cpp\ 33 ./bamg/GeomSubDomain.cpp\ 34 ./bamg/GeomVertex.cpp\ 35 ./bamg/Geometry.cpp\ 36 ./bamg/ListofIntersectionTriangles.cpp\ 37 ./bamg/EigenMetric.cpp\ 38 ./bamg/Metric.cpp\ 39 ./bamg/BamgQuadtree.cpp\ 40 ./bamg/SetOfE4.cpp\ 41 ./bamg/SubDomain.cpp\ 42 ./bamg/AdjacentTriangle.cpp\ 43 ./bamg/Triangle.cpp\ 44 ./bamg/BamgVertex.cpp\ 45 ./bamg/VertexOnEdge.cpp\ 46 ./bamg/VertexOnGeom.cpp\ 47 ./bamg/VertexOnVertex.cpp\ 48 ./bamg/Mesh.cpp\ 49 ./shared/Bamg/BigPrimeNumber.cpp\ 50 ./modules/Bamgx/Bamgx.cpp\ 51 ./modules/BamgConvertMeshx/BamgConvertMeshx.cpp\ 52 ./modules/BamgTriangulatex/BamgTriangulatex.cpp 26 issm_sources += \ 27 ./bamg/BamgGeom.cpp \ 28 ./bamg/BamgMesh.cpp \ 29 ./bamg/BamgOpts.cpp \ 30 ./bamg/CrackedEdge.cpp \ 31 ./bamg/Curve.cpp \ 32 ./bamg/Edge.cpp \ 33 ./bamg/GeomEdge.cpp \ 34 ./bamg/GeomSubDomain.cpp \ 35 ./bamg/GeomVertex.cpp \ 36 ./bamg/Geometry.cpp \ 37 ./bamg/ListofIntersectionTriangles.cpp \ 38 ./bamg/EigenMetric.cpp \ 39 ./bamg/Metric.cpp \ 40 ./bamg/BamgQuadtree.cpp \ 41 ./bamg/SetOfE4.cpp \ 42 ./bamg/SubDomain.cpp \ 43 ./bamg/AdjacentTriangle.cpp \ 44 ./bamg/Triangle.cpp \ 45 ./bamg/BamgVertex.cpp \ 46 ./bamg/VertexOnEdge.cpp \ 47 ./bamg/VertexOnGeom.cpp \ 48 ./bamg/VertexOnVertex.cpp \ 49 ./bamg/Mesh.cpp \ 50 ./shared/Bamg/BigPrimeNumber.cpp \ 51 ./modules/Bamgx/Bamgx.cpp \ 52 ./modules/BamgConvertMeshx/BamgConvertMeshx.cpp \ 53 ./modules/BamgTriangulatex/BamgTriangulatex.cpp 53 54 54 55 #do not include AmrBamg with AD 55 56 if ADOLC 56 issm_sources +=./shared/Numerics/isnan.cpp \ 57 ./shared/MemOps/MemOps.cpp 57 issm_sources += \ 58 ./shared/Numerics/isnan.cpp \ 59 ./shared/MemOps/MemOps.cpp 58 60 else 59 61 if CODIPACK 60 issm_sources += ./shared/Numerics/isnan.cpp62 issm_sources += ./shared/Numerics/isnan.cpp 61 63 else 62 64 issm_sources += ./classes/AmrBamg.cpp … … 66 68 #}}} 67 69 #Core sources{{{ 68 issm_sources += ./datastructures/DataSet.cpp\ 69 ./classes/gauss/GaussSeg.cpp\ 70 ./classes/gauss/GaussTria.cpp\ 71 ./classes/gauss/GaussTetra.cpp\ 72 ./classes/gauss/GaussPenta.cpp\ 73 ./classes/IoModel.cpp\ 74 ./classes/FemModel.cpp\ 75 ./classes/Loads/Friction.cpp\ 76 ./classes/Constraints/SpcTransient.cpp\ 77 ./classes/DependentObject.cpp\ 78 ./classes/Contours.cpp\ 79 ./classes/Vertices.cpp\ 80 ./classes/Nodes.cpp\ 81 ./classes/Numberedcostfunction.cpp\ 82 ./classes/Misfit.cpp\ 83 ./classes/Cfsurfacesquare.cpp\ 84 ./classes/Cfdragcoeffabsgrad.cpp\ 85 ./classes/Cfsurfacelogvel.cpp\ 86 ./classes/Regionaloutput.cpp\ 87 ./classes/Nodalvalue.cpp\ 88 ./classes/Node.cpp\ 89 ./classes/Vertex.cpp\ 90 ./classes/Hook.cpp\ 91 ./classes/Radar.cpp\ 92 ./classes/ExternalResults/Results.cpp\ 93 ./classes/Elements/Element.cpp\ 94 ./classes/Elements/Elements.cpp\ 95 ./classes/Elements/ElementHook.cpp\ 96 ./classes/Elements/Seg.cpp\ 97 ./classes/Elements/SegRef.cpp\ 98 ./classes/Elements/Tria.cpp\ 99 ./classes/Elements/TriaRef.cpp\ 100 ./classes/Elements/Tetra.cpp\ 101 ./classes/Elements/TetraRef.cpp\ 102 ./classes/Elements/Penta.cpp\ 103 ./classes/Elements/PentaRef.cpp\ 104 ./classes/Materials/Materials.cpp\ 105 ./classes/Materials/Matice.cpp\ 106 ./classes/Materials/Matlitho.cpp\ 107 ./classes/Materials/Matestar.cpp\ 108 ./classes/Constraints/Constraints.cpp\ 109 ./classes/Constraints/SpcStatic.cpp\ 110 ./classes/Constraints/SpcDynamic.cpp\ 111 ./classes/Loads/Channel.cpp\ 112 ./classes/Loads/Loads.cpp\ 113 ./classes/Loads/Penpair.cpp\ 114 ./classes/Loads/Pengrid.cpp\ 115 ./classes/Loads/Moulin.cpp\ 116 ./classes/Loads/Numericalflux.cpp\ 117 ./classes/Loads/Neumannflux.cpp\ 118 ./classes/matrix/ElementMatrix.cpp\ 119 ./classes/matrix/ElementVector.cpp\ 120 ./classes/Params/Parameters.cpp\ 121 ./classes/Params/BoolParam.cpp\ 122 ./classes/Params/IntParam.cpp\ 123 ./classes/Params/IntVecParam.cpp\ 124 ./classes/Params/IntMatParam.cpp\ 125 ./classes/Params/DoubleParam.cpp\ 126 ./classes/Params/FileParam.cpp\ 127 ./classes/Params/StringArrayParam.cpp\ 128 ./classes/Params/DoubleMatParam.cpp\ 129 ./classes/Params/DoubleTransientMatParam.cpp\ 130 ./classes/Params/DoubleMatArrayParam.cpp\ 131 ./classes/Params/DoubleVecParam.cpp\ 132 ./classes/Params/StringParam.cpp\ 133 ./classes/Params/MatrixParam.cpp\ 134 ./classes/Params/VectorParam.cpp\ 135 ./classes/Params/TransientParam.cpp\ 136 ./classes/Params/TransientArrayParam.cpp\ 137 ./classes/Params/DataSetParam.cpp\ 138 ./classes/Profiler.cpp\ 139 ./shared/Matrix/MatrixUtils.cpp\ 140 ./shared/io/Disk/pfopen.cpp\ 141 ./shared/io/Disk/pfclose.cpp\ 142 ./shared/io/Disk/WriteLockFile.cpp\ 143 ./shared/io/Print/PrintfFunction.cpp\ 144 ./shared/io/Comm/IssmComm.cpp\ 145 ./shared/io/Marshalling/IoCodeConversions.cpp \ 146 ./shared/LatLong/Ll2xyx.cpp\ 147 ./shared/LatLong/Xy2llx.cpp\ 148 ./shared/FSanalyticals/fsanalyticals.cpp\ 149 ./shared/Enum/EnumToStringx.cpp\ 150 ./shared/Enum/StringToEnumx.cpp\ 151 ./shared/Numerics/Verbosity.cpp\ 152 ./shared/Numerics/GaussPoints.cpp\ 153 ./shared/Numerics/cross.cpp\ 154 ./shared/Numerics/cubic.cpp\ 155 ./shared/Numerics/NewtonSolveDnorm.cpp\ 156 ./shared/Numerics/ODE1.cpp\ 157 ./shared/Numerics/extrema.cpp\ 158 ./shared/Numerics/legendre.cpp\ 159 ./shared/Numerics/XZvectorsToCoordinateSystem.cpp\ 160 ./shared/Exceptions/Exceptions.cpp\ 161 ./shared/Sorting/binary_search.cpp\ 162 ./shared/Elements/Cuffey.cpp\ 163 ./shared/Elements/BuddJacka.cpp\ 164 ./shared/Elements/CuffeyTemperate.cpp\ 165 ./shared/Elements/StressIntensityIntegralWeight.cpp\ 166 ./shared/Elements/Paterson.cpp\ 167 ./shared/Elements/Arrhenius.cpp\ 168 ./shared/Elements/NyeCO2.cpp\ 169 ./shared/Elements/NyeH2O.cpp\ 170 ./shared/Elements/LliboutryDuval.cpp \ 171 ./shared/Elements/PrintArrays.cpp\ 172 ./shared/Elements/PddSurfaceMassBalance.cpp\ 173 ./shared/Elements/PddSurfaceMassBalanceSicopolis.cpp\ 174 ./shared/Elements/ComputeDelta18oTemperaturePrecipitation.cpp\ 175 ./shared/Elements/ComputeMungsmTemperaturePrecipitation.cpp\ 176 ./shared/Elements/ComputeD18OTemperaturePrecipitationFromPD.cpp\ 177 ./shared/Elements/DrainageFunctionWaterfraction.cpp\ 178 ./shared/Elements/EstarComponents.cpp\ 179 ./shared/String/DescriptorIndex.cpp\ 180 ./toolkits/issm/IssmToolkitUtils.cpp\ 181 ./toolkits/issm/IssmSolver.cpp\ 182 ./toolkits/mpi/issmmpi.cpp\ 183 ./toolkits/mpi/commops/DetermineLocalSize.cpp\ 184 ./toolkits/mpi/commops/DetermineGlobalSize.cpp\ 185 ./toolkits/mpi/commops/DetermineRowRankFromLocalSize.cpp\ 186 ./toolkits/mpi/commops/GetOwnershipBoundariesFromRange.cpp\ 187 ./toolkits/ToolkitOptions.cpp\ 188 ./modules/ModelProcessorx/ModelProcessorx.cpp\ 189 ./modules/ModelProcessorx/ElementsAndVerticesPartitioning.cpp\ 190 ./modules/ModelProcessorx/NodesPartitioning.cpp\ 191 ./modules/ModelProcessorx/EdgesPartitioning.cpp\ 192 ./modules/ModelProcessorx/FacesPartitioning.cpp\ 193 ./modules/ModelProcessorx/CreateParameters.cpp\ 194 ./modules/ModelProcessorx/Autodiff/CreateParametersAutodiff.cpp\ 195 ./modules/ModelProcessorx/CreateFaces.cpp\ 196 ./modules/ModelProcessorx/CreateEdges.cpp\ 197 ./modules/ModelProcessorx/CreateSingleNodeToElementConnectivity.cpp\ 198 ./modules/ModelProcessorx/CreateNumberNodeToElementConnectivity.cpp\ 199 ./modules/ModelProcessorx/CreateElementsVerticesAndMaterials.cpp\ 200 ./modules/ModelProcessorx/CreateNodes.cpp\ 201 ./modules/ParseToolkitsOptionsx/ParseToolkitsOptionsx.cpp\ 202 ./modules/NodesDofx/NodesDofx.cpp\ 203 ./modules/NodalValuex/NodalValuex.cpp\ 204 ./modules/VertexCoordinatesx/VertexCoordinatesx.cpp\ 205 ./modules/OutputResultsx/OutputResultsx.cpp\ 206 ./modules/InputDepthAverageAtBasex/InputDepthAverageAtBasex.cpp\ 207 ./modules/InputDuplicatex/InputDuplicatex.cpp\ 208 ./modules/InputExtrudex/InputExtrudex.cpp\ 209 ./modules/SurfaceAreax/SurfaceAreax.cpp\ 210 ./modules/AllocateSystemMatricesx/AllocateSystemMatricesx.cpp\ 211 ./modules/CreateJacobianMatrixx/CreateJacobianMatrixx.cpp\ 212 ./modules/SystemMatricesx/SystemMatricesx.cpp\ 213 ./modules/CreateNodalConstraintsx/CreateNodalConstraintsx.cpp\ 214 ./modules/UpdateDynamicConstraintsx/UpdateDynamicConstraintsx.cpp\ 215 ./modules/IoModelToConstraintsx/IoModelToConstraintsx.cpp\ 216 ./modules/SetActiveNodesLSMx/SetActiveNodesLSMx.cpp\ 217 ./modules/InputUpdateFromConstantx/InputUpdateFromConstantx.cpp\ 218 ./modules/InputUpdateFromSolutionx/InputUpdateFromSolutionx.cpp\ 219 ./modules/GeothermalFluxx/GeothermalFluxx.cpp\ 220 ./modules/GetSolutionFromInputsx/GetSolutionFromInputsx.cpp\ 221 ./modules/GetVectorFromInputsx/GetVectorFromInputsx.cpp\ 222 ./modules/InputUpdateFromVectorx/InputUpdateFromVectorx.cpp\ 223 ./modules/FloatingiceMeltingRatex/FloatingiceMeltingRatex.cpp\ 224 ./modules/FloatingiceMeltingRatePicox/FloatingiceMeltingRatePicox.cpp\ 225 ./modules/FrontalForcingsx/FrontalForcingsx.cpp\ 226 ./modules/ConfigureObjectsx/ConfigureObjectsx.cpp\ 227 ./modules/SpcNodesx/SpcNodesx.cpp\ 228 ./modules/SurfaceMassBalancex/SurfaceMassBalancex.cpp\ 229 ./modules/SurfaceMassBalancex/Gembx.cpp\ 230 ./modules/Reducevectorgtofx/Reducevectorgtofx.cpp\ 231 ./modules/Reduceloadx/Reduceloadx.cpp\ 232 ./modules/ConstraintsStatex/ConstraintsStatex.cpp\ 233 ./modules/ResetConstraintsx/ResetConstraintsx.cpp\ 234 ./modules/ResetFSBasalBoundaryConditionx/ResetFSBasalBoundaryConditionx.cpp\ 235 ./modules/Solverx/Solverx.cpp\ 236 ./modules/Mergesolutionfromftogx/Mergesolutionfromftogx.cpp\ 237 ./cores/ProcessArguments.cpp\ 238 ./cores/ResetBoundaryConditions.cpp\ 239 ./cores/WrapperCorePointerFromSolutionEnum.cpp\ 240 ./cores/CorePointerFromSolutionEnum.cpp\ 241 ./cores/ad_core.cpp\ 242 ./cores/adgradient_core.cpp\ 243 ./main/EnvironmentInit.cpp\ 244 ./main/EnvironmentFinalize.cpp\ 245 ./analyses/EnumToAnalysis.cpp\ 246 ./solutionsequences/solutionsequence_la.cpp\ 247 ./solutionsequences/solutionsequence_la_theta.cpp\ 248 ./solutionsequences/solutionsequence_linear.cpp\ 249 ./solutionsequences/solutionsequence_nonlinear.cpp\ 250 ./solutionsequences/solutionsequence_newton.cpp\ 251 ./solutionsequences/solutionsequence_fct.cpp\ 252 ./solutionsequences/solutionsequence_schurcg.cpp\ 253 ./solutionsequences/convergence.cpp\ 254 ./classes/Options/Options.cpp\ 255 ./classes/Options/OptionUtilities.cpp\ 256 ./classes/RiftStruct.cpp\ 257 ./modules/ModelProcessorx/Transient/UpdateElementsTransient.cpp \ 258 ./cores/transient_core.cpp\ 259 ./cores/steadystate_core.cpp\ 260 ./cores/masstransport_core.cpp\ 261 ./cores/depthaverage_core.cpp\ 262 ./cores/extrudefrombase_core.cpp\ 263 ./cores/extrudefromtop_core.cpp\ 264 ./cores/thermal_core.cpp\ 265 ./cores/smb_core.cpp\ 266 ./cores/bmb_core.cpp\ 267 ./solutionsequences/solutionsequence_thermal_nonlinear.cpp\ 268 ./modules/ControlInputSetGradientx/ControlInputSetGradientx.cpp\ 269 ./modules/GetVectorFromControlInputsx/GetVectorFromControlInputsx.cpp\ 270 ./modules/SetControlInputsFromVectorx/SetControlInputsFromVectorx.cpp\ 271 ./modules/ModelProcessorx/Control/CreateParametersControl.cpp\ 272 ./modules/ModelProcessorx/Control/UpdateElementsAndMaterialsControl.cpp\ 273 ./modules/SurfaceAbsVelMisfitx/SurfaceAbsVelMisfitx.cpp\ 274 ./modules/SurfaceRelVelMisfitx/SurfaceRelVelMisfitx.cpp\ 275 ./modules/SurfaceLogVelMisfitx/SurfaceLogVelMisfitx.cpp\ 276 ./modules/SurfaceLogVxVyMisfitx/SurfaceLogVxVyMisfitx.cpp\ 277 ./modules/SurfaceAverageVelMisfitx/SurfaceAverageVelMisfitx.cpp\ 278 ./modules/ThicknessAbsMisfitx/ThicknessAbsMisfitx.cpp\ 279 ./modules/Gradjx/Gradjx.cpp\ 280 ./modules/DragCoefficientAbsGradientx/DragCoefficientAbsGradientx.cpp\ 281 ./modules/ThicknessAlongGradientx/ThicknessAlongGradientx.cpp\ 282 ./modules/ThicknessAcrossGradientx/ThicknessAcrossGradientx.cpp\ 283 ./modules/RheologyBbarAbsGradientx/RheologyBbarAbsGradientx.cpp\ 284 ./modules/RheologyBAbsGradientx/RheologyBAbsGradientx.cpp\ 285 ./shared/Numerics/BrentSearch.cpp\ 286 ./cores/control_core.cpp\ 287 ./cores/controltao_core.cpp\ 288 ./cores/controlm1qn3_core.cpp\ 289 ./cores/controladm1qn3_core.cpp\ 290 ./cores/controlvalidation_core.cpp\ 291 ./cores/adjointstressbalance_core.cpp\ 292 ./cores/adjointbalancethickness_core.cpp\ 293 ./cores/adjointbalancethickness2_core.cpp\ 294 ./cores/AdjointCorePointerFromSolutionEnum.cpp\ 295 ./solutionsequences/solutionsequence_adjoint_linear.cpp\ 296 ./cores/hydrology_core.cpp\ 297 ./solutionsequences/solutionsequence_hydro_nonlinear.cpp\ 298 ./solutionsequences/solutionsequence_shakti_nonlinear.cpp\ 299 ./solutionsequences/solutionsequence_glads_nonlinear.cpp\ 300 ./cores/stressbalance_core.cpp\ 301 ./solutionsequences/solutionsequence_stokescoupling_nonlinear.cpp\ 302 ./cores/balancethickness_core.cpp \ 303 ./cores/balancethickness2_core.cpp \ 304 ./cores/balancevelocity_core.cpp \ 305 ./cores/dummy_core.cpp\ 306 ./cores/surfaceslope_core.cpp\ 307 ./cores/bedslope_core.cpp\ 308 ./cores/damage_core.cpp\ 309 ./cores/levelsetfunctionslope_core.cpp\ 310 ./cores/movingfront_core.cpp\ 311 ./modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp\ 312 ./classes/Loads/Riftfront.cpp\ 313 ./modules/ConstraintsStatex/RiftConstraintsState.cpp\ 314 ./modules/ModelProcessorx/CreateOutputDefinitions.cpp\ 315 ./modules/OutputDefinitionsResponsex/OutputDefinitionsResponsex.cpp\ 316 ./modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.cpp\ 317 ./classes/Inputs2/Inputs2.cpp\ 318 ./classes/Inputs2/BoolInput2.cpp\ 319 ./classes/Inputs2/IntInput2.cpp\ 320 ./classes/Inputs2/ElementInput2.cpp\ 321 ./classes/Inputs2/SegInput2.cpp\ 322 ./classes/Inputs2/TriaInput2.cpp\ 323 ./classes/Inputs2/PentaInput2.cpp\ 324 ./classes/Inputs2/DatasetInput2.cpp\ 325 ./classes/Inputs2/ControlInput2.cpp\ 326 ./classes/Inputs2/TransientInput2.cpp\ 327 ./classes/Inputs2/ArrayInput2.cpp 70 issm_sources += \ 71 ./datastructures/DataSet.cpp \ 72 ./classes/gauss/GaussSeg.cpp \ 73 ./classes/gauss/GaussTria.cpp \ 74 ./classes/gauss/GaussTetra.cpp \ 75 ./classes/gauss/GaussPenta.cpp \ 76 ./classes/IoModel.cpp \ 77 ./classes/FemModel.cpp \ 78 ./classes/Loads/Friction.cpp \ 79 ./classes/Constraints/SpcTransient.cpp \ 80 ./classes/DependentObject.cpp \ 81 ./classes/Contours.cpp \ 82 ./classes/Vertices.cpp \ 83 ./classes/Nodes.cpp \ 84 ./classes/Numberedcostfunction.cpp \ 85 ./classes/Misfit.cpp \ 86 ./classes/Cfsurfacesquare.cpp \ 87 ./classes/Cfdragcoeffabsgrad.cpp \ 88 ./classes/Cfsurfacelogvel.cpp \ 89 ./classes/Regionaloutput.cpp \ 90 ./classes/Nodalvalue.cpp \ 91 ./classes/Node.cpp \ 92 ./classes/Vertex.cpp \ 93 ./classes/Hook.cpp \ 94 ./classes/Radar.cpp \ 95 ./classes/ExternalResults/Results.cpp \ 96 ./classes/Elements/Element.cpp \ 97 ./classes/Elements/Elements.cpp \ 98 ./classes/Elements/ElementHook.cpp \ 99 ./classes/Elements/Seg.cpp \ 100 ./classes/Elements/SegRef.cpp \ 101 ./classes/Elements/Tria.cpp \ 102 ./classes/Elements/TriaRef.cpp \ 103 ./classes/Elements/Tetra.cpp \ 104 ./classes/Elements/TetraRef.cpp \ 105 ./classes/Elements/Penta.cpp \ 106 ./classes/Elements/PentaRef.cpp \ 107 ./classes/Materials/Materials.cpp \ 108 ./classes/Materials/Matice.cpp \ 109 ./classes/Materials/Matlitho.cpp \ 110 ./classes/Materials/Matestar.cpp \ 111 ./classes/Constraints/Constraints.cpp \ 112 ./classes/Constraints/SpcStatic.cpp \ 113 ./classes/Constraints/SpcDynamic.cpp \ 114 ./classes/Loads/Channel.cpp \ 115 ./classes/Loads/Loads.cpp \ 116 ./classes/Loads/Penpair.cpp \ 117 ./classes/Loads/Pengrid.cpp \ 118 ./classes/Loads/Moulin.cpp \ 119 ./classes/Loads/Numericalflux.cpp \ 120 ./classes/Loads/Neumannflux.cpp \ 121 ./classes/matrix/ElementMatrix.cpp \ 122 ./classes/matrix/ElementVector.cpp \ 123 ./classes/Params/Parameters.cpp \ 124 ./classes/Params/BoolParam.cpp \ 125 ./classes/Params/IntParam.cpp \ 126 ./classes/Params/IntVecParam.cpp \ 127 ./classes/Params/IntMatParam.cpp \ 128 ./classes/Params/DoubleParam.cpp \ 129 ./classes/Params/FileParam.cpp \ 130 ./classes/Params/StringArrayParam.cpp \ 131 ./classes/Params/DoubleMatParam.cpp \ 132 ./classes/Params/DoubleTransientMatParam.cpp \ 133 ./classes/Params/DoubleMatArrayParam.cpp \ 134 ./classes/Params/DoubleVecParam.cpp \ 135 ./classes/Params/StringParam.cpp \ 136 ./classes/Params/MatrixParam.cpp \ 137 ./classes/Params/VectorParam.cpp \ 138 ./classes/Params/TransientParam.cpp \ 139 ./classes/Params/TransientArrayParam.cpp \ 140 ./classes/Params/DataSetParam.cpp \ 141 ./classes/Profiler.cpp \ 142 ./shared/Matrix/MatrixUtils.cpp \ 143 ./shared/io/Disk/pfopen.cpp \ 144 ./shared/io/Disk/pfclose.cpp \ 145 ./shared/io/Disk/WriteLockFile.cpp \ 146 ./shared/io/Print/PrintfFunction.cpp \ 147 ./shared/io/Comm/IssmComm.cpp \ 148 ./shared/io/Marshalling/IoCodeConversions.cpp \ 149 ./shared/LatLong/Ll2xyx.cpp \ 150 ./shared/LatLong/Xy2llx.cpp \ 151 ./shared/FSanalyticals/fsanalyticals.cpp \ 152 ./shared/Enum/EnumToStringx.cpp \ 153 ./shared/Enum/StringToEnumx.cpp \ 154 ./shared/Numerics/Verbosity.cpp \ 155 ./shared/Numerics/GaussPoints.cpp \ 156 ./shared/Numerics/cross.cpp \ 157 ./shared/Numerics/cubic.cpp \ 158 ./shared/Numerics/NewtonSolveDnorm.cpp \ 159 ./shared/Numerics/ODE1.cpp \ 160 ./shared/Numerics/extrema.cpp \ 161 ./shared/Numerics/legendre.cpp \ 162 ./shared/Numerics/XZvectorsToCoordinateSystem.cpp \ 163 ./shared/Exceptions/Exceptions.cpp \ 164 ./shared/Sorting/binary_search.cpp \ 165 ./shared/Elements/Cuffey.cpp \ 166 ./shared/Elements/BuddJacka.cpp \ 167 ./shared/Elements/CuffeyTemperate.cpp \ 168 ./shared/Elements/StressIntensityIntegralWeight.cpp \ 169 ./shared/Elements/Paterson.cpp \ 170 ./shared/Elements/Arrhenius.cpp \ 171 ./shared/Elements/NyeCO2.cpp \ 172 ./shared/Elements/NyeH2O.cpp \ 173 ./shared/Elements/LliboutryDuval.cpp \ 174 ./shared/Elements/PrintArrays.cpp \ 175 ./shared/Elements/PddSurfaceMassBalance.cpp \ 176 ./shared/Elements/PddSurfaceMassBalanceSicopolis.cpp \ 177 ./shared/Elements/ComputeDelta18oTemperaturePrecipitation.cpp \ 178 ./shared/Elements/ComputeMungsmTemperaturePrecipitation.cpp \ 179 ./shared/Elements/ComputeD18OTemperaturePrecipitationFromPD.cpp \ 180 ./shared/Elements/DrainageFunctionWaterfraction.cpp \ 181 ./shared/Elements/EstarComponents.cpp \ 182 ./shared/String/DescriptorIndex.cpp \ 183 ./toolkits/issm/IssmToolkitUtils.cpp \ 184 ./toolkits/issm/IssmSolver.cpp \ 185 ./toolkits/mpi/issmmpi.cpp \ 186 ./toolkits/mpi/commops/DetermineLocalSize.cpp \ 187 ./toolkits/mpi/commops/DetermineGlobalSize.cpp \ 188 ./toolkits/mpi/commops/DetermineRowRankFromLocalSize.cpp \ 189 ./toolkits/mpi/commops/GetOwnershipBoundariesFromRange.cpp \ 190 ./toolkits/ToolkitOptions.cpp \ 191 ./modules/ModelProcessorx/ModelProcessorx.cpp \ 192 ./modules/ModelProcessorx/ElementsAndVerticesPartitioning.cpp \ 193 ./modules/ModelProcessorx/NodesPartitioning.cpp \ 194 ./modules/ModelProcessorx/EdgesPartitioning.cpp \ 195 ./modules/ModelProcessorx/FacesPartitioning.cpp \ 196 ./modules/ModelProcessorx/CreateParameters.cpp \ 197 ./modules/ModelProcessorx/Autodiff/CreateParametersAutodiff.cpp \ 198 ./modules/ModelProcessorx/CreateFaces.cpp \ 199 ./modules/ModelProcessorx/CreateEdges.cpp \ 200 ./modules/ModelProcessorx/CreateSingleNodeToElementConnectivity.cpp \ 201 ./modules/ModelProcessorx/CreateNumberNodeToElementConnectivity.cpp \ 202 ./modules/ModelProcessorx/CreateElementsVerticesAndMaterials.cpp \ 203 ./modules/ModelProcessorx/CreateNodes.cpp \ 204 ./modules/ParseToolkitsOptionsx/ParseToolkitsOptionsx.cpp \ 205 ./modules/NodesDofx/NodesDofx.cpp \ 206 ./modules/NodalValuex/NodalValuex.cpp \ 207 ./modules/VertexCoordinatesx/VertexCoordinatesx.cpp \ 208 ./modules/OutputResultsx/OutputResultsx.cpp \ 209 ./modules/InputDepthAverageAtBasex/InputDepthAverageAtBasex.cpp \ 210 ./modules/InputDuplicatex/InputDuplicatex.cpp \ 211 ./modules/InputExtrudex/InputExtrudex.cpp \ 212 ./modules/SurfaceAreax/SurfaceAreax.cpp \ 213 ./modules/AllocateSystemMatricesx/AllocateSystemMatricesx.cpp \ 214 ./modules/CreateJacobianMatrixx/CreateJacobianMatrixx.cpp \ 215 ./modules/SystemMatricesx/SystemMatricesx.cpp \ 216 ./modules/CreateNodalConstraintsx/CreateNodalConstraintsx.cpp \ 217 ./modules/UpdateDynamicConstraintsx/UpdateDynamicConstraintsx.cpp \ 218 ./modules/IoModelToConstraintsx/IoModelToConstraintsx.cpp \ 219 ./modules/SetActiveNodesLSMx/SetActiveNodesLSMx.cpp \ 220 ./modules/InputUpdateFromConstantx/InputUpdateFromConstantx.cpp \ 221 ./modules/InputUpdateFromSolutionx/InputUpdateFromSolutionx.cpp \ 222 ./modules/GeothermalFluxx/GeothermalFluxx.cpp \ 223 ./modules/GetSolutionFromInputsx/GetSolutionFromInputsx.cpp \ 224 ./modules/GetVectorFromInputsx/GetVectorFromInputsx.cpp \ 225 ./modules/InputUpdateFromVectorx/InputUpdateFromVectorx.cpp \ 226 ./modules/FloatingiceMeltingRatex/FloatingiceMeltingRatex.cpp \ 227 ./modules/FloatingiceMeltingRatePicox/FloatingiceMeltingRatePicox.cpp \ 228 ./modules/FrontalForcingsx/FrontalForcingsx.cpp \ 229 ./modules/ConfigureObjectsx/ConfigureObjectsx.cpp \ 230 ./modules/SpcNodesx/SpcNodesx.cpp \ 231 ./modules/SurfaceMassBalancex/SurfaceMassBalancex.cpp \ 232 ./modules/SurfaceMassBalancex/Gembx.cpp \ 233 ./modules/Reducevectorgtofx/Reducevectorgtofx.cpp \ 234 ./modules/Reduceloadx/Reduceloadx.cpp \ 235 ./modules/ConstraintsStatex/ConstraintsStatex.cpp \ 236 ./modules/ResetConstraintsx/ResetConstraintsx.cpp \ 237 ./modules/ResetFSBasalBoundaryConditionx/ResetFSBasalBoundaryConditionx.cpp \ 238 ./modules/Solverx/Solverx.cpp \ 239 ./modules/Mergesolutionfromftogx/Mergesolutionfromftogx.cpp \ 240 ./cores/ProcessArguments.cpp \ 241 ./cores/ResetBoundaryConditions.cpp \ 242 ./cores/WrapperCorePointerFromSolutionEnum.cpp \ 243 ./cores/CorePointerFromSolutionEnum.cpp \ 244 ./cores/ad_core.cpp \ 245 ./cores/adgradient_core.cpp \ 246 ./main/EnvironmentInit.cpp \ 247 ./main/EnvironmentFinalize.cpp \ 248 ./analyses/EnumToAnalysis.cpp \ 249 ./solutionsequences/solutionsequence_la.cpp \ 250 ./solutionsequences/solutionsequence_la_theta.cpp \ 251 ./solutionsequences/solutionsequence_linear.cpp \ 252 ./solutionsequences/solutionsequence_nonlinear.cpp \ 253 ./solutionsequences/solutionsequence_newton.cpp \ 254 ./solutionsequences/solutionsequence_fct.cpp \ 255 ./solutionsequences/solutionsequence_schurcg.cpp \ 256 ./solutionsequences/convergence.cpp \ 257 ./classes/Options/Options.cpp \ 258 ./classes/Options/OptionUtilities.cpp \ 259 ./classes/RiftStruct.cpp \ 260 ./modules/ModelProcessorx/Transient/UpdateElementsTransient.cpp \ 261 ./cores/transient_core.cpp \ 262 ./cores/steadystate_core.cpp \ 263 ./cores/masstransport_core.cpp \ 264 ./cores/depthaverage_core.cpp \ 265 ./cores/extrudefrombase_core.cpp \ 266 ./cores/extrudefromtop_core.cpp \ 267 ./cores/thermal_core.cpp \ 268 ./cores/smb_core.cpp \ 269 ./cores/bmb_core.cpp \ 270 ./solutionsequences/solutionsequence_thermal_nonlinear.cpp \ 271 ./modules/ControlInputSetGradientx/ControlInputSetGradientx.cpp \ 272 ./modules/GetVectorFromControlInputsx/GetVectorFromControlInputsx.cpp \ 273 ./modules/SetControlInputsFromVectorx/SetControlInputsFromVectorx.cpp \ 274 ./modules/ModelProcessorx/Control/CreateParametersControl.cpp \ 275 ./modules/ModelProcessorx/Control/UpdateElementsAndMaterialsControl.cpp \ 276 ./modules/SurfaceAbsVelMisfitx/SurfaceAbsVelMisfitx.cpp \ 277 ./modules/SurfaceRelVelMisfitx/SurfaceRelVelMisfitx.cpp \ 278 ./modules/SurfaceLogVelMisfitx/SurfaceLogVelMisfitx.cpp \ 279 ./modules/SurfaceLogVxVyMisfitx/SurfaceLogVxVyMisfitx.cpp \ 280 ./modules/SurfaceAverageVelMisfitx/SurfaceAverageVelMisfitx.cpp \ 281 ./modules/ThicknessAbsMisfitx/ThicknessAbsMisfitx.cpp \ 282 ./modules/Gradjx/Gradjx.cpp \ 283 ./modules/DragCoefficientAbsGradientx/DragCoefficientAbsGradientx.cpp \ 284 ./modules/ThicknessAlongGradientx/ThicknessAlongGradientx.cpp \ 285 ./modules/ThicknessAcrossGradientx/ThicknessAcrossGradientx.cpp \ 286 ./modules/RheologyBbarAbsGradientx/RheologyBbarAbsGradientx.cpp \ 287 ./modules/RheologyBAbsGradientx/RheologyBAbsGradientx.cpp \ 288 ./shared/Numerics/BrentSearch.cpp \ 289 ./cores/control_core.cpp \ 290 ./cores/controltao_core.cpp \ 291 ./cores/controlm1qn3_core.cpp \ 292 ./cores/controladm1qn3_core.cpp \ 293 ./cores/controlvalidation_core.cpp \ 294 ./cores/adjointstressbalance_core.cpp \ 295 ./cores/adjointbalancethickness_core.cpp \ 296 ./cores/adjointbalancethickness2_core.cpp \ 297 ./cores/AdjointCorePointerFromSolutionEnum.cpp \ 298 ./solutionsequences/solutionsequence_adjoint_linear.cpp \ 299 ./cores/hydrology_core.cpp \ 300 ./solutionsequences/solutionsequence_hydro_nonlinear.cpp \ 301 ./solutionsequences/solutionsequence_shakti_nonlinear.cpp \ 302 ./solutionsequences/solutionsequence_glads_nonlinear.cpp \ 303 ./cores/stressbalance_core.cpp \ 304 ./solutionsequences/solutionsequence_stokescoupling_nonlinear.cpp \ 305 ./cores/balancethickness_core.cpp \ 306 ./cores/balancethickness2_core.cpp \ 307 ./cores/balancevelocity_core.cpp \ 308 ./cores/dummy_core.cpp \ 309 ./cores/surfaceslope_core.cpp \ 310 ./cores/bedslope_core.cpp \ 311 ./cores/damage_core.cpp \ 312 ./cores/levelsetfunctionslope_core.cpp \ 313 ./cores/movingfront_core.cpp \ 314 ./modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp \ 315 ./classes/Loads/Riftfront.cpp \ 316 ./modules/ConstraintsStatex/RiftConstraintsState.cpp \ 317 ./modules/ModelProcessorx/CreateOutputDefinitions.cpp \ 318 ./modules/OutputDefinitionsResponsex/OutputDefinitionsResponsex.cpp \ 319 ./modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.cpp \ 320 ./classes/Inputs2/Inputs2.cpp \ 321 ./classes/Inputs2/BoolInput2.cpp \ 322 ./classes/Inputs2/IntInput2.cpp \ 323 ./classes/Inputs2/ElementInput2.cpp \ 324 ./classes/Inputs2/SegInput2.cpp \ 325 ./classes/Inputs2/TriaInput2.cpp \ 326 ./classes/Inputs2/PentaInput2.cpp \ 327 ./classes/Inputs2/DatasetInput2.cpp \ 328 ./classes/Inputs2/ControlInput2.cpp \ 329 ./classes/Inputs2/TransientInput2.cpp \ 330 ./classes/Inputs2/ArrayInput2.cpp 328 331 #}}} 329 332 #ADJOINTMPI/MeDiPack sources {{{ … … 337 340 #DAKOTA sources {{{ 338 341 if DAKOTA 339 issm_sources += ./classes/Dakota/IssmDirectApplicInterface.h\ 340 ./classes/Dakota/IssmParallelDirectApplicInterface.cpp\ 341 ./modules/InputUpdateFromDakotax/InputUpdateFromDakotax.cpp\ 342 ./modules/InputUpdateFromVectorDakotax/InputUpdateFromVectorDakotax.cpp\ 343 ./modules/InputUpdateFromMatrixDakotax/InputUpdateFromMatrixDakotax.cpp\ 344 ./modules/AverageOntoPartitionx/AverageOntoPartitionx.cpp\ 345 ./modules/ModelProcessorx/Dakota/CreateParametersDakota.cpp\ 346 ./modules/ModelProcessorx/Dakota/UpdateElementsAndMaterialsDakota.cpp\ 347 ./cores/dakota_core.cpp 342 issm_sources += \ 343 ./classes/Dakota/IssmDirectApplicInterface.h \ 344 ./classes/Dakota/IssmParallelDirectApplicInterface.cpp \ 345 ./modules/InputUpdateFromDakotax/InputUpdateFromDakotax.cpp \ 346 ./modules/InputUpdateFromVectorDakotax/InputUpdateFromVectorDakotax.cpp \ 347 ./modules/InputUpdateFromMatrixDakotax/InputUpdateFromMatrixDakotax.cpp \ 348 ./modules/AverageOntoPartitionx/AverageOntoPartitionx.cpp \ 349 ./modules/ModelProcessorx/Dakota/CreateParametersDakota.cpp \ 350 ./modules/ModelProcessorx/Dakota/UpdateElementsAndMaterialsDakota.cpp \ 351 ./cores/dakota_core.cpp 348 352 endif 349 353 #}}} 350 354 #Petsc sources {{{ 351 355 if PETSC 352 issm_sources += ./toolkits/petsc\ 353 ./toolkits/petsc/patches\ 354 ./toolkits/petsc/patches/VecToMPISerial.cpp\ 355 ./toolkits/petsc/patches/MatToSerial.cpp\ 356 ./toolkits/petsc/patches/NewVec.cpp\ 357 ./toolkits/petsc/patches/PetscOptionsDetermineSolverType.cpp\ 358 ./toolkits/petsc/patches/NewMat.cpp\ 359 ./toolkits/petsc/patches/VecFree.cpp\ 360 ./toolkits/petsc/patches/KSPFree.cpp\ 361 ./toolkits/petsc/patches/MatFree.cpp\ 362 ./toolkits/petsc/patches/MatMultPatch.cpp\ 363 ./toolkits/petsc/patches/ISSMToPetscMatrixType.cpp\ 364 ./toolkits/petsc/patches/ISSMToPetscInsertMode.cpp\ 365 ./toolkits/petsc/patches/ISSMToPetscNormMode.cpp\ 366 ./toolkits/petsc/objects/PetscMat.cpp\ 367 ./toolkits/petsc/objects/PetscVec.cpp\ 368 ./toolkits/petsc/objects/PetscSolver.cpp 356 issm_sources += \ 357 ./toolkits/petsc \ 358 ./toolkits/petsc/patches \ 359 ./toolkits/petsc/patches/VecToMPISerial.cpp \ 360 ./toolkits/petsc/patches/MatToSerial.cpp \ 361 ./toolkits/petsc/patches/NewVec.cpp \ 362 ./toolkits/petsc/patches/PetscOptionsDetermineSolverType.cpp \ 363 ./toolkits/petsc/patches/NewMat.cpp \ 364 ./toolkits/petsc/patches/VecFree.cpp \ 365 ./toolkits/petsc/patches/KSPFree.cpp \ 366 ./toolkits/petsc/patches/MatFree.cpp \ 367 ./toolkits/petsc/patches/MatMultPatch.cpp \ 368 ./toolkits/petsc/patches/ISSMToPetscMatrixType.cpp \ 369 ./toolkits/petsc/patches/ISSMToPetscInsertMode.cpp \ 370 ./toolkits/petsc/patches/ISSMToPetscNormMode.cpp \ 371 ./toolkits/petsc/objects/PetscMat.cpp \ 372 ./toolkits/petsc/objects/PetscVec.cpp \ 373 ./toolkits/petsc/objects/PetscSolver.cpp 369 374 endif 370 375 #}}} … … 492 497 endif 493 498 #}}} 494 #Gia sources 499 #Gia sources (only if have fortran){{{ 495 500 if GIAIVINS 496 501 if FORTRAN 497 issm_sources += ./cores/gia_core.cpp\ 498 ./analyses/GiaIvinsAnalysis.cpp\ 499 ./modules/GiaDeflectionCorex/GiaDeflectionCorex.cpp\ 500 ./modules/GiaDeflectionCorex/distme.f\ 501 ./modules/GiaDeflectionCorex/freed.f\ 502 ./modules/GiaDeflectionCorex/ojrule.f\ 503 ./modules/GiaDeflectionCorex/pwise.f\ 504 ./modules/GiaDeflectionCorex/qwise.f\ 505 ./modules/GiaDeflectionCorex/stot.f\ 506 ./modules/GiaDeflectionCorex/what0.f 507 endif 508 endif 509 #}}} 510 #Love sources (only if have fortran){{{ 502 issm_sources += \ 503 ./cores/gia_core.cpp \ 504 ./analyses/GiaIvinsAnalysis.cpp \ 505 ./modules/GiaDeflectionCorex/GiaDeflectionCorex.cpp \ 506 ./modules/GiaDeflectionCorex/distme.f \ 507 ./modules/GiaDeflectionCorex/freed.f \ 508 ./modules/GiaDeflectionCorex/ojrule.f \ 509 ./modules/GiaDeflectionCorex/pwise.f \ 510 ./modules/GiaDeflectionCorex/qwise.f \ 511 ./modules/GiaDeflectionCorex/stot.f \ 512 ./modules/GiaDeflectionCorex/what0.f 513 endif 514 endif 515 #}}} 516 #Love sources (only if have fortran){{{ 511 517 if LOVE 512 518 if FORTRAN 513 issm_sources += ./cores/love_core.cpp\ 514 ./analyses/LoveAnalysis.cpp\ 515 ./modules/FourierLoveCorex/FourierLoveCorex.cpp\ 516 ./modules/FourierLoveCorex/lnb_param.f90\ 517 ./modules/FourierLoveCorex/model.f90\ 518 ./modules/FourierLoveCorex/util.f90\ 519 ./modules/FourierLoveCorex/lovenb_sub.f90\ 520 ./modules/FourierLoveCorex/love_numbers.f90 519 issm_sources += \ 520 ./cores/love_core.cpp \ 521 ./analyses/LoveAnalysis.cpp \ 522 ./modules/FourierLoveCorex/FourierLoveCorex.cpp \ 523 ./modules/FourierLoveCorex/lnb_param.f90 \ 524 ./modules/FourierLoveCorex/model.f90 \ 525 ./modules/FourierLoveCorex/util.f90 \ 526 ./modules/FourierLoveCorex/lovenb_sub.f90 \ 527 ./modules/FourierLoveCorex/love_numbers.f90 521 528 endif 522 529 endif 523 530 #}}} 524 531 #Esa sources {{{ 525 if ESA 526 issm_sources += ./cores/esa_core.cpp\ 527 ./analyses/EsaAnalysis.cpp 532 if ESA 533 issm_sources += \ 534 ./cores/esa_core.cpp \ 535 ./analyses/EsaAnalysis.cpp 528 536 endif 529 537 #}}} 530 538 #Oceansources {{{ 531 539 if OCEAN 532 issm_sources += 540 issm_sources += ./modules/OceanExchangeDatax/OceanExchangeDatax.cpp 533 541 endif 534 542 #}}} 535 543 #Slr sources {{{ 536 544 if SEALEVELRISE 537 issm_sources += ./cores/sealevelrise_core.cpp\ 538 ./analyses/SealevelriseAnalysis.cpp 545 issm_sources += \ 546 ./cores/sealevelrise_core.cpp \ 547 ./analyses/SealevelriseAnalysis.cpp 539 548 endif 540 549 #}}} … … 558 567 #Wrapper sources 559 568 #Kml sources {{{ 560 kml_sources = ./modules/Exp2Kmlx/Exp2Kmlx.cpp\ 561 ./modules/Kml2Expx/Kml2Expx.cpp\ 562 ./modules/Shp2Kmlx/Shp2Kmlx.cpp\ 563 ./modules/KMLFileReadx/KMLFileReadx.cpp\ 564 ./modules/KMLMeshWritex/KMLMeshWritex.cpp\ 565 ./modules/KMLOverlayx/KMLOverlayx.cpp\ 566 ./kml/KML_Attribute.cpp\ 567 ./kml/KML_Comment.cpp\ 568 ./kml/KML_ColorStyle.cpp\ 569 ./kml/KML_Container.cpp\ 570 ./kml/KML_Document.cpp\ 571 ./kml/KML_Feature.cpp\ 572 ./kml/KML_File.cpp\ 573 ./kml/KML_Folder.cpp\ 574 ./kml/KML_Geometry.cpp\ 575 ./kml/KML_GroundOverlay.cpp\ 576 ./kml/KML_Icon.cpp\ 577 ./kml/KML_LatLonBox.cpp\ 578 ./kml/KML_LinearRing.cpp\ 579 ./kml/KML_LineString.cpp\ 580 ./kml/KML_LineStyle.cpp\ 581 ./kml/KML_MultiGeometry.cpp\ 582 ./kml/KML_Object.cpp\ 583 ./kml/KML_Overlay.cpp\ 584 ./kml/KML_Point.cpp\ 585 ./kml/KML_Placemark.cpp\ 586 ./kml/KML_Polygon.cpp\ 587 ./kml/KML_PolyStyle.cpp\ 588 ./kml/KML_Style.cpp\ 589 ./kml/KML_StyleSelector.cpp\ 590 ./kml/KML_SubStyle.cpp\ 591 ./kml/KML_Unknown.cpp\ 592 ./kml/KMLFileReadUtils.cpp 569 kml_sources = \ 570 ./modules/Exp2Kmlx/Exp2Kmlx.cpp \ 571 ./modules/Kml2Expx/Kml2Expx.cpp \ 572 ./modules/Shp2Kmlx/Shp2Kmlx.cpp \ 573 ./modules/KMLFileReadx/KMLFileReadx.cpp \ 574 ./modules/KMLMeshWritex/KMLMeshWritex.cpp \ 575 ./modules/KMLOverlayx/KMLOverlayx.cpp \ 576 ./kml/KML_Attribute.cpp \ 577 ./kml/KML_Comment.cpp \ 578 ./kml/KML_ColorStyle.cpp \ 579 ./kml/KML_Container.cpp \ 580 ./kml/KML_Document.cpp \ 581 ./kml/KML_Feature.cpp \ 582 ./kml/KML_File.cpp \ 583 ./kml/KML_Folder.cpp \ 584 ./kml/KML_Geometry.cpp \ 585 ./kml/KML_GroundOverlay.cpp \ 586 ./kml/KML_Icon.cpp \ 587 ./kml/KML_LatLonBox.cpp \ 588 ./kml/KML_LinearRing.cpp \ 589 ./kml/KML_LineString.cpp \ 590 ./kml/KML_LineStyle.cpp \ 591 ./kml/KML_MultiGeometry.cpp \ 592 ./kml/KML_Object.cpp \ 593 ./kml/KML_Overlay.cpp \ 594 ./kml/KML_Point.cpp \ 595 ./kml/KML_Placemark.cpp \ 596 ./kml/KML_Polygon.cpp \ 597 ./kml/KML_PolyStyle.cpp \ 598 ./kml/KML_Style.cpp \ 599 ./kml/KML_StyleSelector.cpp \ 600 ./kml/KML_SubStyle.cpp \ 601 ./kml/KML_Unknown.cpp \ 602 ./kml/KMLFileReadUtils.cpp 593 603 #}}} 594 604 #NEOPZ sources {{{ … … 596 606 #}}} 597 607 #Modules sources{{{ 598 modules_sources= ./shared/Threads/LaunchThread.cpp\ 599 ./shared/Threads/PartitionRange.cpp\ 600 ./shared/Exp/exp.cpp\ 601 ./shared/Triangle/AssociateSegmentToElement.cpp\ 602 ./shared/Triangle/GridInsideHole.cpp\ 603 ./shared/Triangle/OrderSegments.cpp\ 604 ./shared/Triangle/SplitMeshForRifts.cpp\ 605 ./shared/Triangle/TriangleUtils.cpp\ 606 ./modules/Trianglex/Trianglex.cpp\ 607 ./modules/ProcessRiftsx/ProcessRiftsx.cpp\ 608 ./modules/PointCloudFindNeighborsx/PointCloudFindNeighborsx.cpp\ 609 ./modules/PointCloudFindNeighborsx/PointCloudFindNeighborsxt.cpp\ 610 ./modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp\ 611 ./modules/InterpFromMesh2dx/InterpFromMesh2dx.cpp\ 612 ./modules/InterpFromMesh2dx/InterpFromMesh2dxt.cpp\ 613 ./modules/InterpFromMeshToMesh3dx/InterpFromMeshToMesh3dx.cpp\ 614 ./modules/InterpFromMeshToGridx/InterpFromMeshToGridx.cpp\ 615 ./modules/MeshProfileIntersectionx/MeshProfileIntersectionx.cpp\ 616 ./modules/ContourToMeshx/ContourToMeshx.cpp\ 617 ./modules/ContourToMeshx/ContourToMeshxt.cpp\ 618 ./modules/ExpToLevelSetx/ExpToLevelSetx.cpp\ 619 ./modules/ExpToLevelSetx/ExpToLevelSetxt.cpp\ 620 ./modules/ContourToNodesx/ContourToNodesx.cpp\ 621 ./modules/DistanceToMaskBoundaryx/DistanceToMaskBoundaryx.cpp\ 622 ./modules/DistanceToMaskBoundaryx/DistanceToMaskBoundaryxt.cpp\ 623 ./modules/NodeConnectivityx/NodeConnectivityx.cpp\ 624 ./modules/ElementConnectivityx/ElementConnectivityx.cpp\ 625 ./modules/PropagateFlagsFromConnectivityx/PropagateFlagsFromConnectivityx.cpp 608 modules_sources = \ 609 ./shared/Threads/LaunchThread.cpp \ 610 ./shared/Threads/PartitionRange.cpp \ 611 ./shared/Exp/exp.cpp \ 612 ./shared/Triangle/AssociateSegmentToElement.cpp \ 613 ./shared/Triangle/GridInsideHole.cpp \ 614 ./shared/Triangle/OrderSegments.cpp \ 615 ./shared/Triangle/SplitMeshForRifts.cpp \ 616 ./shared/Triangle/TriangleUtils.cpp \ 617 ./modules/Trianglex/Trianglex.cpp \ 618 ./modules/ProcessRiftsx/ProcessRiftsx.cpp \ 619 ./modules/PointCloudFindNeighborsx/PointCloudFindNeighborsx.cpp \ 620 ./modules/PointCloudFindNeighborsx/PointCloudFindNeighborsxt.cpp \ 621 ./modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp \ 622 ./modules/InterpFromMesh2dx/InterpFromMesh2dx.cpp \ 623 ./modules/InterpFromMesh2dx/InterpFromMesh2dxt.cpp \ 624 ./modules/InterpFromMeshToMesh3dx/InterpFromMeshToMesh3dx.cpp \ 625 ./modules/InterpFromMeshToGridx/InterpFromMeshToGridx.cpp \ 626 ./modules/MeshProfileIntersectionx/MeshProfileIntersectionx.cpp \ 627 ./modules/ContourToMeshx/ContourToMeshx.cpp \ 628 ./modules/ContourToMeshx/ContourToMeshxt.cpp \ 629 ./modules/ExpToLevelSetx/ExpToLevelSetx.cpp \ 630 ./modules/ExpToLevelSetx/ExpToLevelSetxt.cpp \ 631 ./modules/ContourToNodesx/ContourToNodesx.cpp \ 632 ./modules/DistanceToMaskBoundaryx/DistanceToMaskBoundaryx.cpp \ 633 ./modules/DistanceToMaskBoundaryx/DistanceToMaskBoundaryxt.cpp \ 634 ./modules/NodeConnectivityx/NodeConnectivityx.cpp \ 635 ./modules/ElementConnectivityx/ElementConnectivityx.cpp \ 636 ./modules/PropagateFlagsFromConnectivityx/PropagateFlagsFromConnectivityx.cpp 637 626 638 if CHACO 627 modules_sources+= ./modules/Chacox/Chacox.cpp\ 628 ./modules/Chacox/input_parse.cpp\ 629 ./modules/Chacox/chaco_seconds.cpp\ 630 ./modules/Chacox/user_params.cpp 639 modules_sources += \ 640 ./modules/Chacox/Chacox.cpp \ 641 ./modules/Chacox/input_parse.cpp \ 642 ./modules/Chacox/chaco_seconds.cpp \ 643 ./modules/Chacox/user_params.cpp 631 644 endif 632 645 if SCOTCH 633 modules_sources += ./modules/Scotchx/Scotchx.cpp646 modules_sources += ./modules/Scotchx/Scotchx.cpp 634 647 endif 635 648 #}}} … … 638 651 #Kriging sources {{{ 639 652 if KRIGING 640 issm_sources += ./classes/kriging/Observations.cpp\ 641 ./classes/kriging/GaussianVariogram.cpp\ 642 ./classes/kriging/ExponentialVariogram.cpp\ 643 ./classes/kriging/SphericalVariogram.cpp\ 644 ./classes/kriging/PowerVariogram.cpp\ 645 ./classes/kriging/Quadtree.cpp\ 646 ./classes/kriging/Covertree.cpp\ 647 ./classes/kriging/Observation.cpp\ 648 ./modules/Krigingx/pKrigingx.cpp 649 650 modules_sources +=./modules/Krigingx/Krigingx.cpp\ 651 ./modules/Krigingx/pKrigingx.cpp 653 issm_sources += \ 654 ./classes/kriging/Observations.cpp \ 655 ./classes/kriging/GaussianVariogram.cpp \ 656 ./classes/kriging/ExponentialVariogram.cpp \ 657 ./classes/kriging/SphericalVariogram.cpp \ 658 ./classes/kriging/PowerVariogram.cpp \ 659 ./classes/kriging/Quadtree.cpp \ 660 ./classes/kriging/Covertree.cpp \ 661 ./classes/kriging/Observation.cpp \ 662 ./modules/Krigingx/pKrigingx.cpp 663 664 modules_sources += \ 665 ./modules/Krigingx/Krigingx.cpp \ 666 ./modules/Krigingx/pKrigingx.cpp 652 667 endif 653 668 #}}} 654 669 #Library flags and sources {{{ 655 ALLCXXFLAGS= $(CXXFLAGS) $(CXXOPTFLAGS) 670 ALLCXXFLAGS= $(CXXFLAGS) $(CXXOPTFLAGS) 656 671 657 672 libISSMCore_la_SOURCES = $(issm_sources) … … 661 676 if !WINDOWS 662 677 if !STANDALONE_LIBRARIES 663 libISSMCore_la_LIBADD = $(PETSCLIB) $(TAOLIB) $(M1QN3LIB) $(SEMICLIB) $(PLAPACKLIB) $(MUMPSLIB) $(SUPERLULIB) $(SPOOLESLIB) $(SCALAPACKLIB) $(BLACSLIB) $(HYPRELIB) $(SPAILIB) $(PROMETHEUSLIB) $(PASTIXLIB) $(MLLIB) $(DAKOTALIB) $(METISLIB) $(CHACOLIB) $(SCOTCHLIB) $(BLASLAPACKLIB) $(MKLLIB) $(MPILIB) $(MATHLIB) $(GRAPHICSLIB) $(MULTITHREADINGLIB) $(OSLIBS) $(GSLLIB) 678 libISSMCore_la_LIBADD = $(PETSCLIB) $(TAOLIB) $(M1QN3LIB) $(SEMICLIB) $(PLAPACKLIB) $(MUMPSLIB) $(SUPERLULIB) $(SPOOLESLIB) $(SCALAPACKLIB) $(BLACSLIB) $(HYPRELIB) $(SPAILIB) $(PROMETHEUSLIB) $(PASTIXLIB) $(MLLIB) $(DAKOTALIB) $(METISLIB) $(CHACOLIB) $(SCOTCHLIB) $(BLASLAPACKLIB) $(MKLLIB) $(MPILIB) $(MATHLIB) $(GRAPHICSLIB) $(MULTITHREADINGLIB) $(OSLIBS) $(GSLLIB) $(ADOLCLIB) $(AMPILIB) $(ADJOINTMPILIB) $(METEOIOLIB) $(SNOWPACKLIB) 664 679 if FORTRAN 665 680 libISSMCore_la_LIBADD += $(FLIBS) $(FORTRANLIB) … … 699 714 700 715 if STANDALONE_EXECUTABLES 701 issm_LDFLAGS = -static 716 AM_LDFLAGS += -static -Wl,--disable-new-dtags -Wl,-rpath,'$$ORIGIN/../lib' 702 717 endif 703 718 … … 708 723 libISSMModules_la_LDFLAGS = -static 709 724 else 710 libISSMModules_la_LDFLAGS = 711 endif 712 else 713 libISSMCore_la_LDFLAGS = 725 libISSMModules_la_LDFLAGS = 726 endif 727 else 728 libISSMCore_la_LDFLAGS = 714 729 libISSMOverload_la_LDFLAGS = 715 730 endif … … 724 739 if ANDROID 725 740 if ANDROIDEXE 726 bin_PROGRAMS = issm 727 else 728 bin_PROGRAMS = 741 bin_PROGRAMS = issm issm_slr 742 else 743 bin_PROGRAMS = 729 744 endif 730 745 else … … 732 747 bin_PROGRAMS = 733 748 else 734 bin_PROGRAMS = issm 749 bin_PROGRAMS = issm issm_slr 735 750 endif 736 751 endif … … 743 758 744 759 #External packages 745 LDADD += $(NEOPZLIB) $(TAOLIB) $(M1QN3LIB) $(SEMICLIB) $(PLAPACKLIB) $(MUMPSLIB) $(SUPERLULIB) $(SPOOLESLIB) $(SCALAPACKLIB) $(BLACSLIB) $(PETSCLIB) $(HYPRELIB) $(SPAILIB) $(PROMETHEUSLIB) $(PASTIXLIB) $(MLLIB) $(DAKOTALIB) $(METISLIB) $(CHACOLIB) $(SCOTCHLIB) $(BLASLAPACKLIB) $(MKLLIB) $(MPILIB)$(MATHLIB) $(GRAPHICSLIB) $(MULTITHREADINGLIB) $(OSLIBS) $(GSLLIB) $(AMPILIB) $(ADJOINTMPILIB) $(ADOLCLIB) $(MPILIB) $(METEOIOLIB) $(SNOWPACKLIB) $(PROJ4LIB)760 LDADD += $(NEOPZLIB) $(TAOLIB) $(M1QN3LIB) $(SEMICLIB) $(PLAPACKLIB) $(MUMPSLIB) $(SUPERLULIB) $(SPOOLESLIB) $(SCALAPACKLIB) $(BLACSLIB) $(PETSCLIB) $(HYPRELIB) $(SPAILIB) $(PROMETHEUSLIB) $(PASTIXLIB) $(MLLIB) $(DAKOTALIB) $(METISLIB) $(CHACOLIB) $(SCOTCHLIB) $(BLASLAPACKLIB) $(MKLLIB) $(MPILIB) $(MATHLIB) $(GRAPHICSLIB) $(MULTITHREADINGLIB) $(OSLIBS) $(GSLLIB) $(AMPILIB) $(ADJOINTMPILIB) $(ADOLCLIB) $(MPILIB) $(METEOIOLIB) $(SNOWPACKLIB) $(PROJ4LIB) 746 761 747 762 if FORTRAN … … 764 779 bin_PROGRAMS += kriging 765 780 kriging_SOURCES = main/kriging.cpp 766 kriging_CXXFLAGS= $(CXXFLAGS) $(CXXOPTFLAGS) $(COPTFLAGS) 781 kriging_CXXFLAGS= $(CXXFLAGS) $(CXXOPTFLAGS) $(COPTFLAGS) 767 782 endif 768 783 … … 770 785 bin_PROGRAMS += issm_dakota 771 786 issm_dakota_SOURCES = main/issm_dakota.cpp 772 issm_dakota_CXXFLAGS= $(CXXFLAGS) $(CXXOPTFLAGS) $(COPTFLAGS) 787 issm_dakota_CXXFLAGS= $(CXXFLAGS) $(CXXOPTFLAGS) $(COPTFLAGS) 773 788 issm_dakota_LDADD= $(LDADD) 774 789 endif -
issm/trunk-jpl/src/c/cores/dakota_core.cpp
r23066 r24593 1 1 /*!\file: dakota_core.cpp 2 * \brief: wrapper to the Dakota capabilities. qmu fires up Dakota, and registers a Dakota Plug gin3 * which will be in charge of running the solution sequences repe teadly, to garner statistics.4 * 5 * This routine deals with running ISSM and Dakota in library mode. In library mode, Dakota does not 6 * run as an execu atble. Its capabilities are linked into the ISSM software. ISSM calls dakota routines7 * directly from the dakota library. qmu.cpp is the code that is in charge of calling those routines.8 * 9 * Dakota has its own way of running in parallel (for embar assingly parallel jobs). We do not want that,10 * as ISSM knows exactly how to run "really parallel" jobs that use all CPUS. To bypass Dakota's parallelism, 2 * \brief: wrapper to the Dakota capabilities. qmu fires up Dakota, and registers a Dakota Plugin 3 * which will be in charge of running the solution sequences repeatedly, to garner statistics. 4 * 5 * This routine deals with running ISSM and Dakota in library mode. In library mode, Dakota does not 6 * run as an executable. Its capabilities are linked into the ISSM software. ISSM calls Dakota routines 7 * directly from the Dakota library. qmu.cpp is the code that is in charge of calling those routines. 8 * 9 * Dakota has its own way of running in parallel (for embarrassingly parallel jobs). We do not want that, 10 * as ISSM knows exactly how to run "really parallel" jobs that use all CPUS. To bypass Dakota's parallelism, 11 11 * we overloaded the constructor for the parallel library (see the Dakota patch in the externalpackages/dakota 12 * directory). This overloaded constructor fires up Dakota serially on CPU 0 only! We take care of broadcasting 13 * to the other CPUS, hence ISSM is running in parallel, and Dakota serially on CPU0. 14 * 15 * Now, how does CPU 0 drive all other CPUS to carry out sensitivity analyses e? By synchronizing its call to16 * our ISSM cores (stressbalance_core, thermal_core, transient_core, etc ...) on CPU 0 with all other CPUS. 17 * This explains the structure of qmu.cpp, where cpu 0 runs Dakota, the Dakota pluggin fires up DakotaSpawnCore.cpp, 18 * while the other CPUS are waiting for a broadcast from CPU0, once they get it, they also fire up 19 * DakotaSpawnCore. In the end, DakotaSpawnCore is fired up on all CPUS, with CPU0 having Dakota inputs, that it will 20 * broa cast to other CPUS.21 * 22 * Now, how does dakota call the DakotaSpawnCore routine? The DakotaSpawnCore is embedded into the DakotaPlugin object23 * which is derived from the Direct Interface Dakota obj ct. This is the only way to run Dakota in library24 * mode (see their develop per guide for more info). Dakota registers the DakotaPlugin object into its own25 * database, and calls on the embedded DakotaSpawnCore from CPU0. 26 * 27 */ 12 * directory). This overloaded constructor fires up Dakota serially on CPU 0 only! We take care of broadcasting 13 * to the other CPUS, hence ISSM is running in parallel, and Dakota serially on CPU0. 14 * 15 * Now, how does CPU 0 drive all other CPUS to carry out sensitivity analyses? By synchronizing its call to 16 * our ISSM cores (stressbalance_core, thermal_core, transient_core, etc ...) on CPU 0 with all other CPUS. 17 * This explains the structure of qmu.cpp, where cpu 0 runs Dakota, the Dakota pluggin fires up DakotaSpawnCore.cpp, 18 * while the other CPUS are waiting for a broadcast from CPU0, once they get it, they also fire up 19 * DakotaSpawnCore. In the end, DakotaSpawnCore is fired up on all CPUS, with CPU0 having Dakota inputs, that it will 20 * broadcast to other CPUS. 21 * 22 * Now, how does Dakota call the DakotaSpawnCore routine? The DakotaSpawnCore is embedded into the DakotaPlugin object 23 * which is derived from the Direct Interface Dakota object. This is the only way to run Dakota in library 24 * mode (see their developer guide for more info). Dakota registers the DakotaPlugin object into its own 25 * database, and calls on the embedded DakotaSpawnCore from CPU0. 26 * 27 */ 28 28 29 29 /* \brief: run core ISSM solution using Dakota inputs coming from CPU 0. 30 30 * \sa qmu.cpp DakotaPlugin.cpp 31 31 * 32 * This routine needs to be understood simultaneously with qmu.cpp and DakotaPlugin. 33 * DakotaSpawnCoreParallel is called by all CPUS, with CPU 0 holding Dakota variable values, along 34 * with variable descriptors. 35 * 36 * DakotaSpawnCoreParallel takes care of broadcasting the variables and their descriptors across the MPI 37 * ring. Once this is done, we use the variables to modify the inputs for the solution core. 38 * For ex, if "rho_ice" is provided, for ex 920, we include "rho_ice" in the inputs, then 39 * call the core with the modified inputs. This is the way we get Dakota to explore the parameter 40 * sp ce of the core.41 * 42 * Once the core is called, we process the results of the core, and using the processed results, 43 * we compute response functions. The responses are computed on all CPUS, but they are targeted 44 * for CPU 0, which will get these values back to the Dakota engine. 45 * 46 */ 32 * This routine needs to be understood simultaneously with qmu.cpp and DakotaPlugin. 33 * DakotaSpawnCoreParallel is called by all CPUS, with CPU 0 holding Dakota variable values, along 34 * with variable descriptors. 35 * 36 * DakotaSpawnCoreParallel takes care of broadcasting the variables and their descriptors across the MPI 37 * ring. Once this is done, we use the variables to modify the inputs for the solution core. 38 * For ex, if "rho_ice" is provided, for ex 920, we include "rho_ice" in the inputs, then 39 * call the core with the modified inputs. This is the way we get Dakota to explore the parameter 40 * space of the core. 41 * 42 * Once the core is called, we process the results of the core, and using the processed results, 43 * we compute response functions. The responses are computed on all CPUS, but they are targeted 44 * for CPU 0, which will get these values back to the Dakota engine. 45 * 46 */ 47 47 48 48 /*include config: {{{*/ … … 80 80 void DakotaFree(double** pvariables,char*** pvariables_descriptors,char*** presponses_descriptors,int numvariables,int numresponses){ /*{{{*/ 81 81 82 /*\brief DakotaFree: free allocations on other cpus, not done by Dakota.*/82 /*\brief DakotaFree: free allocations on other CPUs, not done by Dakota.*/ 83 83 84 84 int i; … … 98 98 my_rank=IssmComm::GetRank(); 99 99 100 /*Free variables and variables_descriptors only on cpu!=0*/100 /*Free variables and variables_descriptors only on CPU !=0*/ 101 101 if(my_rank!=0){ 102 102 xDelete<double>(variables); … … 108 108 } 109 109 110 //responses descriptors on every cpu110 //responses descriptors on every CPU 111 111 for(i=0;i<numresponses;i++){ 112 112 string=responses_descriptors[i]; … … 124 124 125 125 /* * \brief: broadcast variables_descriptors, variables, numvariables and numresponses 126 * from cpu 0 to all other cpus.127 */ 126 * from CPU 0 to all other CPUs. 127 */ 128 128 129 129 int i; … … 150 150 151 151 /*numvariables: */ 152 ISSM_MPI_Bcast(&numvariables,1,ISSM_MPI_INT,0,IssmComm::GetComm()); 152 ISSM_MPI_Bcast(&numvariables,1,ISSM_MPI_INT,0,IssmComm::GetComm()); 153 153 154 154 /*variables:*/ 155 155 if(my_rank!=0)variables=xNew<double>(numvariables); 156 ISSM_MPI_Bcast(variables,numvariables,MPI_DOUBLE,0,IssmComm::GetComm()); 156 ISSM_MPI_Bcast(variables,numvariables,MPI_DOUBLE,0,IssmComm::GetComm()); 157 157 158 158 /*variables_descriptors: */ … … 165 165 string_length=(strlen(string)+1)*sizeof(char); 166 166 } 167 ISSM_MPI_Bcast(&string_length,1,ISSM_MPI_INT,0,IssmComm::GetComm()); 167 ISSM_MPI_Bcast(&string_length,1,ISSM_MPI_INT,0,IssmComm::GetComm()); 168 168 if(my_rank!=0)string=xNew<char>(string_length); 169 ISSM_MPI_Bcast(string,string_length,ISSM_MPI_CHAR,0,IssmComm::GetComm()); 169 ISSM_MPI_Bcast(string,string_length,ISSM_MPI_CHAR,0,IssmComm::GetComm()); 170 170 if(my_rank!=0)variables_descriptors[i]=string; 171 171 } 172 172 173 173 /*numresponses: */ 174 ISSM_MPI_Bcast(&numresponses,1,ISSM_MPI_INT,0,IssmComm::GetComm()); 174 ISSM_MPI_Bcast(&numresponses,1,ISSM_MPI_INT,0,IssmComm::GetComm()); 175 175 176 176 /*Assign output pointers:*/ … … 182 182 int DakotaSpawnCore(double* d_responses, int d_numresponses, double* d_variables, char** d_variables_descriptors,int d_numvariables, void* void_femmodel,int counter){ /*{{{*/ 183 183 184 /*Notice the d_, which prefixes anything that is being provided to us by the Dakota plug gin. Careful. some things are ours, some are dakotas!: */184 /*Notice the d_, which prefixes anything that is being provided to us by the Dakota plugin. Careful: some things are ours; some are DDkota's!: */ 185 185 186 186 char **responses_descriptors = NULL; //these are our! there are only numresponsedescriptors of them, not d_numresponses!!! … … 192 192 bool nodakotacore = true; 193 193 194 /*If counter==-1 on cpu0, it means that the dakota runs are done. In which case, bail out and return 0: */195 ISSM_MPI_Bcast(&counter,1,ISSM_MPI_INT,0,IssmComm::GetComm()); 194 /*If counter==-1 on CPU 0, it means that the Dakota runs are done. In which case, bail out and return 0: */ 195 ISSM_MPI_Bcast(&counter,1,ISSM_MPI_INT,0,IssmComm::GetComm()); 196 196 if(counter==-1)return 0; 197 197 198 /*cast void_femmodel to FemModel, and at the same time, make a copy, so we start this new core run for this specific sample 199 *with a brand new copy of the model, which has not been tempered with by previous dakota runs: */198 /*cast void_femmodel to FemModel, and at the same time, make a copy, so we start this new core run for this specific sample 199 *with a brand new copy of the model, which has not been tempered with by previous Dakota runs: */ 200 200 femmodel=(reinterpret_cast<FemModel*>(void_femmodel))->copy(); 201 201 … … 207 207 if(VerboseQmu()) _printf0_("qmu iteration: " << counter << "\n"); 208 208 209 /* only cpu 0, running dakota is providing us with variables and variables_descriptors and numresponses: broadcast onto other cpus: */209 /* only CPU 0, running Dakota is providing us with variables and variables_descriptors and numresponses: broadcast onto other CPUs: */ 210 210 DakotaMPI_Bcast(&d_variables,&d_variables_descriptors,&d_numvariables,&d_numresponses); 211 211 … … 231 231 232 232 return 1; //this is critical! do not return 0, otherwise, dakota_core will stop running! 233 } 233 } 234 234 /*}}}*/ 235 235 void dakota_core(FemModel* femmodel){ /*{{{*/ … … 255 255 char* dakotamode=xNew<char>(strlen("serial")+1); 256 256 xMemCpy<char>(dakotamode,"serial",strlen("serial")+1); 257 Dakota::ParallelLibrary parallel_lib(dakotamode); //use our own ISSM Dakota library mode constructor, which only fires up Dakota on CPU 0. 258 Dakota::ProblemDescDB problem_db(parallel_lib); 257 Dakota::ParallelLibrary parallel_lib(dakotamode); //use our own ISSM Dakota library mode constructor, which only fires up Dakota on CPU 0. 258 Dakota::ProblemDescDB problem_db(parallel_lib); 259 259 xDelete<char>(dakotamode); 260 260 … … 289 289 selected_strategy.run_strategy(); 290 290 291 //Warn other cpus that we are done running the dakota iterator, by setting the counter to -1:291 //Warn other CPUs that we are done running the Dakota iterator, by setting the counter to -1: 292 292 DakotaSpawnCore(NULL,0, NULL,NULL,0,femmodel,-1); 293 293 … … 296 296 297 297 for(;;){ 298 if(!DakotaSpawnCore(NULL,0, NULL,NULL,0,femmodel,0)) break; //counter came in at -1 on cpu0, bail out.298 if(!DakotaSpawnCore(NULL,0, NULL,NULL,0,femmodel,0)) break; //counter came in at -1 on CPU 0, bail out. 299 299 } 300 300 } 301 301 302 /*Free res sources:*/302 /*Free resources:*/ 303 303 xDelete<char>(dakota_input_file); 304 304 xDelete<char>(dakota_error_file); … … 307 307 } /*}}}*/ 308 308 #else 309 void dakota_core(FemModel* femmodel){ 310 _error_("dakota_core for versions of Dakota >=6 should not be used anymore! Use instead the issm_dakota 309 void dakota_core(FemModel* femmodel){ 310 _error_("dakota_core for versions of Dakota >=6 should not be used anymore! Use instead the issm_dakota executable!"); 311 311 } 312 312 #endif -
issm/trunk-jpl/src/c/modules/Scotchx/Scotchx.h
r15000 r24593 1 1 /*!\file: Scotchxx.h 2 2 * \brief header file for Scotch partitioner 3 */ 3 */ 4 4 5 5 #ifndef _SCOTCHX_H 6 6 #define _SCOTCHX_H 7 7 8 #undef __FUNCT__ 8 #undef __FUNCT__ 9 9 #define __FUNCT__ "Scotchx" 10 10 … … 23 23 #define GMAP 24 24 25 #include "scotch_module.h" 26 #include "scotch_common.h" 27 #include "scotch.h" 28 #include "scotch_gmap.h" 25 #ifdef _PETSC_SCOTCH_ 26 #include "scotch_module.h" 27 #include "scotch_common.h" 28 #include "scotch_gmap.h" 29 #endif 30 31 #ifdef _HAVE_MPI_ 32 #include "ptscotch.h" 33 #else 34 #include "scotch.h" 35 #endif 29 36 30 37 /* -
issm/trunk-jpl/src/c/shared/Numerics/constants.h
r23880 r24593 1 1 /*!\file: constants.h 2 2 * \brief prototypes for constants.h 3 */ 3 */ 4 4 5 5 #ifndef _ISSM_CONSTANTS_H_ … … 9 9 #define SQRT2 1.414213562373095048801688724209698078569671875376948073176679738 10 10 #define SQRT3 1.732050807568877293527446341505872366942805253810380628055806979 11 #define PI 3.141592653589793238462643383279502884197169399375105820974944592308 11 const double PI=3.141592653589793238462643383279502884197169399375105820974944592308; // Macro definition conflicts with Dakota's declaration of PI 12 12 13 13 #define NDOF1 1 … … 18 18 // /*Windows specific typefefs: */ 19 19 // #ifdef _INTEL_WIN_ 20 // 20 // 21 21 // #ifndef NAN 22 22 // //For reference, for Intel compile on win64 23 // //#define NAN 0.0/0.0 23 // //#define NAN 0.0/0.0 24 24 // #define NAN (INFINITY-INFINITY) 25 25 // #endif 26 // 26 // 27 27 // #ifndef INFINITY 28 28 // //For reference, for Intel compile on win64 … … 30 30 // #define INFINITY (DBL_MAX+DBL_MAX) 31 31 // #endif 32 // 32 // 33 33 // #endif /*_INTEL_WIN_*/ 34 34 -
issm/trunk-jpl/src/c/toolkits/mpi/issmmpi.h
r23766 r24593 1 1 /* \file issmmpi.h 2 * \brief: header file that defines all the mpi wrappers that ISSM requires. The goal is to control 2 * \brief: header file that defines all the mpi wrappers that ISSM requires. The goal is to control 3 3 * which MPI layer we are using at compile time: the standard mpi, the autodiff mpi or no mpi at all. 4 4 */ … … 39 39 #include <ampi/ampi.h> 40 40 #endif 41 #elif _HAVE_PETSC_MPI_ // P etsc now hides there MPI header. It can be reached through Petsc.41 #elif _HAVE_PETSC_MPI_ // PETSc now hides their MPI header. It can be reached through PETSc's header file. 42 42 #include <petsc.h> 43 #else 43 #else 44 44 #include <mpi.h> 45 45 #endif … … 66 66 #define ISSM_MPI_INT AMPI_INT 67 67 #define ISSM_MPI_LONG_LONG_INT AMPI_LONG_LONG_INT 68 68 69 69 // operations 70 70 #define ISSM_MPI_MAX AMPI_MAX … … 72 72 #define ISSM_MPI_PROD AMPI_PROD 73 73 #define ISSM_MPI_SUM AMPI_SUM 74 74 75 75 // others 76 76 #define ISSM_MPI_COMM_WORLD AMPI_COMM_WORLD … … 82 82 #if defined(_HAVE_AMPI_) && !defined(_WRAPPERS_) 83 83 #define ISSM_MPI_DOUBLE AMPI_ADOUBLE 84 #else 84 #else 85 85 #define ISSM_MPI_DOUBLE MPI_DOUBLE 86 86 #endif … … 106 106 #include "./commops/commops.h" 107 107 /*}}}*/ 108 #else 108 #else 109 109 /*Our ISSM MPI defines: {{{*/ 110 110 // types … … 134 134 #define ISSM_MPI_ANY_SOURCE 3 135 135 /*}}}*/ 136 #endif 136 #endif 137 137 138 138 /*Dynamically return ISSM_MPI type from variable type */ 139 139 template <class T> ISSM_MPI_Datatype TypeToMPIType(){assert(false);}; 140 140 template <> inline ISSM_MPI_Datatype TypeToMPIType<IssmDouble>(){return ISSM_MPI_DOUBLE;}; 141 #if defined(_HAVE_AD_) && !defined(_WRAPPERS_) 141 #if defined(_HAVE_AD_) && !defined(_WRAPPERS_) 142 142 template <> inline ISSM_MPI_Datatype TypeToMPIType<IssmPDouble>(){return ISSM_MPI_PDOUBLE;}; 143 143 #endif … … 154 154 #ifdef _HAVE_MPI_ 155 155 # ifdef _HAVE_AMPI_ 156 rc=AMPI_Bcast(buffer, 156 rc=AMPI_Bcast(buffer, 157 157 count, 158 158 datatype, … … 160 160 comm); 161 161 # else 162 rc=MPI_Bcast(buffer, 162 rc=MPI_Bcast(buffer, 163 163 count, 164 164 datatype, … … 166 166 comm); 167 167 # endif 168 #else 169 // nothing to be done here 168 #else 169 // nothing to be done here 170 170 #endif 171 171 return rc; … … 173 173 /* interfaces {{{*/ 174 174 int ISSM_MPI_Allgather(void *sendbuf, int sendcount, ISSM_MPI_Datatype sendtype, void *recvbuf, int recvcount, ISSM_MPI_Datatype recvtype, ISSM_MPI_Comm comm); 175 int ISSM_MPI_Allgatherv(void *sendbuf, int sendcount, ISSM_MPI_Datatype sendtype, void *recvbuf, int *recvcounts, int *displs, ISSM_MPI_Datatype recvtype, ISSM_MPI_Comm comm); 176 int ISSM_MPI_Allreduce(void *sendbuf, void *recvbuf, int count, ISSM_MPI_Datatype datatype, ISSM_MPI_Op op, ISSM_MPI_Comm comm); 175 int ISSM_MPI_Allgatherv(void *sendbuf, int sendcount, ISSM_MPI_Datatype sendtype, void *recvbuf, int *recvcounts, int *displs, ISSM_MPI_Datatype recvtype, ISSM_MPI_Comm comm); 176 int ISSM_MPI_Allreduce(void *sendbuf, void *recvbuf, int count, ISSM_MPI_Datatype datatype, ISSM_MPI_Op op, ISSM_MPI_Comm comm); 177 177 int ISSM_MPI_Barrier(ISSM_MPI_Comm comm); 178 178 int ISSM_MPI_Bcast(void *buffer, int count, ISSM_MPI_Datatype datatype, int root, ISSM_MPI_Comm comm); … … 186 186 int ISSM_MPI_Recv(void *buf, int count, ISSM_MPI_Datatype datatype, int source, int tag, ISSM_MPI_Comm comm, ISSM_MPI_Status *status); 187 187 int ISSM_MPI_Reduce(void *sendbuf, void *recvbuf, int count, ISSM_MPI_Datatype datatype, ISSM_MPI_Op op, int root, ISSM_MPI_Comm comm); 188 int ISSM_MPI_Scatter(void *sendbuf, int sendcnt, ISSM_MPI_Datatype sendtype, void *recvbuf, int recvcnt, ISSM_MPI_Datatype recvtype, int root, ISSM_MPI_Comm comm); 189 int ISSM_MPI_Scatterv(void *sendbuf, int *sendcnts, int *displs, ISSM_MPI_Datatype sendtype, void *recvbuf, int recvcnt, ISSM_MPI_Datatype recvtype, int root, ISSM_MPI_Comm comm); 188 int ISSM_MPI_Scatter(void *sendbuf, int sendcnt, ISSM_MPI_Datatype sendtype, void *recvbuf, int recvcnt, ISSM_MPI_Datatype recvtype, int root, ISSM_MPI_Comm comm); 189 int ISSM_MPI_Scatterv(void *sendbuf, int *sendcnts, int *displs, ISSM_MPI_Datatype sendtype, void *recvbuf, int recvcnt, ISSM_MPI_Datatype recvtype, int root, ISSM_MPI_Comm comm); 190 190 int ISSM_MPI_Send(void *buf, int count, ISSM_MPI_Datatype datatype, int dest, int tag, ISSM_MPI_Comm comm); 191 191 double ISSM_MPI_Wtime(void); … … 194 194 195 195 // special for Adol-C locations when buffers are allocated with new 196 // this could end up in the xNew template specialized for adoubles 196 // this could end up in the xNew template specialized for adoubles 197 197 // so as to not litter the code with it. 198 198 void ISSM_MPI_ContiguousInAdolc(size_t aSize); -
issm/trunk-jpl/src/m/Makefile.am
r24550 r24593 3 3 #find . -type d -exec ls -d {} \; 4 4 5 bin_SCRIPTS = 5 bin_SCRIPTS = 6 6 if WRAPPERS 7 7 if MATLAB 8 8 if !DEVELOPMENT 9 bin_SCRIPTS += ${ISSM_DIR}/src/m/qmu/*.m \ 10 ${ISSM_DIR}/src/m/archive/*.m \ 11 ${ISSM_DIR}/src/m/qmu/setupdesign/*.m \ 12 ${ISSM_DIR}/src/m/qmu/plot/*.m \ 13 ${ISSM_DIR}/src/m/qmu/examples/*.m \ 14 ${ISSM_DIR}/src/m/kml/*.m \ 15 ${ISSM_DIR}/src/m/dev/issmversion.m \ 16 ${ISSM_DIR}/src/m/classes/*.m \ 17 ${ISSM_DIR}/src/m/classes/qmu/*.m \ 18 ${ISSM_DIR}/src/m/classes/qmu/dakota_method/*.m \ 19 ${ISSM_DIR}/src/m/classes/clusters/*.m \ 20 ${ISSM_DIR}/src/m/consistency/*.m \ 21 ${ISSM_DIR}/src/m/array/*.m \ 22 ${ISSM_DIR}/src/m/boundaryconditions/*.m \ 23 ${ISSM_DIR}/src/m/exp/*.m \ 24 ${ISSM_DIR}/src/m/exp/operation/*.m \ 25 ${ISSM_DIR}/src/m/geometry/*.m \ 26 ${ISSM_DIR}/src/m/interp/*.m \ 27 ${ISSM_DIR}/src/m/coordsystems/*.m \ 28 ${ISSM_DIR}/src/m/mech/*.m \ 29 ${ISSM_DIR}/src/m/mesh/*.m \ 30 ${ISSM_DIR}/src/m/mesh/planet/spheretri/*.m \ 31 ${ISSM_DIR}/src/m/mesh/planet/gmsh/*.m \ 32 ${ISSM_DIR}/src/m/mesh/rifts/*.m \ 33 ${ISSM_DIR}/src/m/miscellaneous/*.m \ 34 ${ISSM_DIR}/src/m/modules/*.m \ 35 ${ISSM_DIR}/src/m/os/*.m \ 36 ${ISSM_DIR}/src/m/plot/*.m \ 37 ${ISSM_DIR}/src/m/plot/colormaps/*.m \ 38 ${ISSM_DIR}/src/m/string/*.m \ 39 ${ISSM_DIR}/src/m/extrusion/*.m \ 40 ${ISSM_DIR}/src/m/inversions/*.m \ 41 ${ISSM_DIR}/src/m/io/*.m \ 42 ${ISSM_DIR}/src/m/parameterization/*.m \ 43 ${ISSM_DIR}/src/m/partition/*.m \ 44 ${ISSM_DIR}/src/m/print/*.m \ 45 ${ISSM_DIR}/src/m/regional/*.m \ 46 ${ISSM_DIR}/src/m/solve/*.m \ 47 ${ISSM_DIR}/src/m/solvers/*.m \ 48 ${ISSM_DIR}/src/m/materials/*.m 9 # TODO: There should be a better way of doing this so that manual updating is 10 # not required when a new subdirectory or module is introduced (search 11 # all subdirectories for file type, checking against an exclude list) 12 bin_SCRIPTS += \ 13 ${ISSM_DIR}/src/m/archive/*.m \ 14 ${ISSM_DIR}/src/m/array/*.m \ 15 ${ISSM_DIR}/src/m/boundaryconditions/*.m \ 16 ${ISSM_DIR}/src/m/classes/*.m \ 17 ${ISSM_DIR}/src/m/classes/clusters/*.m \ 18 ${ISSM_DIR}/src/m/classes/qmu/*.m \ 19 ${ISSM_DIR}/src/m/classes/qmu/dakota_method/*.m \ 20 ${ISSM_DIR}/src/m/consistency/*.m \ 21 ${ISSM_DIR}/src/m/coordsystems/*.m \ 22 ${ISSM_DIR}/src/m/dev/issmversion.m \ 23 ${ISSM_DIR}/src/m/exp/*.m \ 24 ${ISSM_DIR}/src/m/exp/operation/*.m \ 25 ${ISSM_DIR}/src/m/extrusion/*.m \ 26 ${ISSM_DIR}/src/m/geometry/*.m \ 27 ${ISSM_DIR}/src/m/interp/*.m \ 28 ${ISSM_DIR}/src/m/inversions/*.m \ 29 ${ISSM_DIR}/src/m/io/*.m \ 30 ${ISSM_DIR}/src/m/kml/*.m \ 31 ${ISSM_DIR}/src/m/materials/*.m \ 32 ${ISSM_DIR}/src/m/mech/*.m \ 33 ${ISSM_DIR}/src/m/mesh/*.m \ 34 ${ISSM_DIR}/src/m/mesh/planet/gmsh/*.m \ 35 ${ISSM_DIR}/src/m/mesh/planet/spheretri/*.m \ 36 ${ISSM_DIR}/src/m/mesh/rifts/*.m \ 37 ${ISSM_DIR}/src/m/miscellaneous/*.m \ 38 ${ISSM_DIR}/src/m/modules/*.m \ 39 ${ISSM_DIR}/src/m/os/*.m \ 40 ${ISSM_DIR}/src/m/parameterization/*.m \ 41 ${ISSM_DIR}/src/m/partition/*.m \ 42 ${ISSM_DIR}/src/m/plot/*.m \ 43 ${ISSM_DIR}/src/m/plot/colormaps/*.m \ 44 ${ISSM_DIR}/src/m/print/*.m \ 45 ${ISSM_DIR}/src/m/qmu/*.m \ 46 ${ISSM_DIR}/src/m/qmu/examples/*.m \ 47 ${ISSM_DIR}/src/m/qmu/plot/*.m \ 48 ${ISSM_DIR}/src/m/qmu/setupdesign/*.m \ 49 ${ISSM_DIR}/src/m/regional/*.m \ 50 ${ISSM_DIR}/src/m/solve/*.m \ 51 ${ISSM_DIR}/src/m/solvers/*.m \ 52 ${ISSM_DIR}/src/m/string/*.m 49 53 endif 50 54 endif 55 51 56 if PYTHON 52 57 if !DEVELOPMENT 53 bin_SCRIPTS += ${ISSM_DIR}/src/m/archive/*.py \ 54 ${ISSM_DIR}/src/m/classes/*.py \ 55 ${ISSM_DIR}/src/m/classes/clusters/*.py \ 56 ${ISSM_DIR}/src/m/consistency/*.py \ 57 ${ISSM_DIR}/src/m/dev/issmversion.py \ 58 ${ISSM_DIR}/src/m/boundaryconditions/*.py \ 59 ${ISSM_DIR}/src/m/exp/*.py \ 60 ${ISSM_DIR}/src/m/geometry/*.py \ 61 ${ISSM_DIR}/src/m/coordsystems/*.py \ 62 ${ISSM_DIR}/src/m/interp/*.py \ 63 ${ISSM_DIR}/src/m/inversions/*.py \ 64 ${ISSM_DIR}/src/m/mech/*.py \ 65 ${ISSM_DIR}/src/m/mesh/*.py \ 66 ${ISSM_DIR}/src/m/mesh/rifts/*.py \ 67 ${ISSM_DIR}/src/m/mesh/planet/gmsh/*.py \ 68 ${ISSM_DIR}/src/m/miscellaneous/*.py \ 69 ${ISSM_DIR}/src/m/modules/*.py \ 70 ${ISSM_DIR}/src/m/os/*.py \ 71 ${ISSM_DIR}/src/m/plot/*.py \ 72 ${ISSM_DIR}/src/m/extrusion/*.py \ 73 ${ISSM_DIR}/src/m/io/*.py \ 74 ${ISSM_DIR}/src/m/parameterization/*.py \ 75 ${ISSM_DIR}/src/m/solve/*.py \ 76 ${ISSM_DIR}/src/m/solvers/*.py \ 77 ${ISSM_DIR}/src/m/materials/*.py 58 # TODO: There should be a better way of doing this so that manual updating is 59 # not required when a new subdirectory or module is introduced (search 60 # all subdirectories for file type, checking against an exclude list) 61 bin_SCRIPTS += \ 62 ${ISSM_DIR}/src/m/archive/*.py \ 63 ${ISSM_DIR}/src/m/array/*.py \ 64 ${ISSM_DIR}/src/m/boundaryconditions/*.py \ 65 ${ISSM_DIR}/src/m/classes/*.py \ 66 ${ISSM_DIR}/src/m/classes/clusters/*.py \ 67 ${ISSM_DIR}/src/m/classes/qmu/*.py \ 68 ${ISSM_DIR}/src/m/classes/qmu/dakota_method/*.py \ 69 ${ISSM_DIR}/src/m/consistency/*.py \ 70 ${ISSM_DIR}/src/m/coordsystems/*.py \ 71 ${ISSM_DIR}/src/m/dev/issmversion.py \ 72 ${ISSM_DIR}/src/m/exp/*.py \ 73 ${ISSM_DIR}/src/m/extrusion/*.py \ 74 ${ISSM_DIR}/src/m/geometry/*.py \ 75 ${ISSM_DIR}/src/m/interp/*.py \ 76 ${ISSM_DIR}/src/m/inversions/*.py \ 77 ${ISSM_DIR}/src/m/io/*.py \ 78 ${ISSM_DIR}/src/m/materials/*.py \ 79 ${ISSM_DIR}/src/m/mech/*.py \ 80 ${ISSM_DIR}/src/m/mesh/*.py \ 81 ${ISSM_DIR}/src/m/mesh/planet/gmsh/*.py \ 82 ${ISSM_DIR}/src/m/mesh/rifts/*.py \ 83 ${ISSM_DIR}/src/m/miscellaneous/*.py \ 84 ${ISSM_DIR}/src/m/modules/*.py \ 85 ${ISSM_DIR}/src/m/os/*.py \ 86 ${ISSM_DIR}/src/m/parameterization/*.py \ 87 ${ISSM_DIR}/src/m/partition/*.py \ 88 ${ISSM_DIR}/src/m/plot/*.py \ 89 ${ISSM_DIR}/src/m/plot/colormaps/*.py \ 90 ${ISSM_DIR}/src/m/qmu/*.py \ 91 ${ISSM_DIR}/src/m/qmu/setupdesign/*.py \ 92 ${ISSM_DIR}/src/m/shp/*.py \ 93 ${ISSM_DIR}/src/m/solve/*.py \ 94 ${ISSM_DIR}/src/m/solvers/*.py 78 95 endif 79 96 endif … … 81 98 if JAVASCRIPT 82 99 if !DEVELOPMENT 83 84 js_scripts = ${ISSM_DIR}/src/m/array/*.js \ 85 ${ISSM_DIR}/src/m/boundaryconditions/*.js \ 86 ${ISSM_DIR}/src/m/classes/*.js \ 87 ${ISSM_DIR}/src/m/classes/clusters/*.js \ 88 ${ISSM_DIR}/src/m/consistency/*.js \ 89 ${ISSM_DIR}/src/m/exp/*.js \ 90 ${ISSM_DIR}/src/m/extrusion/*.js \ 91 ${ISSM_DIR}/src/m/geometry/*.js \ 92 ${ISSM_DIR}/src/m/inversions/*.js \ 93 ${ISSM_DIR}/src/m/io/*.js \ 94 ${ISSM_DIR}/src/m/materials/*.js \ 95 ${ISSM_DIR}/src/m/mesh/*.js \ 96 ${ISSM_DIR}/src/m/miscellaneous/*.js \ 97 ${ISSM_DIR}/src/m/parameterization/*.js \ 98 ${ISSM_DIR}/src/m/plot/*.js \ 99 ${ISSM_DIR}/src/m/print/*.js \ 100 ${ISSM_DIR}/src/m/shp/*.js \ 101 ${ISSM_DIR}/src/m/solve/*.js \ 102 ${ISSM_DIR}/src/m/solvers/*.js 100 # TODO: There should be a better way of doing this so that manual updating is 101 # not required when a new subdirectory or module is introduced (search 102 # all subdirectories for file type, checking against an exclude list) 103 js_scripts = \ 104 ${ISSM_DIR}/src/m/array/*.js \ 105 ${ISSM_DIR}/src/m/boundaryconditions/*.js \ 106 ${ISSM_DIR}/src/m/classes/*.js \ 107 ${ISSM_DIR}/src/m/classes/clusters/*.js \ 108 ${ISSM_DIR}/src/m/consistency/*.js \ 109 ${ISSM_DIR}/src/m/exp/*.js \ 110 ${ISSM_DIR}/src/m/extrusion/*.js \ 111 ${ISSM_DIR}/src/m/geometry/*.js \ 112 ${ISSM_DIR}/src/m/inversions/*.js \ 113 ${ISSM_DIR}/src/m/io/*.js \ 114 ${ISSM_DIR}/src/m/materials/*.js \ 115 ${ISSM_DIR}/src/m/mesh/*.js \ 116 ${ISSM_DIR}/src/m/miscellaneous/*.js \ 117 ${ISSM_DIR}/src/m/parameterization/*.js \ 118 ${ISSM_DIR}/src/m/plot/*.js \ 119 ${ISSM_DIR}/src/m/print/*.js \ 120 ${ISSM_DIR}/src/m/shp/*.js \ 121 ${ISSM_DIR}/src/m/solve/*.js \ 122 ${ISSM_DIR}/src/m/solvers/*.js 103 123 bin_SCRIPTS += issm-bin.js 104 124 -
issm/trunk-jpl/src/m/classes/clusters/generic.m
r24497 r24593 6 6 7 7 classdef generic 8 properties (SetAccess=public) 8 properties (SetAccess=public) 9 9 % {{{ 10 10 name = ''; … … 75 75 %}}} 76 76 function BuildQueueScript(cluster,dirname,modelname,solution,io_gather,isvalgrind,isgprof,isdakota,isoceancoupling) % {{{ 77 78 %write queuing script 79 %what is the executable being called? 80 executable='issm.exe'; 77 % Which executable are we calling? 78 executable='issm.exe'; % default 79 81 80 if isdakota, 82 version=IssmConfig('_DAKOTA_VERSION_'); version=str2num(version(1:3)); 81 version=IssmConfig('_DAKOTA_VERSION_'); 82 version=str2num(version(1:3)); 83 83 if (version>=6), 84 84 executable='issm_dakota.exe'; … … 90 90 91 91 if ~ispc(), 92 93 92 fid=fopen([modelname '.queue'],'w'); 94 93 fprintf(fid,'#!%s\n',cluster.shell); … … 112 111 %Add --gen-suppressions=all to get suppression lines 113 112 %fprintf(fid,'LD_PRELOAD=%s \\\n',cluster.valgrindlib); it could be deleted 114 if ismac, 113 if ismac, 115 114 if IssmConfig('_HAVE_MPI_'), 116 115 fprintf(fid,'mpiexec -np %i %s --leak-check=full --error-limit=no --dsymutil=yes --suppressions=%s %s/%s %s %s %s 2> %s.errlog >%s.outlog ',... … … 161 160 %}}} 162 161 function BuildQueueScriptMultipleModels(cluster,dirname,modelname,solution,dirnames,modelnames,nps) % {{{ 163 164 %some checks: 162 163 %some checks: 165 164 if isempty(modelname), error('BuildQueueScriptMultipleModels error message: need a non empty model name!');end 166 165 167 %what is the executable being called? 166 %what is the executable being called? 168 167 executable='issm_slr.exe'; 169 168 170 169 if ispc(), error('BuildQueueScriptMultipleModels not support yet on windows machines');end; 171 172 %write queuing script 170 171 %write queuing script 173 172 fid=fopen([modelname '.queue'],'w'); 174 173 175 174 fprintf(fid,'#!%s\n',cluster.shell); 176 175 177 %number of cpus: 176 %number of cpus: 178 177 mpistring=sprintf('mpiexec -np %i ',cluster.np); 179 178 180 %executable: 179 %executable: 181 180 mpistring=[mpistring sprintf('%s/%s ',cluster.codepath,executable)]; 182 183 %solution name: 181 182 %solution name: 184 183 mpistring=[mpistring sprintf('%s ',solution)]; 185 184 186 %execution directory and model name: 185 %execution directory and model name: 187 186 mpistring=[mpistring sprintf('%s/%s %s',cluster.executionpath,dirname,modelname)]; 188 187 189 %inform main executable of how many icecaps, glaciers and earth models are being run: 188 %inform main executable of how many icecaps, glaciers and earth models are being run: 190 189 mpistring=[mpistring sprintf(' %i ',length(dirnames))]; 191 190 192 191 %icecaps, glaciers and earth location, names and number of processors associated: 193 192 for i=1:length(dirnames), … … 195 194 end 196 195 197 %log files: 196 %log files: 198 197 if ~cluster.interactive, 199 198 mpistring=[mpistring sprintf('2> %s.errlog> %s.outlog',modelname,modelname)]; 200 199 end 201 200 202 %write this long string to disk: 201 %write this long string to disk: 203 202 fprintf(fid,mpistring); 204 203 fclose(fid); … … 213 212 function BuildQueueScriptIceOcean(cluster,dirname,modelname,solution,io_gather,isvalgrind,isgprof,isdakota) % {{{ 214 213 215 %write queuing script 216 %what is the executable being called? 214 %write queuing script 215 %what is the executable being called? 217 216 executable='issm_ocean.exe'; 218 217 … … 237 236 function BuildKrigingQueueScript(cluster,modelname,solution,io_gather,isvalgrind,isgprof) % {{{ 238 237 239 %write queuing script 238 %write queuing script 240 239 if ~ispc(), 241 240 -
issm/trunk-jpl/src/m/classes/clusters/generic.py
r24589 r24593 32 32 self.valgrindlib = '/usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so.20.10.1' 33 33 self.valgrindsup = [issmdir() + '/externalpackages/valgrind/issm.supp'] # add any .supp in list form as needed 34 self.verbose = 1 35 self.shell = '/bin/sh' 34 36 35 37 #use provided options to change fields … … 63 65 s += " valgrindlib: %s\n" % self.valgrindlib 64 66 s += " valgrindsup: %s\n" % self.valgrindsup 67 s += " verbose: %s\n" % self.verbose 68 s += " shell: %s\n" % self.shell 65 69 return s 66 70 # }}} … … 74 78 # }}} 75 79 def BuildQueueScript(self, dirname, modelname, solution, io_gather, isvalgrind, isgprof, isdakota, isoceancoupling): # {{{ 76 77 executable = 'issm.exe' 80 # Which executable are we calling? 81 executable = 'issm.exe' # default 82 78 83 if isdakota: 79 84 version = IssmConfig('_DAKOTA_VERSION_') … … 84 89 executable = 'issm_ocean.exe' 85 90 86 # write queuing script91 # Write queueing script 87 92 if not m.ispc(): 88 93 fid = open(modelname + '.queue', 'w') … … 191 196 print('launching solution sequence on remote cluster') 192 197 if restart: 193 launchcommand = 'cd {} && cd {} chmod 7 77{}.queue && ./{}.queue'.format(self.executionpath, dirname, modelname, modelname)198 launchcommand = 'cd {} && cd {} chmod 755 {}.queue && ./{}.queue'.format(self.executionpath, dirname, modelname, modelname) 194 199 else: 195 200 if batch: 196 201 launchcommand = 'cd {} && rm -rf ./{} && mkdir {} && cd {} && mv ../{}.tar.gz ./&& tar -zxf {}.tar.gz'.format(self.executionpath, dirname, dirname, dirname, dirname, dirname) 197 202 else: 198 launchcommand = 'cd {} && rm -rf ./{} && mkdir {} && cd {} && mv ../{}.tar.gz ./&& tar -zxf {}.tar.gz && chmod 7 77{}.queue && ./{}.queue'.format(self.executionpath, dirname, dirname, dirname, dirname, dirname, modelname, modelname)203 launchcommand = 'cd {} && rm -rf ./{} && mkdir {} && cd {} && mv ../{}.tar.gz ./&& tar -zxf {}.tar.gz && chmod 755 {}.queue && ./{}.queue'.format(self.executionpath, dirname, dirname, dirname, dirname, dirname, modelname, modelname) 199 204 issmssh(self.name, self.login, self.port, launchcommand) 200 205 # }}} -
issm/trunk-jpl/src/m/classes/clusters/generic_static.m
r21576 r24593 5 5 6 6 classdef generic_static 7 properties (SetAccess=public) 7 properties (SetAccess=public) 8 8 % {{{ 9 9 name=''; 10 10 np=1; 11 11 codepath=fileparts(which('issm.exe')); 12 executionpath ='.';13 interactive =1;12 executionpath='.'; 13 interactive=1; 14 14 shell='/bin/sh'; 15 15 %}}} … … 17 17 methods 18 18 function cluster=generic_static(varargin) % {{{ 19 20 19 %use provided options to change fields 21 20 options=pairoptions(varargin{:}); … … 50 49 %}}} 51 50 function BuildQueueScript(cluster,dirname,modelname,solution,io_gather,isvalgrind,isgprof,isdakota,isoceancoupling) % {{{ 51 % Which executable are we calling? 52 executable='issm.exe'; % default 52 53 53 %Check that issm.exe exists in the right path54 if ~exist([cluster.codepath '/issm.exe'],'file'),55 error(['File ' cluster.codepath '/issm.exe does not exist']);56 end57 58 %Now process codepath and replace empty spaces with \ to avoid errors in queuing script59 codepath2=strrep(cluster.codepath,' ','\ ');60 61 %write queuing script62 %what is the executable being called?63 executable='issm.exe';64 54 if isdakota, 65 version=IssmConfig('_DAKOTA_VERSION_'); version=str2num(version(1:3)); 55 version=IssmConfig('_DAKOTA_VERSION_'); 56 version=str2num(version(1:3)); 66 57 if (version>=6), 67 58 executable='issm_dakota.exe'; … … 72 63 end 73 64 74 %write queuing script 65 % Check that executable exists at the right path 66 if ~exist([cluster.codepath '/' executable],'file'), 67 error(['File ' cluster.codepath '/' executable ' does not exist']); 68 end 69 70 % Process codepath and prepend empty spaces with \ to avoid errors in queuing script 71 codepath=strrep(cluster.codepath,' ','\ '); 72 73 % Write queueing script 75 74 fid=fopen([modelname '.queue'],'w'); 76 75 fprintf(fid,'#!%s\n',cluster.shell); 77 fprintf(fid,['%s/mpiexec -np %i %s/%s %s %s %s \n'],codepath 2,cluster.np,codepath2,executable,solution,'./',modelname);76 fprintf(fid,['%s/mpiexec -np %i %s/%s %s %s %s \n'],codepath,cluster.np,codepath,executable,solution,'./',modelname); 78 77 fclose(fid); 79 78 80 %in interactive mode, create a run file, and errlog and outlog file 81 fid=fopen([modelname '.errlog'],'w'); fclose(fid); 82 fid=fopen([modelname '.outlog'],'w'); fclose(fid); 79 % Create an errlog and outlog file 80 fid=fopen([modelname '.errlog'],'w'); 81 fclose(fid); 82 fid=fopen([modelname '.outlog'],'w'); 83 fclose(fid); 83 84 end 84 85 %}}} 85 86 function UploadQueueJob(cluster,modelname,dirname,filelist)% {{{ 86 87 %do nothing87 % Do nothing 88 return; 88 89 end %}}} 89 90 function LaunchQueueJob(cluster,modelname,dirname,filelist,restart,batch)% {{{ 90 91 91 if ~ispc, 92 93 %figure out what shell extension we will use: 92 % Figure out which file extension to use 94 93 if isempty(strfind(cluster.shell,'csh')), 95 94 shellext='sh'; … … 106 105 end %}}} 107 106 function Download(cluster,dirname,filelist)% {{{ 108 %do nothing109 107 % Do nothing 108 return; 110 109 end %}}} 111 110 end -
issm/trunk-jpl/src/m/classes/model.py
r24576 r24593 144 144 'initialization', 145 145 'rifts', 146 'slr', 146 'slr', 147 147 'dsl', 148 148 'debug', … … 811 811 md.stressbalance.referential = project2d(md, md.stressbalance.referential, md.mesh.numberoflayers) 812 812 md.stressbalance.loadingforce = project2d(md, md.stressbalance.loadingforce, md.mesh.numberoflayers) 813 md.masstransport.spcthickness = project2d(md, md.masstransport.spcthickness, md.mesh.numberoflayers) 813 if np.size(md.masstransport.spcthickness) > 1: 814 md.masstransport.spcthickness = project2d(md, md.masstransport.spcthickness, md.mesh.numberoflayers) 815 if np.size(md.damage.spcdamage) > 1 and not np.isnan(md.damage.spcdamage).all(): 816 md.damage.spcdamage = project2d(md, md.damage.spcdamage, md.mesh.numberoflayers - 1) 817 if np.size(md.levelset.spclevelset) > 1: 818 md.levelset.spclevelset = project2d(md, md.levelset.spclevelset, md.mesh.numberoflayers - 1) 814 819 md.thermal.spctemperature = project2d(md, md.thermal.spctemperature, md.mesh.numberoflayers - 1) 815 if not np.isnan(md.damage.spcdamage).all():816 md.damage.spcdamage = project2d(md, md.damage.spcdamage, md.mesh.numberoflayers - 1)817 820 818 821 #materials -
issm/trunk-jpl/src/m/classes/qmu.m
r24465 r24593 5 5 6 6 classdef qmu 7 properties (SetAccess=public) 7 properties (SetAccess=public) 8 8 isdakota = 0; 9 9 output = 0; … … 87 87 end 88 88 if md.cluster.np<=1, 89 md = checkmessage(md,['in parallel library mode, Dakota needs to run on at least 2 cpus, 1 cpu for the master, 1 cpu for the slave. Modify md.clus er.np accordingly.']);90 end 91 89 md = checkmessage(md,['in parallel library mode, Dakota needs to run on at least 2 cpus, 1 cpu for the master, 1 cpu for the slave. Modify md.cluster.np accordingly.']); 90 end 91 92 92 if self.params.processors_per_evaluation<1, 93 93 md = checkmessage(md,['in parallel library mode, Dakota needs to run at least one slave on one cpu (md.qmu.params.processors_per_evaluation >=1)!']); 94 94 end 95 if mod(md.cluster.np-1,self.params.processors_per_evaluation), 95 if mod(md.cluster.np-1,self.params.processors_per_evaluation), 96 96 %md = checkmessage(md,['in parallel library mode, the requirement is for md.cluster.np = md.qmu.params.processors_per_evaluation * number_of_slaves, where number_of_slaves will automatically be determined by Dakota. Modify md.cluster.np accordingly']); 97 97 end 98 98 end 99 99 if ~isempty(md.qmu.vpartition) & ~any(isnan(md.qmu.vpartition)), 100 if size(md.qmu.vpartition,1)~=md.mesh.numberofvertices 100 if size(md.qmu.vpartition,1)~=md.mesh.numberofvertices 101 101 md = checkmessage(md,['user supplied vertex partition for qmu analysis should have size md.mesh.numberofvertices x 1']); 102 102 end … … 109 109 end 110 110 if ~isempty(md.qmu.epartition) & ~any(isnan(md.qmu.epartition)), 111 if size(md.qmu.epartition,1)~=md.mesh.numberofelements, 111 if size(md.qmu.epartition,1)~=md.mesh.numberofelements, 112 112 md = checkmessage(md,['user supplied element partition for qmu analysis should have size md.mesh.numberofelements x 1']); 113 113 end … … 157 157 end 158 158 end 159 fielddisplay(self,'numberofresponses','number of responses') 159 fielddisplay(self,'numberofresponses','number of responses') 160 160 for i=1:numel(self.method); 161 161 if strcmp(class(self.method(i)),'dakota_method') … … 194 194 fielddisplay(self,'vpartition','user provided mesh partitioning (vertex based)'); 195 195 fielddisplay(self,'epartition','user provided mesh partitioning (element based)'); 196 fielddisplay(self,'numberofpartitions','number of partitions for semi-discrete qmu') 196 fielddisplay(self,'numberofpartitions','number of partitions for semi-discrete qmu') 197 197 fielddisplay(self,'variabledescriptors',''); 198 198 fielddisplay(self,'responsedescriptors',''); … … 208 208 WriteData(fid,prefix,'object',self,'fieldname','isdakota','format','Boolean'); 209 209 WriteData(fid,prefix,'object',self,'fieldname','output','format','Boolean'); 210 if ~self.isdakota, 210 if ~self.isdakota, 211 211 WriteData(fid,prefix,'data',false,'name','md.qmu.mass_flux_segments_present','format','Boolean'); 212 return; 212 return; 213 213 end 214 214 WriteData(fid,prefix,'object',self,'fieldname','vpartition','format','DoubleMat','mattype',2); … … 218 218 WriteData(fid,prefix,'object',self,'fieldname','variabledescriptors','format','StringArray'); 219 219 WriteData(fid,prefix,'object',self,'fieldname','responsedescriptors','format','StringArray'); 220 if ~isempty(self.mass_flux_segments), 220 if ~isempty(self.mass_flux_segments), 221 221 WriteData(fid,prefix,'data',self.mass_flux_segments,'name','md.qmu.mass_flux_segments','format','MatArray'); 222 flag=true; 223 else 224 flag=false; 222 flag=true; 223 else 224 flag=false; 225 225 end 226 226 WriteData(fid,prefix,'data',flag,'name','md.qmu.mass_flux_segments_present','format','Boolean'); 227 227 end % }}} 228 228 function savemodeljs(self,fid,modelname) % {{{ 229 229 230 230 if self.isdakota, 231 231 error('qmu savemodeljs error message: not supported yet!'); -
issm/trunk-jpl/src/m/classes/qmu.py
r24452 r24593 149 149 150 150 if md.cluster.np <= 1: 151 md.checkmessage('in parallel library mode, Dakota needs to run on at least 2 cpus, 1 cpu for the master, 1 cpu for the slave. Modify md.clus er.np accordingly.')151 md.checkmessage('in parallel library mode, Dakota needs to run on at least 2 cpus, 1 cpu for the master, 1 cpu for the slave. Modify md.cluster.np accordingly.') 152 152 153 153 if self.params.processors_per_evaluation < 1: -
issm/trunk-jpl/src/m/miscellaneous/normfit_issm.py
r24213 r24593 5 5 6 6 def normfit_issm(x, alpha=None): 7 8 7 if alpha is None: 9 8 alpha = 0.05 -
issm/trunk-jpl/src/wrappers/matlab/Makefile.am
r23482 r24593 5 5 6 6 #define prefix (from http://www.gnu.org/software/autoconf/manual/autoconf-2.67/html_node/Defining-Directories.html) 7 AM_CPPFLAGS +=-DISSM_PREFIX='"$(prefix)"'7 AM_CPPFLAGS += -DISSM_PREFIX='"$(prefix)"' 8 8 9 9 #matlab io{{{ … … 12 12 else 13 13 noinst_LTLIBRARIES = libISSMMatlab.la 14 lib_LTLIBRARIES = 15 endif 16 17 io_sources= ./io/CheckNumMatlabArguments.cpp\ 18 ./io/WriteMatlabData.cpp\ 19 ./io/FetchMatlabData.cpp 20 21 ALLCXXFLAGS= -fPIC -D_WRAPPERS_ $(CXXFLAGS) $(CXXOPTFLAGS) 14 lib_LTLIBRARIES = 15 endif 16 17 io_sources = \ 18 ./io/CheckNumMatlabArguments.cpp \ 19 ./io/FetchMatlabData.cpp \ 20 ./io/WriteMatlabData.cpp 21 22 ALLCXXFLAGS= -fPIC -D_WRAPPERS_ $(CXXFLAGS) $(CXXOPTFLAGS) 22 23 23 24 libISSMMatlab_la_SOURCES = $(io_sources) … … 37 38 #}}} 38 39 #Wrappers {{{ 39 lib_LTLIBRARIES += BamgMesher_matlab.la\ 40 BamgConvertMesh_matlab.la\ 41 BamgTriangulate_matlab.la\ 42 ContourToMesh_matlab.la\ 43 ContourToNodes_matlab.la\ 44 DistanceToMaskBoundary_matlab.la\ 45 ElementConnectivity_matlab.la\ 46 ExpSimplify_matlab.la\ 47 ExpToLevelSet_matlab.la\ 48 InterpFromGridToMesh_matlab.la\ 49 InterpFromMeshToMesh2d_matlab.la\ 50 InterpFromMeshToMesh3d_matlab.la\ 51 InterpFromMeshToGrid_matlab.la\ 52 InterpFromMesh2d_matlab.la\ 53 IssmConfig_matlab.la\ 54 NodeConnectivity_matlab.la\ 55 M1qn3_matlab.la\ 56 MeshPartition_matlab.la\ 57 MeshProfileIntersection_matlab.la\ 58 PointCloudFindNeighbors_matlab.la\ 59 PropagateFlagsFromConnectivity_matlab.la\ 60 Triangle_matlab.la\ 61 ProcessRifts_matlab.la\ 62 Scotch_matlab.la 40 lib_LTLIBRARIES += \ 41 BamgMesher_matlab.la \ 42 BamgConvertMesh_matlab.la \ 43 BamgTriangulate_matlab.la \ 44 ContourToMesh_matlab.la \ 45 ContourToNodes_matlab.la \ 46 DistanceToMaskBoundary_matlab.la \ 47 ElementConnectivity_matlab.la \ 48 ExpSimplify_matlab.la \ 49 ExpToLevelSet_matlab.la \ 50 InterpFromGridToMesh_matlab.la \ 51 InterpFromMeshToMesh2d_matlab.la \ 52 InterpFromMeshToMesh3d_matlab.la \ 53 InterpFromMeshToGrid_matlab.la \ 54 InterpFromMesh2d_matlab.la \ 55 IssmConfig_matlab.la \ 56 NodeConnectivity_matlab.la \ 57 M1qn3_matlab.la \ 58 MeshPartition_matlab.la \ 59 MeshProfileIntersection_matlab.la \ 60 PointCloudFindNeighbors_matlab.la \ 61 PropagateFlagsFromConnectivity_matlab.la \ 62 Triangle_matlab.la \ 63 ProcessRifts_matlab.la \ 64 Scotch_matlab.la 63 65 64 66 if CHACO … … 66 68 endif 67 69 if KRIGING 68 lib_LTLIBRARIES += 70 lib_LTLIBRARIES += Kriging_matlab.la 69 71 endif 70 72 if KML … … 74 76 75 77 # Dependencies {{{ 76 deps = 78 deps = $(MATHLIB) 77 79 78 80 #Triangle library … … 81 83 #Matlab part 82 84 AM_LDFLAGS = -module $(MEXLINK) -shrext ${EXEEXT} --export-dynamic -rdynamic -no-undefined 83 if VERSION 84 AM_LDFLAGS += 85 else 85 86 if !VERSION 86 87 AM_LDFLAGS += -avoid-version 87 88 endif 88 89 89 90 if STANDALONE_MODULES 90 AM_LDFLAGS += -Wl,-static 91 endif 92 93 AM_CXXFLAGS += 91 AM_LDFLAGS += -Wl,-static -Wl,--disable-new-dtags -Wl,-rpath,'$$ORIGIN' 92 endif 93 94 AM_CXXFLAGS += -D_HAVE_MATLAB_MODULES_ -fPIC 94 95 95 96 deps += ./libISSMMatlab.la ../../c/libISSMModules.la ../../c/libISSMCore.la ./libISSMApi.la … … 111 112 112 113 #Optimization flags: 113 AM_CXXFLAGS += $(CXXOPTFLAGS) 114 AM_CXXFLAGS += $(CXXOPTFLAGS) 114 115 #}}} 115 116 # Module sources and dependencies {{{ 116 117 if !WINDOWS 117 libISSMMatlab_la_LIBADD = ./../../c/libISSMCore.la ./../../c/libISSMModules.la $(PETSCLIB) $( MPILIB) $(NEOPZLIB) $(MKLLIB) $(GSLLIB) $(PROJ4LIB) $(MATHLIB) $(MEXLIB)118 libISSMMatlab_la_LIBADD = ./../../c/libISSMCore.la ./../../c/libISSMModules.la $(PETSCLIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(MKLLIB) $(GSLLIB) $(PROJ4LIB) $(MATHLIB) $(MEXLIB) 118 119 endif 119 120 120 121 if STANDALONE_LIBRARIES 121 libISSMMatlab_la_LDFLAGS = -static 122 deps += $(PETSCLIB) $(TAOLIB) $(NEOPZLIB) $(M1QN3LIB) $(SEMICLIB) $(PLAPACKLIB) $(MUMPSLIB) $(SUPERLULIB) $(SPOOLESLIB) $(TRIANGLELIB) $(SCALAPACKLIB) $(BLACSLIB) $(HYPRELIB) $(SPAILIB) $(PROMETHEUSLIB) $(PASTIXLIB) $(MLLIB) $(DAKOTALIB) $(METISLIB) $(CHACOLIB) $(SCOTCHLIB) $(BLASLAPACKLIB) $(MKLLIB) $(MPILIB) $(MATHLIB) $(GRAPHICSLIB) $(MULTITHREADINGLIB) $(OSLIBS) $(GSLLIB) $(ADOLCLIB) $(AMPILIB) $(METEOIOLIB) $(SNOWPACKLIB) 123 endif 124 125 if !WINDOWS 126 libISSMApi_la_LIBADD = $(PETSCLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) $(MATHLIB) $(MEXLIB) 127 endif 128 129 if STANDALONE_LIBRARIES 130 libISSMApi_la_LDFLAGS = -static 131 endif 122 libISSMMatlab_la_LDFLAGS = -static 123 libISSMApi_la_LDFLAGS = -static 124 deps += $(PETSCLIB) $(TAOLIB) $(NEOPZLIB) $(M1QN3LIB) $(SEMICLIB) $(PLAPACKLIB) $(MUMPSLIB) $(SUPERLULIB) $(SPOOLESLIB) $(TRIANGLELIB) $(SCALAPACKLIB) $(BLACSLIB) $(HYPRELIB) $(SPAILIB) $(PROMETHEUSLIB) $(PASTIXLIB) $(MLLIB) $(DAKOTALIB) $(METISLIB) $(CHACOLIB) $(SCOTCHLIB) $(BLASLAPACKLIB) $(MKLLIB) $(MPILIB) $(MATHLIB) $(GRAPHICSLIB) $(MULTITHREADINGLIB) $(OSLIBS) $(GSLLIB) $(ADOLCLIB) $(AMPILIB) $(METEOIOLIB) $(SNOWPACKLIB) 125 endif 126 127 if !WINDOWS 128 libISSMApi_la_LIBADD = $(PETSCLIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) $(MATHLIB) $(MEXLIB) 129 endif 130 131 BamgConvertMesh_matlab_la_SOURCES = ../BamgConvertMesh/BamgConvertMesh.cpp 132 BamgConvertMesh_matlab_la_CXXFLAGS = ${AM_CXXFLAGS} 133 BamgConvertMesh_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) 132 134 133 135 BamgMesher_matlab_la_SOURCES = ../BamgMesher/BamgMesher.cpp 134 136 BamgMesher_matlab_la_CXXFLAGS = ${AM_CXXFLAGS} 135 BamgMesher_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) 136 137 BamgConvertMesh_matlab_la_SOURCES = ../BamgConvertMesh/BamgConvertMesh.cpp 138 BamgConvertMesh_matlab_la_CXXFLAGS = ${AM_CXXFLAGS} 139 BamgConvertMesh_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) 137 BamgMesher_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) 140 138 141 139 BamgTriangulate_matlab_la_SOURCES = ../BamgTriangulate/BamgTriangulate.cpp 142 140 BamgTriangulate_matlab_la_CXXFLAGS = ${AM_CXXFLAGS} 143 BamgTriangulate_matlab_la_LIBADD = ${deps} $(PETSCLIB) $( MPILIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB)141 BamgTriangulate_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) 144 142 145 143 if CHACO 146 144 Chaco_matlab_la_SOURCES = ../Chaco/Chaco.cpp 147 145 Chaco_matlab_la_CXXFLAGS = ${AM_CXXFLAGS} 148 Chaco_matlab_la_LIBADD = ${deps} $( MPILIB) $(CHACOLIB) $(GSLLIB) $(PROJ4LIB) $(PETSCLIB) $(NEOPZLIB)146 Chaco_matlab_la_LIBADD = ${deps} $(CHACOLIB) $(PETSCLIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) 149 147 endif 150 148 151 149 ContourToMesh_matlab_la_SOURCES = ../ContourToMesh/ContourToMesh.cpp 152 150 ContourToMesh_matlab_la_CXXFLAGS = ${AM_CXXFLAGS} 153 ContourToMesh_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(MPILIB) $(MULTITHREADINGLIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) 151 ContourToMesh_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(BLASLAPACKLIB) $(MPILIB) $(MULTITHREADINGLIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) 152 153 ContourToNodes_matlab_la_SOURCES = ../ContourToNodes/ContourToNodes.cpp 154 ContourToNodes_matlab_la_CXXFLAGS = ${AM_CXXFLAGS} 155 ContourToNodes_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) 156 157 DistanceToMaskBoundary_matlab_la_SOURCES = ../DistanceToMaskBoundary/DistanceToMaskBoundary.cpp 158 DistanceToMaskBoundary_matlab_la_CXXFLAGS = ${AM_CXXFLAGS} 159 DistanceToMaskBoundary_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) 160 161 ElementConnectivity_matlab_la_SOURCES = ../ElementConnectivity/ElementConnectivity.cpp 162 ElementConnectivity_matlab_la_CXXFLAGS = ${AM_CXXFLAGS} 163 ElementConnectivity_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) 154 164 155 165 ExpToLevelSet_matlab_la_SOURCES = ../ExpToLevelSet/ExpToLevelSet.cpp 156 166 ExpToLevelSet_matlab_la_CXXFLAGS = ${AM_CXXFLAGS} 157 ExpToLevelSet_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(MPILIB) $(MULTITHREADINGLIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) 158 159 ContourToNodes_matlab_la_SOURCES = ../ContourToNodes/ContourToNodes.cpp 160 ContourToNodes_matlab_la_CXXFLAGS = ${AM_CXXFLAGS} 161 ContourToNodes_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) 162 163 DistanceToMaskBoundary_matlab_la_SOURCES = ../DistanceToMaskBoundary/DistanceToMaskBoundary.cpp 164 DistanceToMaskBoundary_matlab_la_CXXFLAGS = ${AM_CXXFLAGS} 165 DistanceToMaskBoundary_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) 166 167 ElementConnectivity_matlab_la_SOURCES = ../ElementConnectivity/ElementConnectivity.cpp 168 ElementConnectivity_matlab_la_CXXFLAGS = ${AM_CXXFLAGS} 169 ElementConnectivity_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) 167 ExpToLevelSet_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(BLASLAPACKLIB) $(MPILIB) $(MULTITHREADINGLIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) 168 169 ExpSimplify_matlab_la_SOURCES = ../ExpSimplify/ExpSimplify.cpp 170 ExpSimplify_matlab_la_CXXFLAGS = ${AM_CXXFLAGS} 171 ExpSimplify_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) $(NEOPZLIB) 170 172 171 173 InterpFromGridToMesh_matlab_la_SOURCES = ../InterpFromGridToMesh/InterpFromGridToMesh.cpp 172 174 InterpFromGridToMesh_matlab_la_CXXFLAGS = ${AM_CXXFLAGS} 173 InterpFromGridToMesh_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(MPILIB) $(MULTITHREADINGLIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) 175 InterpFromGridToMesh_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(BLASLAPACKLIB) $(MPILIB) $(MULTITHREADINGLIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) 176 177 InterpFromMesh2d_matlab_la_SOURCES = ../InterpFromMesh2d/InterpFromMesh2d.cpp 178 InterpFromMesh2d_matlab_la_CXXFLAGS = ${AM_CXXFLAGS} 179 InterpFromMesh2d_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(BLASLAPACKLIB) $(MPILIB) $(MULTITHREADINGLIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) 180 181 InterpFromMeshToGrid_matlab_la_SOURCES = ../InterpFromMeshToGrid/InterpFromMeshToGrid.cpp 182 InterpFromMeshToGrid_matlab_la_CXXFLAGS = ${AM_CXXFLAGS} 183 InterpFromMeshToGrid_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(BLASLAPACKLIB) $(MPILIB) $(MULTITHREADINGLIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) 174 184 175 185 InterpFromMeshToMesh2d_matlab_la_SOURCES = ../InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp 176 186 InterpFromMeshToMesh2d_matlab_la_CXXFLAGS = ${AM_CXXFLAGS} 177 InterpFromMeshToMesh2d_matlab_la_LIBADD = ${deps} $(PETSCLIB) $( MPILIB) $(MULTITHREADINGLIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB)187 InterpFromMeshToMesh2d_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(BLASLAPACKLIB) $(MPILIB) $(MULTITHREADINGLIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) 178 188 179 189 InterpFromMeshToMesh3d_matlab_la_SOURCES = ../InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.cpp 180 190 InterpFromMeshToMesh3d_matlab_la_CXXFLAGS = ${AM_CXXFLAGS} 181 InterpFromMeshToMesh3d_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) 182 183 InterpFromMeshToGrid_matlab_la_SOURCES = ../InterpFromMeshToGrid/InterpFromMeshToGrid.cpp 184 InterpFromMeshToGrid_matlab_la_CXXFLAGS = ${AM_CXXFLAGS} 185 InterpFromMeshToGrid_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) 186 187 InterpFromMesh2d_matlab_la_SOURCES = ../InterpFromMesh2d/InterpFromMesh2d.cpp 188 InterpFromMesh2d_matlab_la_CXXFLAGS = ${AM_CXXFLAGS} 189 InterpFromMesh2d_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(MPILIB) $(MULTITHREADINGLIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) 191 InterpFromMeshToMesh3d_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(BLASLAPACKLIB) $(MPILIB) $(MULTITHREADINGLIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) 190 192 191 193 IssmConfig_matlab_la_SOURCES = ../IssmConfig/IssmConfig.cpp … … 193 195 IssmConfig_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(MPILIB) $(NEOPZLIB) 194 196 195 ExpSimplify_matlab_la_SOURCES = ../ExpSimplify/ExpSimplify.cpp196 ExpSimplify_matlab_la_CXXFLAGS = ${AM_CXXFLAGS}197 ExpSimplify_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) $(NEOPZLIB)198 199 197 Kriging_matlab_la_SOURCES = ../Kriging/Kriging.cpp 200 198 Kriging_matlab_la_CXXFLAGS = ${AM_CXXFLAGS} 201 Kriging_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) $(MULTITHREADINGLIB) $(GSLLIB) $(PROJ4LIB) 199 Kriging_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) $(MULTITHREADINGLIB) $(GSLLIB) $(PROJ4LIB) 200 201 M1qn3_matlab_la_SOURCES = ../M1qn3/M1qn3.cpp 202 M1qn3_matlab_la_CXXFLAGS = ${AM_CXXFLAGS} 203 M1qn3_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(BLASLAPACKLIB) $(MPILIB) $(METISLIB) $(M1QN3LIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) 202 204 203 205 MeshPartition_matlab_la_SOURCES = ../MeshPartition/MeshPartition.cpp 204 206 MeshPartition_matlab_la_CXXFLAGS = ${AM_CXXFLAGS} 205 MeshPartition_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(MPILIB) $(METISLIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) 206 207 M1qn3_matlab_la_SOURCES = ../M1qn3/M1qn3.cpp 208 M1qn3_matlab_la_CXXFLAGS = ${AM_CXXFLAGS} 209 M1qn3_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(MPILIB) $(METISLIB) $(M1QN3LIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) 207 MeshPartition_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(BLASLAPACKLIB) $(MPILIB) $(METISLIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) 210 208 211 209 MeshProfileIntersection_matlab_la_SOURCES = ../MeshProfileIntersection/MeshProfileIntersection.cpp 212 210 MeshProfileIntersection_matlab_la_CXXFLAGS = ${AM_CXXFLAGS} 213 MeshProfileIntersection_matlab_la_LIBADD = ${deps} $(PETSCLIB) $( MPILIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB)211 MeshProfileIntersection_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) 214 212 215 213 NodeConnectivity_matlab_la_SOURCES = ../NodeConnectivity/NodeConnectivity.cpp 216 214 NodeConnectivity_matlab_la_CXXFLAGS = ${AM_CXXFLAGS} 217 NodeConnectivity_matlab_la_LIBADD = ${deps} $(PETSCLIB) $( MPILIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB)215 NodeConnectivity_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) 218 216 219 217 PointCloudFindNeighbors_matlab_la_SOURCES = ../PointCloudFindNeighbors/PointCloudFindNeighbors.cpp 220 218 PointCloudFindNeighbors_matlab_la_CXXFLAGS = ${AM_CXXFLAGS} 221 PointCloudFindNeighbors_matlab_la_LIBADD = ${deps} $(PETSCLIB) $( MPILIB) $(MULTITHREADINGLIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB)219 PointCloudFindNeighbors_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(BLASLAPACKLIB) $(MPILIB) $(MULTITHREADINGLIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) 222 220 223 221 PropagateFlagsFromConnectivity_matlab_la_SOURCES = ../PropagateFlagsFromConnectivity/PropagateFlagsFromConnectivity.cpp 224 222 PropagateFlagsFromConnectivity_matlab_la_CXXFLAGS = ${AM_CXXFLAGS} 225 PropagateFlagsFromConnectivity_matlab_la_LIBADD = ${deps} $(PETSCLIB) $( MPILIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB)223 PropagateFlagsFromConnectivity_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) 226 224 227 225 Scotch_matlab_la_SOURCES = ../Scotch/Scotch.cpp 228 226 Scotch_matlab_la_CXXFLAGS = ${AM_CXXFLAGS} 229 Scotch_matlab_la_LIBADD = ${deps} $(SCOTCHLIB) $(PETSCLIB) $(MPILIB) $(NEOPZLIB) $(BLASLAPACKLIB)227 Scotch_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(SCOTCHLIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(BLASLAPACKLIB) 230 228 231 229 ShpRead_matlab_la_SOURCES = ../ShpRead/ShpRead.cpp 232 230 ShpRead_matlab_la_CXXFLAGS = ${AM_CXXFLAGS} 233 ShpRead_matlab_la_LIBADD = ${deps} $(SHAPELIBLIB) $(PETSCLIB) $( MPILIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB)231 ShpRead_matlab_la_LIBADD = ${deps} $(SHAPELIBLIB) $(PETSCLIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) 234 232 235 233 Triangle_matlab_la_SOURCES = ../Triangle/Triangle.cpp 236 234 Triangle_matlab_la_CXXFLAGS = ${AM_CXXFLAGS} 237 Triangle_matlab_la_LIBADD = ${deps} $( PETSCLIB) $(MPILIB) $(TRIANGLELIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB)235 Triangle_matlab_la_LIBADD = ${deps} $(TRIANGLELIB) $(PETSCLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) 238 236 239 237 ProcessRifts_matlab_la_SOURCES = ../ProcessRifts/ProcessRifts.cpp 240 238 ProcessRifts_matlab_la_CXXFLAGS = ${AM_CXXFLAGS} 241 ProcessRifts_matlab_la_LIBADD = ${deps} $(PETSCLIB) $( MPILIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB)242 #}}} 239 ProcessRifts_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) 240 #}}} -
issm/trunk-jpl/src/wrappers/python/Makefile.am
r24027 r24593 5 5 6 6 #define prefix (from http://www.gnu.org/software/autoconf/manual/autoconf-2.67/html_node/Defining-Directories.html) 7 AM_CPPFLAGS +=-DISSM_PREFIX='"$(prefix)"'7 AM_CPPFLAGS += -DISSM_PREFIX='"$(prefix)"' 8 8 9 9 #python io{{{ 10 10 lib_LTLIBRARIES = libISSMPython.la 11 11 12 io_sources= ./io/WritePythonData.cpp\ 13 ./io/CheckNumPythonArguments.cpp\ 14 ./io/FetchPythonData.cpp 12 io_sources = \ 13 ./io/CheckNumPythonArguments.cpp \ 14 ./io/FetchPythonData.cpp \ 15 ./io/WritePythonData.cpp 15 16 16 ALLCXXFLAGS= -fPIC -D_WRAPPERS_ $(CXXFLAGS) $(CXXOPTFLAGS) 17 ALLCXXFLAGS= -fPIC -D_WRAPPERS_ $(CXXFLAGS) $(CXXOPTFLAGS) 18 17 19 libISSMPython_la_SOURCES = $(io_sources) 18 20 libISSMPython_la_CXXFLAGS= $(ALLCXXFLAGS) … … 20 22 #api io{{{ 21 23 lib_LTLIBRARIES += libISSMApi.la 22 23 api_sources= ./io/ApiPrintf.cpp 24 api_sources = ./io/ApiPrintf.cpp 24 25 25 26 libISSMApi_la_SOURCES = $(api_sources) … … 27 28 #}}} 28 29 #Wrappers {{{ 29 if WRAPPERS 30 lib_LTLIBRARIES += BamgConvertMesh_python.la\31 BamgMesher_python.la\32 BamgTriangulate_python.la\33 ContourToMesh_python.la\34 ContourToNodes_python.la\35 ElementConnectivity_python.la\36 ExpToLevelSet_python.la\37 InterpFromMeshToMesh2d_python.la\38 InterpFromMeshToMesh3d_python.la\39 InterpFromGridToMesh_python.la\40 InterpFromMeshToGrid_python.la\41 IssmConfig_python.la\42 MeshPartition_python.la\43 MeshProfileIntersection_python.la\44 NodeConnectivity_python.la\45 Triangle_python.la\46 30 lib_LTLIBRARIES += \ 31 BamgConvertMesh_python.la \ 32 BamgMesher_python.la \ 33 BamgTriangulate_python.la \ 34 ContourToMesh_python.la \ 35 ContourToNodes_python.la \ 36 ElementConnectivity_python.la \ 37 ExpToLevelSet_python.la \ 38 InterpFromMeshToMesh2d_python.la \ 39 InterpFromMeshToMesh3d_python.la \ 40 InterpFromGridToMesh_python.la \ 41 InterpFromMeshToGrid_python.la \ 42 IssmConfig_python.la \ 43 MeshPartition_python.la \ 44 MeshProfileIntersection_python.la \ 45 NodeConnectivity_python.la \ 46 Triangle_python.la \ 47 ProcessRifts_python.la 47 48 48 49 if CHACO 49 50 lib_LTLIBRARIES += Chaco_python.la 50 51 endif 51 endif52 52 #}}} 53 53 #Flags and libraries {{{ 54 deps = 54 deps = $(MATHLIB) ${PYTHONLIB} 55 55 56 56 #Triangle library 57 AM_CXXFLAGS = 57 AM_CXXFLAGS = -DTRILIBRARY -DANSI_DECLARATORS -DNO_TIMER -D_WRAPPERS_ 58 58 59 59 #Python part 60 AM_LDFLAGS = $(PYTHONLINK) -shrext ${EXEEXT} -module 61 if VERSION 62 AM_LDFLAGS += 63 else 60 AM_LDFLAGS = $(PYTHONLINK) -shrext ${EXEEXT} -module 61 62 if !VERSION 64 63 AM_LDFLAGS += -avoid-version 65 64 endif 66 65 67 66 if STANDALONE_MODULES 68 AM_LDFLAGS += -Wl,-static 67 AM_LDFLAGS += -Wl,-static -Wl,--disable-new-dtags -Wl,-rpath,'$$ORIGIN' 69 68 endif 70 69 71 deps += ./libISSMPython.la 72 AM_ LDFLAGS += --no-warnings70 AM_LDFLAGS += --no-warnings 71 AM_CXXFLAGS += -D_HAVE_PYTHON_MODULES_ -fPIC 73 72 74 AM_CXXFLAGS += -D_HAVE_PYTHON_MODULES_ -fPIC75 73 if PYTHON3 76 AM_CXXFLAGS += -DNPY_NO_DEPRECATED_API74 AM_CXXFLAGS += -DNPY_NO_DEPRECATED_API 77 75 endif 78 76 79 deps += ../../c/libISSMModules.la ../../c/libISSMCore.la 77 deps += ./libISSMPython.la ../../c/libISSMModules.la ../../c/libISSMCore.la ./libISSMApi.la 78 80 79 if ADOLC 81 80 deps += $(ADOLCLIB) 82 81 endif 83 82 84 deps += ./libISSMApi.la 85 86 if STANDALONE_LIBRARIES 87 libISSMPython_la_LDFLAGS = -static 88 endif 89 if STANDALONE_LIBRARIES 90 libISSMApi_la_LDFLAGS = -static 83 if FORTRAN 84 deps += $(FLIBS) $(FORTRANLIB) 91 85 endif 92 86 93 87 #Optimization flags: 94 AM_CXXFLAGS += $(CXXOPTFLAGS) 88 AM_CXXFLAGS += $(CXXOPTFLAGS) 95 89 #}}} 96 #Bin sources {{{ 90 # Module sources and dependencies {{{ 91 libISSMPython_la_LIBADD = ./../../c/libISSMCore.la ./../../c/libISSMModules.la $(PETSCLIB) $(MPILIB) $(NEOPZLIB) $(MKLLIB) $(GSLLIB) $(PROJ4LIB) $(MATHLIB) 92 93 if STANDALONE_LIBRARIES 94 libISSMPython_la_LDFLAGS = -static 95 libISSMApi_la_LDFLAGS = -static 96 deps += $(DAKOTALIB) $(PETSCLIB) $(TAOLIB) $(NEOPZLIB) $(M1QN3LIB) $(SEMICLIB) $(PLAPACKLIB) $(MUMPSLIB) $(SUPERLULIB) $(SPOOLESLIB) $(TRIANGLELIB) $(SCALAPACKLIB) $(BLACSLIB) $(HYPRELIB) $(SPAILIB) $(PROMETHEUSLIB) $(PASTIXLIB) $(MLLIB) $(METISLIB) $(CHACOLIB) $(SCOTCHLIB) $(BLASLAPACKLIB) $(MKLLIB) $(MPILIB) $(MATHLIB) $(GRAPHICSLIB) $(MULTITHREADINGLIB) $(OSLIBS) $(GSLLIB) $(ADOLCLIB) $(AMPILIB) $(METEOIOLIB) $(SNOWPACKLIB) 97 endif 98 99 libISSMApi_la_LIBADD = $(PETSCLIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) $(MATHLIB) 100 97 101 BamgConvertMesh_python_la_SOURCES = ../BamgConvertMesh/BamgConvertMesh.cpp 98 102 BamgConvertMesh_python_la_CXXFLAGS = ${AM_CXXFLAGS} 99 BamgConvertMesh_python_la_LIBADD = ${deps} $( MPILIB) $(PETSCLIB) $(GSLLIB) $(PROJ4LIB)103 BamgConvertMesh_python_la_LIBADD = ${deps} $(PETSCLIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) 100 104 101 105 BamgMesher_python_la_SOURCES = ../BamgMesher/BamgMesher.cpp 102 106 BamgMesher_python_la_CXXFLAGS = ${AM_CXXFLAGS} 103 BamgMesher_python_la_LIBADD = ${deps} $( MPILIB) $(PETSCLIB) $(GSLLIB) $(PROJ4LIB)107 BamgMesher_python_la_LIBADD = ${deps} $(PETSCLIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) 104 108 105 109 BamgTriangulate_python_la_SOURCES = ../BamgTriangulate/BamgTriangulate.cpp 106 110 BamgTriangulate_python_la_CXXFLAGS = ${AM_CXXFLAGS} 107 BamgTriangulate_python_la_LIBADD = ${deps} $( MPILIB) $(PETSCLIB) $(GSLLIB) $(PROJ4LIB)111 BamgTriangulate_python_la_LIBADD = ${deps} $(PETSCLIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) 108 112 109 113 if CHACO 110 114 Chaco_python_la_SOURCES = ../Chaco/Chaco.cpp 111 115 Chaco_python_la_CXXFLAGS = ${AM_CXXFLAGS} 112 Chaco_python_la_LIBADD = ${deps} $( MPILIB) $(CHACOLIB) $(PETSCLIB) $(GSLLIB) $(PROJ4LIB)116 Chaco_python_la_LIBADD = ${deps} $(CHACOLIB) $(PETSCLIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) 113 117 endif 114 118 115 119 ContourToMesh_python_la_SOURCES = ../ContourToMesh/ContourToMesh.cpp 116 120 ContourToMesh_python_la_CXXFLAGS = ${AM_CXXFLAGS} 117 ContourToMesh_python_la_LIBADD = ${deps} $( MPILIB) $(PETSCLIB) $(GSLLIB) $(PROJ4LIB)121 ContourToMesh_python_la_LIBADD = ${deps} $(PETSCLIB) $(BLASLAPACKLIB) $(MPILIB) $(MULTITHREADINGLIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) 118 122 119 123 ContourToNodes_python_la_SOURCES = ../ContourToNodes/ContourToNodes.cpp 120 124 ContourToNodes_python_la_CXXFLAGS = ${AM_CXXFLAGS} 121 ContourToNodes_python_la_LIBADD = ${deps} $( MPILIB) $(PETSCLIB) $(GSLLIB) $(PROJ4LIB)125 ContourToNodes_python_la_LIBADD = ${deps} $(PETSCLIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) 122 126 123 127 ElementConnectivity_python_la_SOURCES = ../ElementConnectivity/ElementConnectivity.cpp 124 128 ElementConnectivity_python_la_CXXFLAGS = ${AM_CXXFLAGS} 125 ElementConnectivity_python_la_LIBADD = ${deps} $( MPILIB) $(PETSCLIB) $(GSLLIB) $(PROJ4LIB)129 ElementConnectivity_python_la_LIBADD = ${deps} $(PETSCLIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) 126 130 127 131 ExpToLevelSet_python_la_SOURCES = ../ExpToLevelSet/ExpToLevelSet.cpp 128 132 ExpToLevelSet_python_la_CXXFLAGS = ${AM_CXXFLAGS} 129 ExpToLevelSet_python_la_LIBADD = ${deps} $( MPILIB) $(PETSCLIB) $(GSLLIB) $(PROJ4LIB)133 ExpToLevelSet_python_la_LIBADD = ${deps} $(PETSCLIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) $(NEOPZLIB) 130 134 135 InterpFromGridToMesh_python_la_SOURCES = ../InterpFromGridToMesh/InterpFromGridToMesh.cpp 136 InterpFromGridToMesh_python_la_CXXFLAGS = ${AM_CXXFLAGS} 137 InterpFromGridToMesh_python_la_LIBADD = ${deps} $(PETSCLIB) $(BLASLAPACKLIB) $(MPILIB) $(MULTITHREADINGLIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) 138 139 InterpFromMeshToGrid_python_la_SOURCES = ../InterpFromMeshToGrid/InterpFromMeshToGrid.cpp 140 InterpFromMeshToGrid_python_la_CXXFLAGS = ${AM_CXXFLAGS} 141 InterpFromMeshToGrid_python_la_LIBADD = ${deps} $(PETSCLIB) $(BLASLAPACKLIB) $(MPILIB) $(MULTITHREADINGLIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) 131 142 132 143 InterpFromMeshToMesh2d_python_la_SOURCES = ../InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp 133 144 InterpFromMeshToMesh2d_python_la_CXXFLAGS = ${AM_CXXFLAGS} 134 InterpFromMeshToMesh2d_python_la_LIBADD = ${deps} $( MPILIB) $(PETSCLIB) $(MULTITHREADINGLIB) $(GSLLIB) $(PROJ4LIB)145 InterpFromMeshToMesh2d_python_la_LIBADD = ${deps} $(PETSCLIB) $(BLASLAPACKLIB) $(MPILIB) $(MULTITHREADINGLIB) $(GSLLIB) $(PROJ4LIB) 135 146 136 147 InterpFromMeshToMesh3d_python_la_SOURCES = ../InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.cpp 137 148 InterpFromMeshToMesh3d_python_la_CXXFLAGS = ${AM_CXXFLAGS} 138 InterpFromMeshToMesh3d_python_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) $(MULTITHREADINGLIB) $(GSLLIB) $(PROJ4LIB) 139 140 InterpFromGridToMesh_python_la_SOURCES = ../InterpFromGridToMesh/InterpFromGridToMesh.cpp 141 InterpFromGridToMesh_python_la_CXXFLAGS = ${AM_CXXFLAGS} 142 InterpFromGridToMesh_python_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) $(MULTITHREADINGLIB) $(GSLLIB) $(PROJ4LIB) 143 144 InterpFromMeshToGrid_python_la_SOURCES = ../InterpFromMeshToGrid/InterpFromMeshToGrid.cpp 145 InterpFromMeshToGrid_python_la_CXXFLAGS = ${AM_CXXFLAGS} 146 InterpFromMeshToGrid_python_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) $(MULTITHREADINGLIB) $(GSLLIB) $(PROJ4LIB) 149 InterpFromMeshToMesh3d_python_la_LIBADD = ${deps} $(PETSCLIB) $(BLASLAPACKLIB) $(MPILIB) $(MULTITHREADINGLIB) $(GSLLIB) $(PROJ4LIB) 147 150 148 151 IssmConfig_python_la_SOURCES = ../IssmConfig/IssmConfig.cpp 149 152 IssmConfig_python_la_CXXFLAGS = ${AM_CXXFLAGS} 150 IssmConfig_python_la_LIBADD = ${deps} $( MPILIB) $(PETSCLIB)153 IssmConfig_python_la_LIBADD = ${deps} $(DAKOTALIB) $(PETSCLIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) 151 154 152 155 MeshPartition_python_la_SOURCES = ../MeshPartition/MeshPartition.cpp 153 156 MeshPartition_python_la_CXXFLAGS = ${AM_CXXFLAGS} 154 MeshPartition_python_la_LIBADD = ${deps} $( MPILIB) $(PETSCLIB) $(GSLLIB) $(PROJ4LIB)157 MeshPartition_python_la_LIBADD = ${deps} $(PETSCLIB) $(METISLIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) 155 158 156 159 MeshProfileIntersection_python_la_SOURCES = ../MeshProfileIntersection/MeshProfileIntersection.cpp 157 160 MeshProfileIntersection_python_la_CXXFLAGS = ${AM_CXXFLAGS} 158 MeshProfileIntersection_python_la_LIBADD = ${deps} $( MPILIB) $(PETSCLIB) $(GSLLIB) $(PROJ4LIB)161 MeshProfileIntersection_python_la_LIBADD = ${deps} $(PETSCLIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) 159 162 160 163 NodeConnectivity_python_la_SOURCES = ../NodeConnectivity/NodeConnectivity.cpp 161 164 NodeConnectivity_python_la_CXXFLAGS = ${AM_CXXFLAGS} 162 NodeConnectivity_python_la_LIBADD = ${deps} $( MPILIB) $(PETSCLIB) $(GSLLIB) $(PROJ4LIB)165 NodeConnectivity_python_la_LIBADD = ${deps} $(PETSCLIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) 163 166 164 167 Triangle_python_la_SOURCES = ../Triangle/Triangle.cpp 165 168 Triangle_python_la_CXXFLAGS = ${AM_CXXFLAGS} 166 Triangle_python_la_LIBADD = ${deps} $( MPILIB) $(PETSCLIB) $(TRIANGLELIB) $(GSLLIB) $(PROJ4LIB)169 Triangle_python_la_LIBADD = ${deps} $(TRIANGLELIB) $(PETSCLIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) 167 170 168 171 ProcessRifts_python_la_SOURCES = ../ProcessRifts/ProcessRifts.cpp 169 172 ProcessRifts_python_la_CXXFLAGS = ${AM_CXXFLAGS} 170 ProcessRifts_python_la_LIBADD = ${deps} $( MPILIB) $(PETSCLIB) $(GSLLIB) $(PROJ4LIB)173 ProcessRifts_python_la_LIBADD = ${deps} $(PETSCLIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB) $(PROJ4LIB) 171 174 #}}}
Note:
See TracChangeset
for help on using the changeset viewer.