Ignore:
Timestamp:
06/01/22 05:01:48 (3 years ago)
Author:
Mathieu Morlighem
Message:

merged trunk-jpl and trunk for revision 27033

Location:
issm/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk

  • TabularUnified issm/trunk/externalpackages/dakota/install-6.2-pleiades.sh

    r26744 r27035  
    22set -eu
    33
    4 #Some cleanup
    5 rm -rf Dakota
    6 rm -rf src
    7 rm -rf build
    8 rm -rf install
    9 mkdir src build install
    104
    11 #Download from ISSM server
    12 $ISSM_DIR/scripts/DownloadExternalPackage.sh 'https://issm.ess.uci.edu/files/externalpackages/dakota-6.2-public.src.tar.gz' 'dakota-6.2-public-src.tar.gz'
     5## Constants
     6#
     7VER="6.2"
    138
    14 #Untar
    15 tar -zxvf dakota-6.2-public-src.tar.gz
     9PREFIX="${ISSM_DIR}/externalpackages/dakota/install" # Set to location where external package should be installed
    1610
    17 #Move Dakota to src directory
    18 mv dakota-6.2.0.src/* src
    19 rm -rf dakota-6.2.0.src
     11## Environment
     12#
     13export BLAS_LIBS="-L/nasa/intel/Compiler/2018.3.222/compilers_and_libraries_2018.3.222/linux/mkl/lib/intel64/ -lmkl_intel_lp64 -lmkl_sequential -lmkl_core" # Need to export BLAS_LIBS *and* pass it as an option to CMake to ensure that external packages also find it; should upate to /nasa/intel/Compiler/2021.4.0/mkl/2021.4.0/lib/intel64
     14export CXXFLAGS='-std=c++11'
     15export DAK_BUILD=${ISSM_DIR}/externalpackages/dakota/build # DO NOT CHANGE THIS
     16export DAK_INSTALL=${PREFIX} # DO NOT CHANGE THIS
     17export DAK_SRC=${ISSM_DIR}/externalpackages/dakota/src # DO NOT CHANGE THIS
     18export LAPACK_LIBS="-L/nasa/intel/Compiler/2018.3.222/compilers_and_libraries_2018.3.222/linux/mkl/lib/intel64/lib/intel64/ -lmkl_intel_lp64 -lmkl_sequential -lmkl_core" # Need to export LAPACK_LIBS *and* pass it as an option to CMake to ensure that external packages also find it; should upate to /nasa/intel/Compiler/2021.4.0/mkl/2021.4.0/lib/intel64
    2019
    21 #Set up Dakota cmake variables and config
    22 export DAK_SRC=$ISSM_DIR/externalpackages/dakota/src
    23 export DAK_BUILD=$ISSM_DIR/externalpackages/dakota/build
    24 cp $DAK_SRC/cmake/BuildDakotaTemplate.cmake $DAK_SRC/cmake/BuildDakotaCustom.cmake
    25 patch $DAK_SRC/cmake/BuildDakotaCustom.cmake configs/6.2/BuildDakotaCustom.cmake.pfe.patch
    26 patch $DAK_SRC/cmake/DakotaDev.cmake configs/6.2/DakotaDev.cmake.patch
    27 patch $DAK_SRC/CMakeLists.txt configs/6.2/CMakeLists.txt.pfe.patch
     20# Cleanup
     21rm -rf ${DAK_BUILD} ${DAK_INSTALL} ${DAK_SRC}
     22mkdir -p ${DAK_BUILD} ${DAK_INSTALL} ${DAK_SRC}
    2823
    29 #Apply patches
    30 patch src/src/NonDSampling.cpp configs/6.2/NonDSampling.cpp.patch
    31 patch src/src/NonDLocalReliability.cpp configs/6.2/NonDLocalReliability.cpp.patch
    32 patch src/packages/pecos/src/pecos_global_defs.hpp configs/6.2/pecos_global_defs.hpp.patch
     24# Download source
     25${ISSM_DIR}/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/dakota-${VER}-public.src.tar.gz" "dakota-${VER}-public-src.tar.gz"
    3326
    34 #Configure dakota
    35 cd $DAK_BUILD
     27# Unpack source
     28tar -zxvf dakota-${VER}-public-src.tar.gz
    3629
     30# Move source to 'src' directory
     31mv dakota-${VER}.0.src/* ${DAK_SRC}
     32rm -rf dakota-${VER}.0.src
     33
     34# Copy customized source and configuration files to 'src' directory
     35cp configs/${VER}/packages/DDACE/src/Analyzer/MainEffectsExcelOutput.cpp ${DAK_SRC}/packages/DDACE/src/Analyzer
     36cp configs/${VER}/packages/queso/src/misc/src/1DQuadrature.C ${DAK_SRC}/packages/queso/src/misc/src
     37cp configs/${VER}/packages/surfpack/src/surfaces/nkm/NKM_KrigingModel.cpp ${DAK_SRC}/packages/surfpack/src/surfaces/nkm
     38cp configs/${VER}/packages/VPISparseGrid/src/sandia_rules.cpp ${DAK_SRC}/packages/VPISparseGrid/src
     39cp configs/${VER}/src/DakotaInterface.cpp ${DAK_SRC}/src
     40cp configs/${VER}/src/NonDLocalReliability.cpp ${DAK_SRC}/src
     41cp configs/${VER}/src/NonDSampling.cpp ${DAK_SRC}/src
     42
     43# Copy customized source and configuration files specific to Linux to 'src' directory
     44cp configs/${VER}/linux/cmake/BuildDakotaCustom.pleiades.cmake ${DAK_SRC}/cmake/BuildDakotaCustom.cmake
     45cp configs/${VER}/linux/cmake/DakotaDev.cmake ${DAK_SRC}/cmake
     46
     47# Configure
     48cd ${DAK_BUILD}
    3749cmake \
    3850        -DBUILD_SHARED_LIBS=ON \
    3951        -DBUILD_STATIC_LIBS=OFF \
    4052        -DCMAKE_C_COMPILER=mpicc \
     53        -DCMAKE_C_FLAGS="-Wno-error=implicit-function-declaration" \
    4154        -DCMAKE_CXX_COMPILER=mpicxx \
    42         -DCMAKE_Fortran_COMPILER=mpif77 \
     55        -DCMAKE_Fortran_COMPILER=/usr/bin/gfortran \
    4356        -DBoost_NO_BOOST_CMAKE=TRUE \
    4457        -DHAVE_ACRO=OFF \
     
    5063        ${DAK_SRC}
    5164
    52 cd ..
    53 
    54 #Compile and install dakota
    55 cd $DAK_BUILD
    56 if [ $# -eq 0 ];
    57 then
     65# Compile and install
     66if [ $# -eq 0 ]; then
    5867        make
    5968        make install
     
    6271        make -j $1 install
    6372fi
    64 cd ..
     73
     74cd ${DAK_INSTALL}
     75
     76# Comment out definition of HAVE_MPI in Teuchos config header file in order to
     77# avoid conflict with our definition
     78sed -i -e "s/#define HAVE_MPI/\/* #define HAVE_MPI *\//g" include/Teuchos_config.h
Note: See TracChangeset for help on using the changeset viewer.