From b859e1026bb21c36df5000f9ad6e92d7f899a925 Mon Sep 17 00:00:00 2001 From: BrandonJLazard Date: Tue, 18 Jun 2024 17:51:59 -0600 Subject: [PATCH 1/6] Added a check for correct configuration before the actual configuration script runs --- configure | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 0c52dd45..d8535128 100755 --- a/configure +++ b/configure @@ -474,6 +474,22 @@ do esac done + +if [ ! -z $RAMKLROOT ] + then +elif [[ ! -z $FFTWROOT && ! -z $BLASROOT && ! -z $LPROOT ]]; + then +elif [[ ! -z $FFTWROOT && ! -z $BLASROOT && "$USEOPENBLAS" == "TRUE" ]] + then +else + echo "Error Code 1" + echo "Incorrect configuration" + exit 1 +fi + + + + echo "" echo " -----------------------------------------------------------------------------" VERSION_FILE="VERSION" @@ -838,9 +854,9 @@ echo "" # Standard LIBRARIES if [[ $OSTYPE == *"darwin"* ]] then - STD_FLAGS="" + STD_FLAGS="-lc++" else - STD_FLAGS="" + STD_FLAGS="-lstdc++" fi ############################################################################################### From fd5ada8ded095f1ac3bd3ca96c10fe2cee6fbc17 Mon Sep 17 00:00:00 2001 From: BrandonJLazard Date: Wed, 19 Jun 2024 12:52:25 -0600 Subject: [PATCH 2/6] removed stdc++ flags again? --- configure | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/configure b/configure index d8535128..783ce019 100755 --- a/configure +++ b/configure @@ -488,8 +488,6 @@ else fi - - echo "" echo " -----------------------------------------------------------------------------" VERSION_FILE="VERSION" @@ -854,9 +852,9 @@ echo "" # Standard LIBRARIES if [[ $OSTYPE == *"darwin"* ]] then - STD_FLAGS="-lc++" + STD_FLAGS="" else - STD_FLAGS="-lstdc++" + STD_FLAGS="" fi ############################################################################################### From 8c63dd5efa695bbb63c9fc42de11d56551312f89 Mon Sep 17 00:00:00 2001 From: BrandonJLazard Date: Wed, 19 Jun 2024 14:48:09 -0600 Subject: [PATCH 3/6] fixed syntax error --- configure | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configure b/configure index 783ce019..e40a6ce8 100755 --- a/configure +++ b/configure @@ -477,10 +477,13 @@ done if [ ! -z $RAMKLROOT ] then + echo "Correct Configuration" elif [[ ! -z $FFTWROOT && ! -z $BLASROOT && ! -z $LPROOT ]]; then + echo "Correct Configuration" elif [[ ! -z $FFTWROOT && ! -z $BLASROOT && "$USEOPENBLAS" == "TRUE" ]] then + echo "Correct Configuration" else echo "Error Code 1" echo "Incorrect configuration" From 9f30ce87d2429578309b0a365ef7eae87c686e46 Mon Sep 17 00:00:00 2001 From: BrandonJLazard Date: Thu, 20 Jun 2024 10:00:42 -0600 Subject: [PATCH 4/6] changed conditionals --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index e40a6ce8..30fd0974 100755 --- a/configure +++ b/configure @@ -475,7 +475,7 @@ do esac done -if [ ! -z $RAMKLROOT ] +if [ "$USE_MKL" == "TRUE" ] then echo "Correct Configuration" elif [[ ! -z $FFTWROOT && ! -z $BLASROOT && ! -z $LPROOT ]]; From 33d01c2458f1c43ec770a360902b3d4365df5411 Mon Sep 17 00:00:00 2001 From: BrandonJLazard Date: Thu, 20 Jun 2024 10:48:19 -0600 Subject: [PATCH 5/6] Edited the github conda test to include the fftw and blas flags --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7a9037fe..d130a511 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -128,6 +128,6 @@ jobs: - name: Build Rayleigh run: | cd "$GITHUB_WORKSPACE" - ./configure --openblas --FC=mpifort --FFLAGS_DBG='-O0 -g -fbounds-check -ffpe-trap=invalid,zero,overflow -fbacktrace -ffixed-line-length-132 -Wall' + ./configure --openblas --with-blas=$CONDA_PREFIX --with-fftw=$CONDA_PREFIX --FC=mpifort --FFLAGS_DBG='-O0 -g -fbounds-check -ffpe-trap=invalid,zero,overflow -fbacktrace -ffixed-line-length-132 -Wall' make -j make install From ac8aaa2024d8f5b3cbec9163611f005e8cb742e8 Mon Sep 17 00:00:00 2001 From: BrandonJLazard Date: Thu, 20 Jun 2024 11:05:31 -0600 Subject: [PATCH 6/6] Updated error code message for incorrect configuration --- configure | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/configure b/configure index 30fd0974..bc54cc3f 100755 --- a/configure +++ b/configure @@ -477,16 +477,18 @@ done if [ "$USE_MKL" == "TRUE" ] then - echo "Correct Configuration" + echo "" elif [[ ! -z $FFTWROOT && ! -z $BLASROOT && ! -z $LPROOT ]]; then - echo "Correct Configuration" + echo "" elif [[ ! -z $FFTWROOT && ! -z $BLASROOT && "$USEOPENBLAS" == "TRUE" ]] then - echo "Correct Configuration" + echo "" else - echo "Error Code 1" - echo "Incorrect configuration" + echo "Configuration Error: One of the three combinations must be satisfied" + echo " 1)The location of MKL is specified." + echo " 2)The location of fftw, blas, and lapack is specified." + echo " 3)The location of fftw, blas, and openblas is specified." exit 1 fi