From 626a37129760075ac0eb458339a78124e64a1874 Mon Sep 17 00:00:00 2001 From: seshadri levante Date: Thu, 25 Jul 2024 11:19:56 +0200 Subject: [PATCH 1/3] Added export command in env.sh to recitify 'Not found blas' for cpu compilation --- env.sh | 7 ++++++- env/levante.dkrz.de/shell.gnu | 2 +- env/levante.dkrz.de/shell.intel | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/env.sh b/env.sh index 6fff86847..687e8c362 100755 --- a/env.sh +++ b/env.sh @@ -54,6 +54,11 @@ elif [[ $LOGINHOST =~ ^m[A-Za-z0-9]+\.hpc\.dkrz\.de$ ]]; then STRATEGY="mistral.dkrz.de" elif [[ $LOGINHOST =~ ^levante ]] || [[ $LOGINHOST =~ ^l[:alnum:]+\.lvt\.dkrz\.de$ ]]; then STRATEGY="levante.dkrz.de" + # following regex only matches if input is 2 word like levante.nvhpc + compid_regex="^([[:alnum:]]+)\.([[:alnum:]]+)$" + if [[ $LOGINHOST =~ $compid_regex ]]; then + COMPILERID="${BASH_REMATCH[2]}" + fi elif [[ $LOGINHOST =~ ^ollie[0-9]$ ]] || [[ $LOGINHOST =~ ^prod-[0-9]{4}$ ]]; then STRATEGY="ollie" elif [[ $LOGINHOST =~ ^albedo[0-9]$ ]] || [[ $LOGINHOST =~ ^prod-[0-9]{4}$ ]]; then @@ -112,4 +117,4 @@ else echo "Sourcing $(realpath $SHELLFILE) for environment" source $SHELLFILE echo "$(realpath ${SHELLFILE})" > $DIR/bin/current_shell_path -fi +fi \ No newline at end of file diff --git a/env/levante.dkrz.de/shell.gnu b/env/levante.dkrz.de/shell.gnu index fd85dc154..d42c0ca4b 100755 --- a/env/levante.dkrz.de/shell.gnu +++ b/env/levante.dkrz.de/shell.gnu @@ -18,7 +18,7 @@ export FC=mpif90 CC=mpicc CXX=mpicxx # following is only needed for libblas which is needed by params lib and often provided by lapack #module load intel-oneapi-mkl/2022.0.1-gcc-11.2.0 # so use the LD_LIBRARY_PATH or other paths like prefix paths etc for cmake -#export LD_LIBRARY_PATH=/sw/spack-levante/intel-oneapi-mkl-2022.0.1-ttdktf/mkl/2022.0.1/lib/intel64:$LD_LIBRARY_PATH +export LD_LIBRARY_PATH=/sw/spack-levante/intel-oneapi-mkl-2022.0.1-ttdktf/mkl/2022.0.1/lib/intel64:$LD_LIBRARY_PATH spack load intel-oneapi-mkl@2022.0.1%gcc@11.2.0 #other alternative blas diff --git a/env/levante.dkrz.de/shell.intel b/env/levante.dkrz.de/shell.intel index e087c7f84..777e55f0d 100755 --- a/env/levante.dkrz.de/shell.intel +++ b/env/levante.dkrz.de/shell.intel @@ -9,7 +9,7 @@ module load openmpi/4.1.2-intel-2021.5.0 export FC=mpif90 CC=mpicc CXX=mpicxx ; spack load intel-oneapi-mkl@2022.0.1%gcc@11.2.0 # this handles adding to path elegantly then using hardcoded path below #module load intel-oneapi-mkl/2022.0.1-gcc-11.2.0 -#export LD_LIBRARY_PATH=/sw/spack-levante/intel-oneapi-mkl-2022.0.1-ttdktf/mkl/2022.0.1/lib/intel64:$LD_LIBRARY_PATH +export LD_LIBRARY_PATH=/sw/spack-levante/intel-oneapi-mkl-2022.0.1-ttdktf/mkl/2022.0.1/lib/intel64:$LD_LIBRARY_PATH module load netcdf-c/4.8.1-openmpi-4.1.2-intel-2021.5.0 module load netcdf-fortran/4.5.3-openmpi-4.1.2-intel-2021.5.0 From 5d4473ddb182889fbfd2ca877194278e6bcdd342 Mon Sep 17 00:00:00 2001 From: seshadri levante Date: Tue, 24 Sep 2024 14:06:06 +0200 Subject: [PATCH 2/3] Removed the unnecessary exports in shell.gnu and shell.intel --- env/levante.dkrz.de/shell.gnu | 3 +-- env/levante.dkrz.de/shell.intel | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/env/levante.dkrz.de/shell.gnu b/env/levante.dkrz.de/shell.gnu index d42c0ca4b..4bacf20aa 100755 --- a/env/levante.dkrz.de/shell.gnu +++ b/env/levante.dkrz.de/shell.gnu @@ -18,8 +18,7 @@ export FC=mpif90 CC=mpicc CXX=mpicxx # following is only needed for libblas which is needed by params lib and often provided by lapack #module load intel-oneapi-mkl/2022.0.1-gcc-11.2.0 # so use the LD_LIBRARY_PATH or other paths like prefix paths etc for cmake -export LD_LIBRARY_PATH=/sw/spack-levante/intel-oneapi-mkl-2022.0.1-ttdktf/mkl/2022.0.1/lib/intel64:$LD_LIBRARY_PATH -spack load intel-oneapi-mkl@2022.0.1%gcc@11.2.0 +#export LD_LIBRARY_PATH=/sw/spack-levante/intel-oneapi-mkl-2022.0.1-ttdktf/mkl/2022.0.1/lib/intel64:$LD_LIBRARY_PATH spack load intel-oneapi-mkl@2022.0.1%gcc@11.2.0 #other alternative blas #spack load netlib-lapack@3.9.1%gcc@11.2.0 diff --git a/env/levante.dkrz.de/shell.intel b/env/levante.dkrz.de/shell.intel index 777e55f0d..e087c7f84 100755 --- a/env/levante.dkrz.de/shell.intel +++ b/env/levante.dkrz.de/shell.intel @@ -9,7 +9,7 @@ module load openmpi/4.1.2-intel-2021.5.0 export FC=mpif90 CC=mpicc CXX=mpicxx ; spack load intel-oneapi-mkl@2022.0.1%gcc@11.2.0 # this handles adding to path elegantly then using hardcoded path below #module load intel-oneapi-mkl/2022.0.1-gcc-11.2.0 -export LD_LIBRARY_PATH=/sw/spack-levante/intel-oneapi-mkl-2022.0.1-ttdktf/mkl/2022.0.1/lib/intel64:$LD_LIBRARY_PATH +#export LD_LIBRARY_PATH=/sw/spack-levante/intel-oneapi-mkl-2022.0.1-ttdktf/mkl/2022.0.1/lib/intel64:$LD_LIBRARY_PATH module load netcdf-c/4.8.1-openmpi-4.1.2-intel-2021.5.0 module load netcdf-fortran/4.5.3-openmpi-4.1.2-intel-2021.5.0 From 59b3f64e8c55cee9865286be34fa6fdff047d0bf Mon Sep 17 00:00:00 2001 From: Raavan70 <124213816+basava70@users.noreply.github.com> Date: Tue, 24 Sep 2024 14:12:58 +0200 Subject: [PATCH 3/3] Update env.sh Co-authored-by: Miguel <63242832+mandresm@users.noreply.github.com> --- env.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/env.sh b/env.sh index 687e8c362..6ab2d3799 100755 --- a/env.sh +++ b/env.sh @@ -117,4 +117,4 @@ else echo "Sourcing $(realpath $SHELLFILE) for environment" source $SHELLFILE echo "$(realpath ${SHELLFILE})" > $DIR/bin/current_shell_path -fi \ No newline at end of file +fi