diff --git a/archer2/README.md b/archer2/README.md index a6b65ae..06f1ebc 100644 --- a/archer2/README.md +++ b/archer2/README.md @@ -54,7 +54,24 @@ Modulefiles are installed to ## Library modules (formerly TPSL) -Some details for each package will appear here. +Some details for each package appear in the respective directories. + +### Post upgrade 2023 + +| Package | Version | Dependencies | OpenMP? | MPI? | +|--------------|----------|-------------------------|---------|------| +| hypre | 2.25.0 | none | yes | yes | +| matio | 1.5.23 | none | no | no | +| metis | 5.1.0 | none | yes | no | +| mumps | 5.5.1 | metis, parmetis, scotch | yes | yes | +| parmetis | 4.0.3 | none | yes | yes | +| scotch | 7.0.3 | none | no | yes | +| sundials | 4.1.0 | none | yes | yes | +| superlu | 5.3.0 | none | no | no | +| superlu-dist | 8.1.2 | metis, parmetis | yes | yes | + + +### Pre-upgrade 2023 | Package | Version | Dependencies | OpenMP? | MPI? | |--------------|----------|-------------------------|---------|------| @@ -69,8 +86,27 @@ Some details for each package will appear here. | superlu | 5.2.2 | none | no | no | | superlu-dist | 6.4.0 | metis, parmetis | yes | yes | + ## Library modules (others via pe-scripts) +### Post upgrade 2023 + +| Package | Version | Dependencies | OpenMP? | MPI? | +|--------------|----------|----------------------------|---------|------| +| adios | PENDING | cray-hdf5-parallel | no | yes | +| boost | 1.81.0 | none | no | yes | +| petsc | 3.18.5 | superlu, superlu-dist, | no | yes | +| | | metis, parmetis, scotch, | | | +| | | mumps, hypre, | | | +| | | cray-hdf5-parallel | | | +| slepc | 3.18.3 | petsc | no | yes | +| trilinos | 13.4.1 | cray-hdf5-parallel | yes | yes | +| | | cray-netcdf-hdf5parallel | | | +| | | tpsl (bar hypre,sundials | | | +| | | and glm) boost | | | + +### Pre upgrade 2023 + | Package | Version | Dependencies | OpenMP? | MPI? | |--------------|----------|----------------------------|---------|------| | adios | 1.13.1 | cray-hdf5-parallel | no | yes | @@ -85,6 +121,7 @@ Some details for each package will appear here. | | | tpsl (bar hypre,sundials) | | | | | | boost | | | + ## Library modules (other CSE) | Package | Version | Dependencies | OpenMP? | MPI? | diff --git a/archer2/command_line.sh b/archer2/command_line.sh index db6d8e6..27156ed 100644 --- a/archer2/command_line.sh +++ b/archer2/command_line.sh @@ -5,9 +5,12 @@ set -e # Switch off paging (esp. for long listings) export LMOD_PAGER="None" +# Library versions +source $(pwd)/archer2/versions.sh + # Default location, PE cse_root=/work/y07/shared -cpe_version=21.04 +cpe_version=22.12 # Common functions plus command line argument processing diff --git a/archer2/libraries/adios/build-adios.sh b/archer2/libraries/adios/build-adios.sh index 03a11c6..2d7980a 100644 --- a/archer2/libraries/adios/build-adios.sh +++ b/archer2/libraries/adios/build-adios.sh @@ -32,17 +32,12 @@ function adiosLoadModuleDependencies { moduleUseLibs module load cmake - # While AOCC pending pkgconfig fix - #module load cray-hdf5-parallel/${CRAY_HDF5_PARALLEL_VERSION} - module load epcc-cray-hdf5-parallel/${CRAY_HDF5_PARALLEL_VERSION} + module load cray-hdf5-parallel/${CRAY_HDF5_PARALLEL_VERSION} } function adiosUnloadModuleDependencies { - - module unload epcc-cray-hdf5-parallel - # While AOCC pending pkgconfig fix - #module unload cray-hdf5-parallel + module unload cray-hdf5-parallel module unload cmake } diff --git a/archer2/libraries/adios/module_preamble.lua b/archer2/libraries/adios/module_preamble.lua index 9372b80..d39ad51 100755 --- a/archer2/libraries/adios/module_preamble.lua +++ b/archer2/libraries/adios/module_preamble.lua @@ -5,7 +5,7 @@ family("adios") prereq_any("PrgEnv-cray", "PrgEnv-gnu", "PrgEnv-aocc") -depends_on("epcc-cray-hdf5-parallel/1.12.0.3") +depends_on("cray-hdf5-parallel") -- This is introspection; may want to set explicitly. diff --git a/archer2/libraries/boost/build-boost.sh b/archer2/libraries/boost/build-boost.sh index 4c7db67..5b71463 100644 --- a/archer2/libraries/boost/build-boost.sh +++ b/archer2/libraries/boost/build-boost.sh @@ -7,7 +7,6 @@ script_dir="$(dirname "${script}")" script_root="$(dirname "${script%/*/*}")" source ${script_root}/pkgconfig-lib.sh -source ${script_root}/versions.sh source ${script_root}/command_line.sh function main { @@ -90,10 +89,10 @@ function boostBuild { # Eliminate all shared libraries for now IFS="." read -r -a mmp <<< "${BOOST_VERSION}" - rm ${prefix}/lib/lib*.so - rm ${prefix}/lib/lib*.so.${mmp[0]} - rm ${prefix}/lib/lib*.so.${mmp[0]}.${mmp[1]} - rm ${prefix}/lib/lib*.so.${mmp[0]}.${mmp[1]}.${mmp[2]} + rm -f ${prefix}/lib/lib*.so + rm -f ${prefix}/lib/lib*.so.${mmp[0]} + rm -f ${prefix}/lib/lib*.so.${mmp[0]}.${mmp[1]} + rm -f ${prefix}/lib/lib*.so.${mmp[0]}.${mmp[1]}.${mmp[2]} } diff --git a/archer2/libraries/hypre/build-hypre.sh b/archer2/libraries/hypre/build-hypre.sh index b68efbf..74850f0 100644 --- a/archer2/libraries/hypre/build-hypre.sh +++ b/archer2/libraries/hypre/build-hypre.sh @@ -7,7 +7,6 @@ script_dir="$(dirname "${script}")" script_root="$(dirname "${script%/*/*}")" source ${script_root}/pkgconfig-lib.sh -source ${script_root}/versions.sh source ${script_root}/command_line.sh function main { diff --git a/archer2/libraries/matio/build-matio.sh b/archer2/libraries/matio/build-matio.sh index 663320c..0dcdcdb 100644 --- a/archer2/libraries/matio/build-matio.sh +++ b/archer2/libraries/matio/build-matio.sh @@ -7,7 +7,6 @@ script_dir="$(dirname "${script}")" script_root="$(dirname "${script%/*/*}")" source ${script_root}/pkgconfig-lib.sh -source ${script_root}/versions.sh source ${script_root}/command_line.sh function main { diff --git a/archer2/libraries/metis/build-metis.sh b/archer2/libraries/metis/build-metis.sh index 9561e69..6a0c86e 100644 --- a/archer2/libraries/metis/build-metis.sh +++ b/archer2/libraries/metis/build-metis.sh @@ -11,7 +11,6 @@ script_dir="$(dirname "${script}")" script_root="$(dirname "${script%/*/*}")" source ${script_root}/pkgconfig-lib.sh -source ${script_root}/versions.sh source ${script_root}/command_line.sh function main { @@ -26,6 +25,8 @@ function main { metisInstallModuleFileLua metisInstallationTest + + printf "Installation of metis complete\n" } function metisBuildAocc { diff --git a/archer2/libraries/mumps/build-mumps.sh b/archer2/libraries/mumps/build-mumps.sh index 25216a4..d62b35d 100644 --- a/archer2/libraries/mumps/build-mumps.sh +++ b/archer2/libraries/mumps/build-mumps.sh @@ -7,7 +7,6 @@ script_dir="$(dirname "${script}")" script_root="$(dirname "${script%/*/*}")" source ${script_root}/pkgconfig-lib.sh -source ${script_root}/versions.sh source ${script_root}/command_line.sh function main { @@ -16,9 +15,9 @@ function main { local install_root=${install_root_libs}/mumps/${MUMPS_VERSION} - ${build_cce} && mumpsBuildCray ${install_root} - ${build_gnu} && mumpsBuildGnu ${install_root} - ${build_amd} && mumpsBuildAocc ${install_root} + [[ ${build_cce} ]] && mumpsBuildCray ${install_root} + [[ ${build_gnu} ]] && mumpsBuildGnu ${install_root} + [[ ${build_amd} ]] && mumpsBuildAocc ${install_root} mumpsInstallModuleFileLua mumpsInstallationTest @@ -198,6 +197,8 @@ function mumpsInstallModuleFileLua { cat ${module_preamble} > ${module_file} cat ${module_boilerplate} >> ${module_file} + sed -i "s/SCOTCH_VERSION_TAG/${SCOTCH_VERSION}/" ${module_file} + module use ${module_dir} module load mumps/${MUMPS_VERSION} diff --git a/archer2/libraries/mumps/module_preamble.lua b/archer2/libraries/mumps/module_preamble.lua index 2a4fd79..9a5aa30 100755 --- a/archer2/libraries/mumps/module_preamble.lua +++ b/archer2/libraries/mumps/module_preamble.lua @@ -5,7 +5,7 @@ family("mumps") prereq_any("PrgEnv-cray", "PrgEnv-gnu", "PrgEnv-aocc") depends_on("metis/5.1.0") depends_on("parmetis/4.0.3") -depends_on("scotch/6.1.0") +depends_on("scotch/SCOTCH_VERSION_TAG") -- This is introspection; may want to set explicitly. diff --git a/archer2/libraries/parmetis/build-parmetis.sh b/archer2/libraries/parmetis/build-parmetis.sh index c26e4fb..38df24f 100644 --- a/archer2/libraries/parmetis/build-parmetis.sh +++ b/archer2/libraries/parmetis/build-parmetis.sh @@ -7,7 +7,6 @@ script_dir="$(dirname "${script}")" script_root="$(dirname "${script%/*/*}")" source ${script_root}/pkgconfig-lib.sh -source ${script_root}/versions.sh source ${script_root}/command_line.sh function main { diff --git a/archer2/libraries/petsc/build-petsc.sh b/archer2/libraries/petsc/build-petsc.sh index 4ab3253..903002b 100644 --- a/archer2/libraries/petsc/build-petsc.sh +++ b/archer2/libraries/petsc/build-petsc.sh @@ -7,7 +7,6 @@ script_dir="$(dirname "${script}")" script_root="$(dirname "${script%/*/*}")" source ${script_root}/pkgconfig-lib.sh -source ${script_root}/versions.sh source ${script_root}/command_line.sh function main { @@ -16,9 +15,9 @@ function main { local install_root=${install_root_libs}/petsc/${PETSC_VERSION} - ${build_cce} && petscBuildCray ${install_root} - ${build_gnu} && petscBuildGnu ${install_root} - ${build_amd} && petscBuildAocc ${install_root} + [[ ${build_cce} ]] && petscBuildCray ${install_root} + [[ ${build_gnu} ]] && petscBuildGnu ${install_root} + [[ ${build_amd} ]] && petscBuildAocc ${install_root} petscInstallModuleFileLua petscInstallationTest @@ -31,8 +30,7 @@ function petscLoadModuleDependencies { moduleUseLibs # Pending AOCC pkgconfig fix... - #module load cray-hdf5-parallel/${CRAY_HDF5_PARALLEL_VERSION} - module load epcc-cray-hdf5-parallel/${CRAY_HDF5_PARALLEL_VERSION} + module load cray-hdf5-parallel/${CRAY_HDF5_PARALLEL_VERSION} module load hypre/${HYPRE_VERSION} module load mumps/${MUMPS_VERSION} module load superlu/${SUPERLU_VERSION} @@ -42,8 +40,7 @@ function petscLoadModuleDependencies { function petscUnloadModuleDependencies { - module unload epcc-cray-hdf5-parallel/${CRAY_HDF5_PARALLEL_VERSION} - #module unload cray-hdf5-parallel/${CRAY_HDF5_PARALLEL_VERSION} + module unload cray-hdf5-parallel/${CRAY_HDF5_PARALLEL_VERSION} module unload hypre/${HYPRE_VERSION} module unload mumps/${MUMPS_VERSION} module unload superlu/${SUPERLU_VERSION} @@ -166,6 +163,11 @@ function petscInstallModuleFileLua { cat ${module_preamble} > ${module_file} cat ${module_boilerplate} >> ${module_file} + sed -i "s/HYPRE_VERSION_TAG/${HYPRE_VERSION}/" ${module_file} + sed -i "s/MUMPS_VERSION_TAG/${MUMPS_VERSION}/" ${module_file} + sed -i "s/SUPERLU_VERSION_TAG/${SUPERLU_VERSION}/" ${module_file} + sed -i "s/SUPERLU_DIST_VERSION_TAG/${SUPERLUDIST_VERSION}/" ${module_file} + module use ${module_dir} module load petsc/${PETSC_VERSION} diff --git a/archer2/libraries/petsc/module_preamble.lua b/archer2/libraries/petsc/module_preamble.lua index 8112374..b9f3918 100755 --- a/archer2/libraries/petsc/module_preamble.lua +++ b/archer2/libraries/petsc/module_preamble.lua @@ -4,11 +4,11 @@ family("petsc") prereq_any("PrgEnv-cray", "PrgEnv-gnu", "PrgEnv-aocc") -depends_on("epcc-cray-hdf5-parallel/1.12.0.3") -depends_on("hypre/2.18.0") -depends_on("mumps/5.3.5") -depends_on("superlu/5.2.2") -depends_on("superlu-dist/6.4.0") +depends_on("cray-hdf5-parallel") +depends_on("hypre/HYPRE_VERSION_TAG") +depends_on("mumps/MUMPS_VERSION_TAG") +depends_on("superlu/SUPERLU_VERSION_TAG") +depends_on("superlu-dist/SUPERLU_DIST_VERSION_TAG") -- This is introspection; may want to set explicitly. diff --git a/archer2/libraries/scotch/README.md b/archer2/libraries/scotch/README.md index e8b1251..f039b48 100644 --- a/archer2/libraries/scotch/README.md +++ b/archer2/libraries/scotch/README.md @@ -2,12 +2,22 @@ ## Build -The single installation generates both serial `scotch` and parallel `ptscotch` under -the same banner of `scotch`. E.g., +The single installation generates both serial `scotch` and parallel +`ptscotch` under the same banner of `scotch`. E.g., ``` +$ salloc --nodes=1 --time=00:30:00 --partition=standard --qos=standard $ bash ./archer2/libraries/scotch/build-scotch.sh --prefix=/work/y07/shared ``` +Note that v6 and v7 have different baseline build scripts in `./sh/tpsl/scotch.sh` and `./sh/tpsl/scotchv7.sh` respectively. The version 7 has moved to the +`cmake` build route, which has the advantage that the testing is much +easier, but the disadvantage that it doesn't handle the `libscotchmetis` +build so well (it would have to look more like the v6 build without +tests). So the `libscotchmetis` build in v7 is switched off entirely. +This prevent collisions between the scotchmetis versions and the true +metis and partmetis versions in places where both are active (e.g., PETSc). + + ## Module The module template is `modulefile.tcl` which does not need to load any diff --git a/archer2/libraries/scotch/build-scotch.sh b/archer2/libraries/scotch/build-scotch.sh index 8d45ef2..638ef31 100644 --- a/archer2/libraries/scotch/build-scotch.sh +++ b/archer2/libraries/scotch/build-scotch.sh @@ -7,7 +7,6 @@ script_dir="$(dirname "${script}")" script_root="$(dirname "${script%/*/*}")" source ${script_root}/pkgconfig-lib.sh -source ${script_root}/versions.sh source ${script_root}/command_line.sh function main { @@ -16,9 +15,9 @@ function main { local install_root=${install_root_libs}/scotch/${SCOTCH_VERSION} - ${build_amd} && scotchBuildAocc ${install_root} - ${build_cce} && scotchBuildCray ${install_root} - ${build_gnu} && scotchBuildGnu ${install_root} + [[ ${build_amd} ]] && scotchBuildAocc ${install_root} + [[ ${build_cce} ]] && scotchBuildCray ${install_root} + [[ ${build_gnu} ]] && scotchBuildGnu ${install_root} scotchInstallModuleFileLua scotchInstallationTest ${install_root} @@ -94,12 +93,16 @@ function scotchBuild { function scotchClean { rm -rf scotch_${SCOTCH_VERSION} - + rm -rf scotch-v${SCOTCH_VERSION} } function scotchBuildMPI { - # The following libraries are generated by the build: + # The following libraries are generated by the build. + # v7 + # As v6 but scotchmetis is replaced by scotchmetisv3 and scotchmetisv5 + # ptscotchmetis replaced by ptscotchmetisv3 (only) + # v6 # libesmumps.a libptesmumps.a # libscotch.a libptscotch.a # libscotcherr.a libptscotcherr.a @@ -108,13 +111,35 @@ function scotchBuildMPI { local prefix=${1} - ./sh/tpsl/scotch.sh --jobs=16 --prefix=${prefix} --version=${SCOTCH_VERSION} + case ${SCOTCH_VERSION} in + 7.*) + ./sh/tpsl/scotchv7.sh --jobs=16 --prefix=${prefix} --version=${SCOTCH_VERSION} + ;; + 6.*) + ./sh/tpsl/scotch.sh --jobs=16 --prefix=${prefix} --version=${SCOTCH_VERSION} +;; + esac local pe=$(peEnvLower) local prefixlib="${prefix}/lib" # Postfix ${pe}_mpi + case ${SCOTCH_VERSION} in + 7.*) + printf "Rename v7 libraries ...\n" + for lib in scotch scotcherr esmumps; do + mv ${prefixlib}/lib${lib}.a ${prefixlib}/lib${lib}_${pe}.a + ccSharedFromStatic ${prefixlib} ${lib}_${pe} + done + + for lib in ptscotch ptscotcherr ptesmumps; do + mv ${prefixlib}/lib${lib}.a ${prefixlib}/lib${lib}_${pe}_mpi.a + ccSharedFromStatic ${prefixlib} ${lib}_${pe}_mpi + done + ;; + 6.*) + printf "Rename v6 libraries ... \n" for lib in scotch scotcherr scotchmetis esmumps; do mv ${prefixlib}/lib${lib}.a ${prefixlib}/lib${lib}_${pe}.a ccSharedFromStatic ${prefixlib} ${lib}_${pe} @@ -124,6 +149,8 @@ function scotchBuildMPI { mv ${prefixlib}/lib${lib}.a ${prefixlib}/lib${lib}_${pe}_mpi.a ccSharedFromStatic ${prefixlib} ${lib}_${pe}_mpi done + ;; + esac } function scotchPackageConfigFiles { @@ -152,7 +179,14 @@ function scotchPackageConfigFiles { # (e.g., the tests) if it appears in the pkgconfig. # Order is important - pcmap[requires]="esmumps_${ext} ptesmumps_${extmpi} ptscotchparmetis_${extmpi} ptscotch_${extmpi} ptscotcherr_${extmpi} scotchmetis_${ext} scotch_${ext} scotcherr_${ext}" + case ${SCOTCH_VERSION} in + 7.*) + pcmap[requires]="esmumps_${ext} ptesmumps_${extmpi} ptscotch_${extmpi} ptscotcherr_${extmpi} scotch_${ext} scotcherr_${ext}" + ;; + 6.*) + pcmap[requires]="esmumps_${ext} ptesmumps_${extmpi} ptscotchparmetis_${extmpi} ptscotch_${extmpi} ptscotcherr_${extmpi} scotchmetis_${ext} scotch_${ext} scotcherr_${ext}" + ;; + esac pcRefactorPackageConfigFiles ${prefix} pcmap pcFileWriteOverallPackageFile "${prefix}/lib/pkgconfig/scotch.pc" pcmap @@ -216,14 +250,57 @@ function scotchInstallModuleFile { function scotchInstallationTest { - ${test_cee} && scotchTest PrgEnv-cray - ${test_gnu} && scotchTest PrgEnv-gnu - ${test_amd} && scotchTest PrgEnv-aocc + [[ ${test_cce} ]] && scotchTest PrgEnv-cray + [[ ${test_gnu} ]] && scotchTest PrgEnv-gnu + [[ ${test_amd} ]] && scotchTest PrgEnv-aocc } function scotchTest { + case ${SCOTCH_VERSION} in + 7.*) scotchTestv7 ${1} + ;; + 6.*) scotchTestv6 ${1} + ;; + esac +} + +function scotchTestv7 { + + # For v7, having included the tests at build time, we reduced the + # installation test + local prgenv=${1} + local module_use=$(moduleInstallDirectory) + local version="${SCOTCH_VERSION}" + + printf "Scotch test for %s\n" "${prgenv}" + + module load ${prgenv} + module use ${module_use} + + module load scotch/${version} + printf "SCOTCH_DIR: %s\n" "${SCOTCH_DIR}" + + cc --cray-print-opts + + # As we have passed the ctests, just check we can compile + # and link some examples from the source + + cd scotch-v${SCOTCH_VERSION}/src/check + + cc test_common_file_compress.c -lz -lbz2 + cc test_common_random.c + cc -DSCOTCH_RENAME test_common_thread.c + cc -DSCOTCH_RENAME test_fibo.c + cc test_libesmumps.c + + cd - + module unload scotch +} + +function scotchTestv6 { + local prgenv=${1} local module_use=$(moduleInstallDirectory) local version="${SCOTCH_VERSION}" diff --git a/archer2/libraries/slepc/build-slepc.sh b/archer2/libraries/slepc/build-slepc.sh index 7ef20cd..de4beb6 100644 --- a/archer2/libraries/slepc/build-slepc.sh +++ b/archer2/libraries/slepc/build-slepc.sh @@ -7,7 +7,6 @@ script_dir="$(dirname "${script}")" script_root="$(dirname "${script%/*/*}")" source ${script_root}/pkgconfig-lib.sh -source ${script_root}/versions.sh source ${script_root}/command_line.sh function main { @@ -191,6 +190,8 @@ function slepcInstallModuleFileLua { cat ${module_preamble} > ${module_file} cat ${module_boilerplate} >> ${module_file} + sed -i "s/PETSC_VERSION_TAG/${PETSC_VERSION}/" ${module_file} + module use ${module_dir} module load slepc/${SLEPC_VERSION} diff --git a/archer2/libraries/slepc/module_preamble.lua b/archer2/libraries/slepc/module_preamble.lua index 7241ae4..325aaae 100755 --- a/archer2/libraries/slepc/module_preamble.lua +++ b/archer2/libraries/slepc/module_preamble.lua @@ -3,7 +3,7 @@ family("slepc") prereq_any("PrgEnv-cray", "PrgEnv-gnu", "PrgEnv-aocc") -depends_on("petsc/3.14.2") +depends_on("petsc/PETSC_VERSION_TAG") -- This is introspection; may want to set explicitly. diff --git a/archer2/libraries/superlu-dist/build-superlu-dist.sh b/archer2/libraries/superlu-dist/build-superlu-dist.sh index 6b45c8d..8e98f14 100644 --- a/archer2/libraries/superlu-dist/build-superlu-dist.sh +++ b/archer2/libraries/superlu-dist/build-superlu-dist.sh @@ -7,7 +7,6 @@ script_dir="$(dirname "${script}")" script_root="$(dirname "${script%/*/*}")" source ${script_root}/pkgconfig-lib.sh -source ${script_root}/versions.sh source ${script_root}/command_line.sh function main { diff --git a/archer2/libraries/superlu/build-superlu.sh b/archer2/libraries/superlu/build-superlu.sh index bc8211e..2b6ec07 100644 --- a/archer2/libraries/superlu/build-superlu.sh +++ b/archer2/libraries/superlu/build-superlu.sh @@ -7,7 +7,6 @@ script_dir="$(dirname "${script}")" script_root="$(dirname "${script%/*/*}")" source ${script_root}/pkgconfig-lib.sh -source ${script_root}/versions.sh source ${script_root}/command_line.sh function main { @@ -16,9 +15,9 @@ function main { local install_root=${install_root_libs}/superlu/${SUPERLU_VERSION} - ${build_amd} && superluBuildAocc ${install_root} - ${build_cce} && superluBuildCray ${install_root} - ${build_gnu} && superluBuildGnu ${install_root} + [[ ${build_amd} ]] && superluBuildAocc ${install_root} + [[ ${build_cce} ]] && superluBuildCray ${install_root} + [[ ${build_gnu} ]] && superluBuildGnu ${install_root} superluInstallModuleFileLua superluInstallationTest diff --git a/archer2/libraries/trilinos/build-trilinos.sh b/archer2/libraries/trilinos/build-trilinos.sh index 5f1de08..844ebb0 100644 --- a/archer2/libraries/trilinos/build-trilinos.sh +++ b/archer2/libraries/trilinos/build-trilinos.sh @@ -16,9 +16,9 @@ function main { local install_root=${install_root_libs}/trilinos/${TRILINOS_VERSION} - ${build_amd} && trilinosBuildAocc ${install_root} - ${build_cce} && trilinosBuildCray ${install_root} - ${build_gnu} && trilinosBuildGnu ${install_root} + [[ ${build_amd} ]] && trilinosBuildAocc ${install_root} + [[ ${build_gnu} ]] && trilinosBuildGnu ${install_root} + [[ ${build_cce} ]] && trilinosBuildCray ${install_root} trilinosInstallModuleFileLua trilinosInstallationTest @@ -28,28 +28,26 @@ function trilinosLoadModuleDependencies { moduleUseLibs - module load epcc-cray-hdf5-parallel - module load epcc-cray-netcdf-hdf5parallel + module load cray-hdf5-parallel + module load cray-netcdf-hdf5parallel module load mumps/${MUMPS_VERSION} module load superlu/${SUPERLU_VERSION} module load superlu-dist/${SUPERLUDIST_VERSION} module load matio/${MATIO_VERSION} - module load glm/${GLM_VERSION} module load boost/${BOOST_VERSION} } function trilinosUnloadModuleDependencies { module unload boost - module unload glm module unload matio module unload superlu-dist module unload superlu module unload mumps - module unload epcc-cray-netcdf-hdf5parallel - module unload epcc-cray-hdf5-parallel + module unload cray-netcdf-hdf5parallel + module unload cray-hdf5-parallel } function trilinosBuildAocc { @@ -122,8 +120,16 @@ function trilinosBuild { function trilinosClean { - rm -rf trilinos-${TRILINOS_VERSION} - + case ${TRILINOS_VERSION} in + 12.*) + rm -rf trilinos-${TRILINOS_VERSION} + ;; + 13.*) + rm -rf trilinos-${TRILINOS_VERSION}/_build-CRAY + rm -rf trilinos-${TRILINOS_VERSION}/_build-GNU + rm -rf trilinos-${TRILINOS_VERSION}/_build-AOCC + ;; + esac } function trilinosBuildMPIOpenMP { @@ -132,8 +138,16 @@ function trilinosBuildMPIOpenMP { local prefix=${1} - ./sh/trilinos.sh --jobs=16 --prefix=${prefix} --openmp --modules \ - --version=${TRILINOS_VERSION} + case ${TRILINOS_VERSION} in + 12.*) + ./sh/trilinos.sh --jobs=16 --prefix=${prefix} --openmp --modules \ + --version=${TRILINOS_VERSION} + ;; + 13.*) + ./sh/trilinos-v13.sh --jobs=16 --prefix=${prefix} --openmp \ + --modules --version=${TRILINOS_VERSION} + ;; + esac } function trilinosPackageConfigFile { @@ -223,9 +237,9 @@ function trilinosInstallModuleFile { function trilinosInstallationTest { - ${test_cce} && trilinosTest PrgEnv-cray - ${test_gnu} && trilinosTest PrgEnv-gnu - ${test_amd} && trilinosTest PrgEnv-aocc + [[ ${test_cce} ]] && trilinosTest PrgEnv-cray + [[ ${test_gnu} ]] && trilinosTest PrgEnv-gnu + [[ ${test_amd} ]] && trilinosTest PrgEnv-aocc } function trilinosTest { diff --git a/archer2/libraries/trilinos/module_preamble.lua b/archer2/libraries/trilinos/module_preamble.lua index 3f2ec30..992b0d0 100755 --- a/archer2/libraries/trilinos/module_preamble.lua +++ b/archer2/libraries/trilinos/module_preamble.lua @@ -4,14 +4,14 @@ family("trilinos") prereq_any("PrgEnv-cray", "PrgEnv-gnu", "PrgEnv-aocc") -depends_on("glm/0.9.9.6") +-- not depends_on("glm/0.9.9.6") depends_on("boost/1.72.0") -depends_on("matio/1.5.18") +depends_on("matio/1.5.23") depends_on("mumps/5.3.5") depends_on("superlu/5.2.2") depends_on("superlu-dist/6.4.0") -depends_on("epcc-cray-hdf5-parallel/1.12.0.3") -depends_on("epcc-cray-netcdf-hdf5parallel") +depends_on("cray-hdf5-parallel") +depends_on("cray-netcdf-hdf5parallel") -- This is introspection; may want to set explicitly. diff --git a/archer2/module/22.12/defaults.sh b/archer2/module/22.12/defaults.sh new file mode 100644 index 0000000..27f1585 --- /dev/null +++ b/archer2/module/22.12/defaults.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +# Programming environment defaults at March 2023. + +PE_CPE_VERSION=22.12 + +PE_CRAY_CCE_VERSION=15.0.0 +PE_GNU_GCC_VERSION=10.3.0 +PE_AOCC_AOCC_VERSION=3.2.0 + +CRAY_HDF5_PARALLEL_VERSION=1.12.2.1 +CRAY_NETCDF_HDF5PARALLEL_VERSION=4.9.0.1 diff --git a/archer2/versions-2021.sh b/archer2/versions-2021.sh new file mode 100644 index 0000000..c3cd77a --- /dev/null +++ b/archer2/versions-2021.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash + +# Current default versions for all relevant packages +# CPE 21.04 + +# TPSL (8 items) + +MATIO_VERSION=1.5.23 +METIS_VERSION=5.1.0 +PARMETIS_VERSION=4.0.3 +SUPERLU_VERSION=5.2.2 + +HYPRE_VERSION=2.18.0 +MUMPS_VERSION=5.3.5 +SCOTCH_VERSION=6.1.0 +SUPERLUDIST_VERSION=6.4.0 + +# Other +ADIOS_VERSION=1.13.1 +BOOST_VERSION=1.72.0 +PETSC_VERSION=3.14.2 +SLEPC_VERSION=3.14.1 +TRILINOS_VERSION=12.18.1 + +# Miscell. + +ARPACK_VERSION=3.8.0 + + +# "Retired" +GLM_VERSION=0.9.9.6 +#SUNDIALS_VERSION=4.1.0 diff --git a/archer2/versions.sh b/archer2/versions.sh index 9222c14..8112006 100644 --- a/archer2/versions.sh +++ b/archer2/versions.sh @@ -1,28 +1,32 @@ #!/usr/bin/env bash # Current default versions for all relevant packages +# CPE 22.12 -# TPSL (10 items) +# TPSL (8 items) -GLM_VERSION=0.9.9.6 -HYPRE_VERSION=2.18.0 -MATIO_VERSION=1.5.18 +MATIO_VERSION=1.5.23 METIS_VERSION=5.1.0 -MUMPS_VERSION=5.3.5 PARMETIS_VERSION=4.0.3 -SCOTCH_VERSION=6.1.0 SUPERLU_VERSION=5.2.2 -SUPERLUDIST_VERSION=6.4.0 -SUNDIALS_VERSION=4.1.0 -# Others (5 items) +HYPRE_VERSION=2.25.0 +MUMPS_VERSION=5.5.1 +SCOTCH_VERSION=7.0.3 +SUPERLUDIST_VERSION=8.1.2 -ADIOS_VERSION=1.13.1 -BOOST_VERSION=1.72.0 -PETSC_VERSION=3.14.2 -SLEPC_VERSION=3.14.1 -TRILINOS_VERSION=12.18.1 +# Others +BOOST_VERSION=1.81.0 +PETSC_VERSION=3.18.5 +SLEPC_VERSION=3.18.3 +TRILINOS_VERSION=13.4.1 # Miscell. ARPACK_VERSION=3.8.0 + + +# "Retired" +ADIOS_VERSION=1.13.1 +#GLM_VERSION=0.9.9.6 +#SUNDIALS_VERSION=4.1.0 diff --git a/sh/.preamble.sh b/sh/.preamble.sh index 755eaf4..1a9e263 100644 --- a/sh/.preamble.sh +++ b/sh/.preamble.sh @@ -270,6 +270,9 @@ case "$compiler" in FFLAGS="-O2 -F -em -ef -hnocaf" CFLAGS="-O3 -ffast-math" PE_LIBS="-lfi -lf -lu -lcraymath -lcraymp -lm" + case ${CRAY_CC_VERSION} in + 15.*) FFLAGS="${FFLAGS} -dC";; + esac ;; gnu) CFLAGS="-O3 -ffast-math" @@ -281,7 +284,8 @@ case "$compiler" in PE_LIBS="-lgfortran -lgcc" OMPLIBS="-lgomp" case $GCC_VERSION in - 10.*) FFLAGS="$FFLAGS -fallow-argument-mismatch" ;; + 10.*) FFLAGS="$FFLAGS -fallow-argument-mismatch";; + 11.*) FFLAGS="$FFLAGS -fallow-argument-mismatch";; esac case $CRAY_CPU_TARGET in x86_64) ARCHFLAGS="$X86FLAGS" ;; diff --git a/sh/boost.sh b/sh/boost.sh index 5f489b6..649af24 100755 --- a/sh/boost.sh +++ b/sh/boost.sh @@ -12,6 +12,7 @@ VERSIONS=' 1.70.0:430ae8354789de4fd19ee52f3b1f739e1fba576f0aded0897c3c2bc00fb38778 1.71.0:d73a8da01e8bf8c7eda40b4c84915071a8c8a0df4a6734537ddde4a8580524ee 1.72.0:59c9b274bc451cf91a9ba1dd2c7fdcaf5d60b1b3aa83f2c9fa143417cc660722 + 1.81.0:71feeed900fbccca04a3b4f2f84a7c217186f28a940ed8b7ed4725986baf99fa ' _pwd(){ CDPATH= cd -- $1 && pwd; } @@ -97,9 +98,13 @@ EOF || fn_warn "not enabling Boost::Python" +# Old download location. +# http://dl.bintray.com/boostorg/release/.. +# New download location (2023) + _VERSION=`echo $VERSION | tr . _` test -e boost_$_VERSION.tar.bz2 \ - || $WGET http://dl.bintray.com/boostorg/release/$VERSION/source/boost_$_VERSION.tar.bz2 -O boost_$_VERSION.tar.bz2 \ + || $WGET http://boostorg.jfrog.io/artifactory/main/release/$VERSION/source/boost_$_VERSION.tar.bz2 -O boost_$_VERSION.tar.bz2 \ || fn_error "could not fetch source" echo "$SHA256SUM boost_$_VERSION.tar.bz2" | sha256sum --check \ || fn_error "source hash mismatch" diff --git a/sh/petsc.sh b/sh/petsc.sh index 08e4ac8..a28dca6 100755 --- a/sh/petsc.sh +++ b/sh/petsc.sh @@ -14,6 +14,7 @@ VERSIONS=' 3.13.3:dc744895ee6b9c4491ff817bef0d3abd680c5e3c25e601be44240ce65ab4f337 3.13.6:67ca2cf3040d08fdc51d27f660ea3157732b24c2f47aae1b19d63f62a39842c2 3.14.2:87a04fd05cac20a2ec47094b7d18b96e0651257d8c768ced2ef7db270ecfb9cb + 3.18.5:df73ae13a4c5758325a9d69350cac423742657d8a8fc5782504b0e469ce46499 ' _pwd(){ CDPATH= cd -- $1 && pwd; } diff --git a/sh/slepc.sh b/sh/slepc.sh index 80a842d..135f4f2 100755 --- a/sh/slepc.sh +++ b/sh/slepc.sh @@ -10,6 +10,7 @@ VERSIONS=' 3.12.2:a586ce572a928ed87f04961850992a9b8e741677397cbaa3fb028323eddf4598 3.13.4:ddc9d58e1a4413218f4e67ea3b255b330bd389d67f394403a27caedf45afa496 3.14.1:cc78a15e34d26b3e6dde003d4a30064e595225f6185c1975bbd460cb5edd99c7 + 3.18.3:1b02bdf87c083749e81b3735aae7728098eaab78143b262b92c2ab164924c6f5 ' _pwd(){ CDPATH= cd -- $1 && pwd; } diff --git a/sh/tpsl/glm.sh b/sh/tpsl/glm.sh index 0932155..456715e 100755 --- a/sh/tpsl/glm.sh +++ b/sh/tpsl/glm.sh @@ -9,6 +9,8 @@ PACKAGE=glm VERSIONS=' 0.9.6.3:14651b56b10fa68082446acaf6a1116d56b757c8d375b34b5226a83140acd2b2 0.9.9.6:9db7339c3b8766184419cfe7942d668fecabe9013ccfec8136b39e11718817d0 + 0.9.9.7:6b79c3d06d9745d1cce3f38c0c15666596f9aefff25ddb74df3af0a02f011ee1 + 0.9.9.8:37e2a3d62ea3322e43593c34bae29f57e3e251ea89f4067506c94043769ade4c ' _pwd(){ CDPATH= cd -- $1 && pwd; } @@ -43,14 +45,28 @@ case $VERSION in || fn_error "could not patch source" ;; esac + +# All versions. remove bad utf-8 characters from two files: +for f in test/gtc/gtc_quaternion.cpp glm/gtx/matrix_factorisation.inl +do + iconv -c -f utf-8 -t ascii $f > tmp.cpp + mv tmp.cpp $f +done + + case "$compiler" in crayclang) - CXXFLAGS="-Wno-implicit-int-float-conversion $CXXFLAGS" ;; + CXXFLAGS="-Wno-implicit-int-float-conversion $CXXFLAGS" + case "${CRAY_CC_VERSION}" in + 15.0*) CXXFLAGS="-Wno-implicit-int-conversion ${CXXFLAGS}" + esac + ;; aocc) # AAOC 2.1 cannot use this (not recognised option) # AOCC 2.2 must use this to compile with -Werror -Weverything case "${CRAY_AOCC_VERSION}" in 2.2*) CXXFLAGS="-Wno-implicit-int-float-conversion $CXXFLAGS" ;; + 3.2*) CXXFLAGS="-Wno-implicit-int-float-conversion -Wno-implicit-int-conversion -Wno-unused-but-set-variable ${CXXFLAGS}";; esac esac @@ -65,8 +81,9 @@ make -j $make_jobs \ || fn_error "build failed" make test \ || fn_error "tests failed" -make install \ +make preinstall && cmake -P cmake_install.cmake \ || fn_error "install failed" + fn_checkpoint_tpsl # Local Variables: diff --git a/sh/tpsl/hypre.sh b/sh/tpsl/hypre.sh index 16877f1..6720dc2 100755 --- a/sh/tpsl/hypre.sh +++ b/sh/tpsl/hypre.sh @@ -9,6 +9,7 @@ PACKAGE=hypre VERSIONS=' 2.14.0:10cfcd555618137c194958f84f44724fece45b58c59002d1195fed354e2ca16c 2.18.0:62591ac69f9cc9728bd6d952b65bcadd2dfe52b521081612609804a413f49b07 + 2.25.0:f9fc8371d91239fca694284dab17175bfda3821d7b7a871fd2e8f9d5930f303c ' _pwd(){ CDPATH= cd -- $1 && pwd; } @@ -28,6 +29,8 @@ tar xf hypre-$VERSION.tar.gz \ cd hypre-$VERSION { patch -f -p1 <$top_dir/../patches/hypre-mpi-comm-f2c-interface.patch ; case $VERSION in + 2.25.0) + printf "No patches\n";; 2.14.0) patch -f -p1 <$top_dir/../patches/hypre-hopscotch-no-builtins.patch ; patch -f -p1 <$top_dir/../patches/hypre-struct-mv-pragmas.patch ;; diff --git a/sh/tpsl/matio.sh b/sh/tpsl/matio.sh index 220ca34..77ffce9 100755 --- a/sh/tpsl/matio.sh +++ b/sh/tpsl/matio.sh @@ -9,6 +9,7 @@ PACKAGE=matio VERSIONS=' 1.5.13:feadb2f54ba7c9db6deba8c994e401d7a1a8e7afd0fe74487691052b8139e5cb 1.5.18:5fad71a63a854d821cc6f4e8c84da837149dd5fb57e1e2baeffd85fa0f28fe25 + 1.5.23:9f91eae661df46ea53c311a1b2dcff72051095b023c612d7cbfc09406c9f4d6e ' _pwd(){ CDPATH= cd -- $1 && pwd; } @@ -50,8 +51,9 @@ fi make --jobs=$make_jobs \ || fn_error "build failed" # Tests take a little too long (few minutes) for comfort, so comment out... -#make --jobs=$make_jobs check \ -# || fn_error "tests failed" +# .. if not required +make --jobs=$make_jobs check \ + || fn_error "tests failed" make install \ || fn_error "install failed" fn_checkpoint_tpsl diff --git a/sh/tpsl/mumps.sh b/sh/tpsl/mumps.sh index bcfec3e..12a7f39 100755 --- a/sh/tpsl/mumps.sh +++ b/sh/tpsl/mumps.sh @@ -10,6 +10,7 @@ VERSIONS=' 5.1.2:eb345cda145da9aea01b851d17e54e7eef08e16bfa148100ac1f7f046cd42ae9 5.2.1:d988fc34dfc8f5eee0533e361052a972aa69cc39ab193e7f987178d24981744a 5.3.5:e5d665fdb7043043f0799ae3dbe3b37e5b200d1ab7a6f7b2a4e463fd89507fa4 + 5.5.1:1abff294fa47ee4cfd50dfd5c595942b72ebfcedce08142a75a99ab35014fa15 ' _pwd(){ CDPATH= cd -- $1 && pwd; } @@ -111,7 +112,7 @@ EOF test "$?" = "0" \ && mkdir -p "$prefix/lib" "$prefix/include" \ || fn_error "configuration failed" -make --jobs=$make_jobs alllib \ +make --jobs=$make_jobs all \ || fn_error "build failed" cp lib/lib*.a "$prefix/lib" \ && cp include/*.h "$prefix/include" \ diff --git a/sh/tpsl/scotchv7.sh b/sh/tpsl/scotchv7.sh new file mode 100755 index 0000000..c001c71 --- /dev/null +++ b/sh/tpsl/scotchv7.sh @@ -0,0 +1,74 @@ +#!/bin/sh +# +# Build and install the scotch library. +# +# VERSION >= 7.0.0 using cmake route +# requires an salloc for the tests to pass. +# +# Copyright 2019, 2020, 2021 Hewlett Packard Enterprise Development LP. +#### + +PACKAGE=scotch +VERSIONS=' + 7.0.1:0618e9bc33c02172ea7351600fce4fccd32fe00b3359c4aabb5e415f17c06fed + 7.0.3:5b5351f0ffd6fcae9ae7eafeccaa5a25602845b9ffd1afb104db932dd4d4f3c5 +' + +_pwd(){ CDPATH= cd -- $1 && pwd; } +_dirname(){ _d=`dirname -- "$1"`; _pwd $_d; } +top_dir=`_dirname \`_dirname "$0"\`` + +. $top_dir/.preamble.sh + +case "$compiler" in + cray) CFLAGS_NATIVE="-hcpu=`uname -m`" ;; + gnu|intel|crayclang) CFLAGS_NATIVE="-march=native" ;; + pgi) CFLAGS_NATIVE="-tp=x86" ;; # only supported on x86 +esac + +## +## Optional: +## - hdf5 +## + +test -e scotch-v$VERSION.tar.gz \ + || $WGET https://gitlab.inria.fr/scotch/scotch/-/archive/v${VERSION}/scotch-v${VERSION}.tar.gz \ + || fn_error "wget failed" + +echo "$SHA256SUM scotch-v${VERSION}.tar.gz" | sha256sum --check \ + || fn_error "source hash mismatch" +tar xf scotch-v${VERSION}.tar.gz \ + || fn_error "could not untar source" + + +cd scotch-v${VERSION} +mkdir _build +cd _build + +# Do not use MPI_THREAD_MULTIPLE as this may not be supported in user code +# Do not use THREADS, as this gives race conditions in the tests +# Do not build the scotchmetis library, as this will collide with +# the true metis/parmetis without -DSCOTCH_METIS_PREFIX, which the +# cmake route won't do and still pass the tests. + +CFLAGS="${CFLAGS}" cmake \ + -DCMAKE_INSTALL_PREFIX=${prefix} \ + -DCMAKE_C_COMPILER=cc \ + -DCMAKE_CXX_COMPILER=CC \ + -DCMAKE_Fortran_COMPILER=ftn \ + -DCMAKE_VERBOSE_MAKEFILE=1 \ + -DMPI_THREAD_MULTIPLE:BOOL=OFF \ + -DTHREADS:BOOL=OFF \ + -DBUILD_LIBSCOTCHMETIS:BOOL=OFF \ + .. + +test "$?" = "0" || fn_error "configuration failed" + +# Some evidence of race to dependencies if -j > 1, so restrict to 1 +# Don;t run the tests if no salloc is available + +make --jobs=1 || fn_error "build failed" +#make test || fn_error "tests failed" +make install || fn_error "install failed" + +fn_checkpoint_tpsl diff --git a/sh/tpsl/superlu-dist.sh b/sh/tpsl/superlu-dist.sh index 39c9dfc..a07bcb2 100755 --- a/sh/tpsl/superlu-dist.sh +++ b/sh/tpsl/superlu-dist.sh @@ -10,6 +10,7 @@ VERSIONS=" 6.1.1:35d25cff592c724439870444ed45e1d1d15ca2c65f02ccd4b83a6d3c9d220bd1 6.3.1:3787c2755acd6aadbb4d9029138c293a7570a2ed228806676edcc7e1d3f5a1d3 6.4.0:cb9c0b2ba4c28e5ed5817718ba19ae1dd63ccd30bc44c8b8252b54f5f04a44cc + 8.1.2:7b16c442bb01ea8b298c0aab9a2584aa4615d09786aac968cb2f3118c058206b " _pwd(){ CDPATH= cd -- $1 && pwd; } @@ -48,6 +49,8 @@ tar xf superlu-dist-$VERSION.tar.gz \ cd superlu_dist-$VERSION +case $VERSION in + 6*) patch -f -p1 <$top_dir/../patches/superlu-dist-omp.patch \ || fn_error "could not patch" patch -f -p1 <<'EOF' @@ -77,6 +80,8 @@ without adding any additional libraries. User must configure with find_package(LAPACK) EOF +;; +esac if test ${make_using_modules} -eq 1; then # Convince cmake that we can find PARMETIS diff --git a/sh/tpsl/superlu.sh b/sh/tpsl/superlu.sh index 3057158..0914073 100755 --- a/sh/tpsl/superlu.sh +++ b/sh/tpsl/superlu.sh @@ -9,6 +9,7 @@ PACKAGE=superlu VERSIONS=' 5.2.1:77582501dedef295eb74e4dc9433e2816d2d8be211eae307379c13d93c65bc71 5.2.2:470334a72ba637578e34057f46948495e601a5988a602604f5576367e606a28c + 5.3.0:3e464afa77335de200aeb739074a11e96d9bef6d0b519950cfa6684c4be1f350 ' _pwd(){ CDPATH= cd -- $1 && pwd; } diff --git a/sh/trilinos-v13.sh b/sh/trilinos-v13.sh new file mode 100755 index 0000000..d8c0fe4 --- /dev/null +++ b/sh/trilinos-v13.sh @@ -0,0 +1,353 @@ +#!/bin/sh +# +# Build and install the Trilinos library. +# +# Version 13.x +# Copyright 2019, 2020, 2021 Hewlett Packard Enterprise Development LP. +#### + +PACKAGE=trilinos +VERSIONS=' + 12.14.1:10a88f034b8f91904a98970c00fa88b7f4acd59429d2c4870a60c6e297fc044a + 12.18.1:f170a3e92dc8cca338606223fbbce20ee482b863c607bb9bac6730656aec8c69 + 13.4.1: +' + + +_pwd(){ CDPATH= cd -- $1 && pwd; } +_dirname(){ _d=`dirname -- "$1"`; _pwd $_d; } +top_dir=`_dirname "$0"` + +. $top_dir/.preamble.sh + + + +## +## Requirements: +## - cmake +## - MPI +## - BLAS +## - ScaLAPACK +## - TPSL (superlu, superlu-dist, metis, parmetis, scotch, mumps, matio) +## - boost +## - hdf5 +## - netcdf +## - tar >= 1.27 for source verification +## + +fn_check_includes() +{ + cat >conftest.c < +EOF + { CC -E -I$prefix/include $CPPFLAGS conftest.c >/dev/null 2>&1 && rm conftest.* ; } \ + || fn_error "requires $1" +} +fn_check_link() +{ + cat >conftest.c </dev/null 2>&1 && rm conftest.* ; } \ + || fn_error "requires $1" +} + +cmake --version >/dev/null 2>&1 \ + || fn_error "requires cmake" + +fn_check_link BLAS dgemm_ +fn_check_link ScaLAPACK pdgetrf_ +fn_check_includes MPI mpi.h +fn_check_includes METIS metis.h +fn_check_includes ParMETIS parmetis.h +fn_check_includes SuperLU slu_ddefs.h +fn_check_includes SuperLU_DIST superlu_dist_config.h +fn_check_includes Scotch scotch.h +fn_check_includes PT-Scotch ptscotch.h +fn_check_includes MUMPS mumps_c_types.h +#fn_check_includes GLM glm/glm.hpp +fn_check_includes Matio matio.h +fn_check_includes HDF5 hdf5.h +fn_check_includes NetCDF netcdf.h +fn_check_includes Boost::regex boost/regex.hpp +fn_check_includes Boost::timer boost/timer.hpp +fn_check_includes Boost::chrono boost/chrono.hpp +fn_check_includes Boost::program_options boost/program_options.hpp +fn_check_includes Boost::system boost/system/error_code.hpp + +# ASSUME directory exists +#mv Trilinos-trilinos-release-13-4-1 trilinos-${VERSION} + +cd trilinos-$VERSION + + +trilinos_enable_packages=" + Amesos + Amesos2 + Anasazi + AztecOO + Belos + Epetra + EpetraExt + FEI + Galeri + Ifpack + Ifpack2 + Intrepid + Isorropia + Kokkos + Komplex + ML + Moertel + MueLu + NOX + Pamgen + Phalanx + Piro + Pliris + ROL + RTOp + Rythmos + Sacado + Shards + ShyLU + STK + STKSearch + STKTopology + STKUtil + Stokhos + Stratimikos + Teko + Teuchos + Thyra + Tpetra + TrilinosCouplings + Triutils + Xpetra + Zoltan + Zoltan2 + SEACAS + SEACASExo2mat + SEACASMat2exo +" + + +# The SuperLU and SuperLU_DIST interfaces in Amesos2 don't build well +# with CCE (and possibly newer versions of gcc), so we disable those. +amesos2_OPTIONS="\ +Amesos2_ENABLE_SuperLU:BOOL=OFF,\ +Amesos2_ENABLE_SuperLUDist:BOOL=OFF,\ +Amesos2_ENABLE_KLU2:BOOL=ON,\ +Amesos2_ENABLE_Basker:BOOL=ON,\ +Amesos2_ENABLE_MUMPS:BOOL=ON" +epetra_OPTIONS="Epetra_ENABLE_THREADS:BOOL=ON" +ifpack_OPTIONS="Ifpack_ENABLE_METIS:BOOL=OFF" +kokkos_OPTIONS="Kokkos_ENABLE_SERIAL:BOOL=ON,Kokkos_ENABLE_OPENMP:BOOL=ON" + +# MueLu +muelu_OPTIONS="MueLu_ENABLE_TESTS:STRING=OFF,MueLu_ENABLE_EXAMPLES:STRING=OFF,MueLu_ENABLE_Kokkos_Refactor:STRING=ON" + +# Following advice from configure stage: required as Kokkos_SERIAL is set. +tpetra_OPTIONS="Tpetra_INST_SERIAL:BOOL=ON" + +# Use ParMETIS in ML and Zoltan, instead of METIS +# ML supports only SuperLU < 5.0 +ml_OPTIONS="ML_ENABLE_METIS:BOOL=OFF, ML_ENABLE_SuperLU:BOOL=OFF" +zoltan_OPTIONS="Zoltan_ENABLE_METIS:BOOL=OFF,Zoltan_ENABLE_F90INTERFACE:BOOL=ON" + +# CCE aborts when compiling one of Zoltan2's source if OpenMP is enabled. +#zoltan2_OPTIONS="Zoltan2_ENABLE_OpenMP:BOOL=OFF" + +# Workaround for https://github.com/trilinos/Trilinos/issues/244 +#zoltan2_OPTIONS="$zoltan2_OPTIONS,Zoltan2_ENABLE_Scotch:BOOL=OFF" + +: ${CRAY_CPU_TARGET=`uname -m`} +case "$compiler" in + crayclang) + FFLAGS="-ef -hnocaf $FFLAGS" + ;; + gnu) + FFLAGS="$FFLAGS" + ;; + aocc) + LIBS="$LIBS${LIBS+ }-lm" + ;; +esac +case "$compiler" in + cray|pgi) mpi_long_double=0 ;; + *) mpi_long_double=1 ;; +esac + +if test ${make_using_modules} -eq 1; then + boost_dir=${BOOST_DIR} + matio_dir=${MATIO_DIR} + metis_dir=${METIS_DIR} + mumps_dir=${MUMPS_DIR} + parmetis_dir=${PARMETIS_DIR} + scotch_dir=${SCOTCH_DIR} + superlu_dir=${SUPERLU_DIR} + superlu_dist_dir=${SUPERLU_DIST_DIR} + metis_libs="" + parmetis_libs="" + mumps_libs="" + scotch_libs="" + superlu_libs="" + superlu_dist_libs="" +else + boost_dir=${prefix} + matio_dir=${prefix} + metis_dir=${prefix} + mumps_dir=${prefix} + parmetis_dir=${prefix} + scotch_dir=${prefix} + superlu_dir=${prefix} + superlu_dist_dir=${prefix} + metis_libs="metis" + parmetis_libs="parmetis;metis" + mumps_libs="dmumps;zmumps;smumps;cmumps;mumps_common;esmumps;ptesmumps;parmetis;ptscotch;scotch;scotcherr;pord" + scotch_libs="ptscotch;ptscotcherr;scotch;scotcherr" + superlu_libs="superlu superlu_3.0 superlu_4.0 superlu_4.1 superlu_4.2 superlu_4.3 superlu_5.0 superlu_5.1.1 superlu_5.2.1 superlu_5.2.2" + superlu_dist_libs="superludist superlu_dist superlu_dist_2.0 superlu_dist_2.5 superlu_dist_4.0" +fi + + +mkdir -p "_build-${PE_ENV}" && cd "_build-${PE_ENV}" + +cat >configure-trilinos.sh <>configure-trilinos.sh <>configure-trilinos.sh + fi +done + + +# Include any additional cmake configuration options specified +# SEACAS Supes kills aocc 3.2 Fortran so disable for now +cat >>configure-trilinos.sh <>configure-trilinos.sh <