From a968c01ff777345f258e936ad69f625d10aea694 Mon Sep 17 00:00:00 2001 From: Steve Schmerler Date: Thu, 27 Jul 2023 19:42:28 +0200 Subject: [PATCH 1/2] Fix silent fail when grep doesn't find a match This can happen when e.g. the `find` before produces an empty result. --- .../total_energy_module/build_total_energy_module.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external_modules/total_energy_module/build_total_energy_module.sh b/external_modules/total_energy_module/build_total_energy_module.sh index a0ce3b9d2..57c1b252b 100755 --- a/external_modules/total_energy_module/build_total_energy_module.sh +++ b/external_modules/total_energy_module/build_total_energy_module.sh @@ -6,7 +6,7 @@ # or # $ F2PY=/usr/bin/f2py3 ./this.sh -set -euo pipefail +set -u err(){ echo "error $@" From 1c40d693f7d0457003d5dd5aadbc267f245f73da Mon Sep 17 00:00:00 2001 From: Steve Schmerler Date: Tue, 1 Aug 2023 12:36:58 +0200 Subject: [PATCH 2/2] Cleanup in build_total_energy_module.sh Remove out-commented code, fix typo. --- .../total_energy_module/build_total_energy_module.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/external_modules/total_energy_module/build_total_energy_module.sh b/external_modules/total_energy_module/build_total_energy_module.sh index 57c1b252b..7efb9214d 100755 --- a/external_modules/total_energy_module/build_total_energy_module.sh +++ b/external_modules/total_energy_module/build_total_energy_module.sh @@ -15,10 +15,7 @@ err(){ [ $# -eq 1 ] || err "Please provide exactly one argument (the path to the QE directory)" && root_dir=$1 -echo $root_dir - -# base dir of QE distribution -#root_dir=$(readlink -f ../) +echo "Using QE root dir: $root_dir" pw_src_path=$root_dir/PW/src @@ -39,7 +36,7 @@ project_lib_folders=" -L$root_dir/Modules -L$root_dir/KS_Solvers -L$root_dir/FFT project_libs="-lqemod -lks_solvers -lqefft -lqela -lutil -ldftd3qe -lupf -ldevXlib -lmbd" project_inc_folders="-I$root_dir/Modules -I$root_dir/FFTXlib/src -I$root_dir/LAXlib -I$root_dir/KS_Solvers -I$root_dir/UtilXlib -I$root_dir/upflib -I$root_dir/XClib -I$root_dir/external/devxlib/src -I$root_dir/external/mbd/src" -# default: systen blas,lapack and fftw, adapt as needed +# default: system blas,lapack and fftw, adapt as needed linalg="-lblas -llapack" fftw="-lfftw3"