From 08a1517912d649846d938a1fd27bc351e4d6ae3e Mon Sep 17 00:00:00 2001 From: Leopold Talirz Date: Wed, 13 Jan 2021 12:30:51 +0100 Subject: [PATCH 1/4] add fftw3 library When running the old binary on MacOS, I'm getting WARNING : FFT library FFTW3 is not available Trying FFTSG as a default --- recipe/Darwin-x86-64-conda.ssmp | 4 ++-- recipe/Linux-x86-64-conda.ssmp | 3 ++- recipe/meta.yaml | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/recipe/Darwin-x86-64-conda.ssmp b/recipe/Darwin-x86-64-conda.ssmp index d6fe3ce..ef7bca8 100644 --- a/recipe/Darwin-x86-64-conda.ssmp +++ b/recipe/Darwin-x86-64-conda.ssmp @@ -18,9 +18,9 @@ CPP = $(CC)-cpp CPPFLAGS += -C -P -traditional -D__NO_IPI_DRIVER -nostdinc AR += -r -DFLAGS = -D__NO_STATM_ACCESS -D__ACCELERATE +DFLAGS = -D__NO_STATM_ACCESS -D__ACCELERATE -D__FFTW3 FCFLAGS = $(FFLAGS) -ffree-form $(DFLAGS) -fbacktrace -fopenmp -LIBS = -framework Accelerate +LIBS = -framework Accelerate -lfftw3 -lfftw3_omp # Using LDFLAGS_LD since cp2k passes the LDFLAGS directly to the linker LDFLAGS = $(LDFLAGS_LD) -lgfortran -lc -lgomp diff --git a/recipe/Linux-x86-64-conda.ssmp b/recipe/Linux-x86-64-conda.ssmp index e56edf8..83be3ba 100644 --- a/recipe/Linux-x86-64-conda.ssmp +++ b/recipe/Linux-x86-64-conda.ssmp @@ -18,8 +18,9 @@ AR = $(GCC_AR) -r CPPFLAGS += -C -P -traditional -D__NO_IPI_DRIVER -nostdinc +DFLAGS = -D__FFTW3 FCFLAGS = $(FFLAGS) -ffree-form -fopenmp -LIBS = -llapack -lblas +LIBS = -llapack -lblas -fftw3 -lfftw3_omp # Since LDFLAGS_LD is missing, we are linking using gfortran (which can use LDFLAGS) LD = $(FC) LDFLAGS += -fopenmp -Wl,-lgomp diff --git a/recipe/meta.yaml b/recipe/meta.yaml index efa5088..4409fe4 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -13,7 +13,7 @@ source: - macosxtest.patch # [osx] build: - number: 3 + number: 4 skip: True # [not (linux or osx) ] requirements: @@ -32,6 +32,7 @@ requirements: host: - libblas - liblapack + - fftw test: commands: From 8630acecfd8c65f9784344d6986e38c14a6e9661 Mon Sep 17 00:00:00 2001 From: conda-forge-linter Date: Wed, 13 Jan 2021 11:33:59 +0000 Subject: [PATCH 2/4] MNT: Re-rendered with conda-build 3.21.3, conda-smithy 3.8.6, and conda-forge-pinning 2021.01.13.11.13.22 --- .ci_support/linux_64_.yaml | 7 +++++++ .ci_support/osx_64_.yaml | 5 +++++ .scripts/run_docker_build.sh | 12 ++++++++---- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/.ci_support/linux_64_.yaml b/.ci_support/linux_64_.yaml index 5bba3e0..7f8ae96 100644 --- a/.ci_support/linux_64_.yaml +++ b/.ci_support/linux_64_.yaml @@ -14,6 +14,8 @@ cxx_compiler_version: - '9' docker_image: - quay.io/condaforge/linux-anvil-comp7 +fftw: +- '3' fortran_compiler: - gfortran fortran_compiler_version: @@ -22,9 +24,14 @@ libblas: - 3.8 *netlib liblapack: - 3.8 *netlib +pin_run_as_build: + fftw: + max_pin: x target_platform: - linux-64 zip_keys: - - c_compiler_version - cxx_compiler_version - fortran_compiler_version +- - cdt_name + - docker_image diff --git a/.ci_support/osx_64_.yaml b/.ci_support/osx_64_.yaml index c83fa57..42bef9c 100644 --- a/.ci_support/osx_64_.yaml +++ b/.ci_support/osx_64_.yaml @@ -12,6 +12,8 @@ cxx_compiler: - clangxx cxx_compiler_version: - '11' +fftw: +- '3' fortran_compiler: - gfortran fortran_compiler_version: @@ -22,6 +24,9 @@ liblapack: - 3.8 *netlib macos_machine: - x86_64-apple-darwin13.4.0 +pin_run_as_build: + fftw: + max_pin: x target_platform: - osx-64 zip_keys: diff --git a/.scripts/run_docker_build.sh b/.scripts/run_docker_build.sh index 87ba4db..36dacd6 100755 --- a/.scripts/run_docker_build.sh +++ b/.scripts/run_docker_build.sh @@ -45,8 +45,12 @@ fi if [ -z "${DOCKER_IMAGE}" ]; then SHYAML_INSTALLED="$(shyaml -h || echo NO)" if [ "${SHYAML_INSTALLED}" == "NO" ]; then - echo "WARNING: DOCKER_IMAGE variable not set and shyaml not installed. Falling back to condaforge/linux-anvil-comp7" - DOCKER_IMAGE="condaforge/linux-anvil-comp7" + echo "WARNING: DOCKER_IMAGE variable not set and shyaml not installed. Trying to parse with coreutils" + DOCKER_IMAGE=$(cat .ci_support/${CONFIG}.yaml | grep '^docker_image:$' -A 1 | tail -n 1 | cut -b 3-) + if [ "${DOCKER_IMAGE}" = "" ]; then + echo "No docker_image entry found in ${CONFIG}. Falling back to condaforge/linux-anvil-comp7" + DOCKER_IMAGE="condaforge/linux-anvil-comp7" + fi else DOCKER_IMAGE="$(cat "${FEEDSTOCK_ROOT}/.ci_support/${CONFIG}.yaml" | shyaml get-value docker_image.0 condaforge/linux-anvil-comp7 )" fi @@ -64,8 +68,8 @@ fi export UPLOAD_PACKAGES="${UPLOAD_PACKAGES:-True}" docker run ${DOCKER_RUN_ARGS} \ - -v "${RECIPE_ROOT}":/home/conda/recipe_root:rw,z \ - -v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root:rw,z \ + -v "${RECIPE_ROOT}":/home/conda/recipe_root:rw,z,delegated \ + -v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root:rw,z,delegated \ -e CONFIG \ -e HOST_USER_ID \ -e UPLOAD_PACKAGES \ From 8d8378ceb6b7efd778970f7006364b7d196cf40d Mon Sep 17 00:00:00 2001 From: Leopold Talirz Date: Wed, 13 Jan 2021 15:27:33 +0100 Subject: [PATCH 3/4] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Tiziano Müller --- recipe/Darwin-x86-64-conda.ssmp | 2 +- recipe/Linux-x86-64-conda.ssmp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/recipe/Darwin-x86-64-conda.ssmp b/recipe/Darwin-x86-64-conda.ssmp index ef7bca8..ca21aad 100644 --- a/recipe/Darwin-x86-64-conda.ssmp +++ b/recipe/Darwin-x86-64-conda.ssmp @@ -19,7 +19,7 @@ CPP = $(CC)-cpp CPPFLAGS += -C -P -traditional -D__NO_IPI_DRIVER -nostdinc AR += -r DFLAGS = -D__NO_STATM_ACCESS -D__ACCELERATE -D__FFTW3 -FCFLAGS = $(FFLAGS) -ffree-form $(DFLAGS) -fbacktrace -fopenmp +FCFLAGS = $(FFLAGS) -fbacktrace -ffree-form -fimplicit-none -std=f2008 -fopenmp $(DFLAGS) LIBS = -framework Accelerate -lfftw3 -lfftw3_omp # Using LDFLAGS_LD since cp2k passes the LDFLAGS directly to the linker diff --git a/recipe/Linux-x86-64-conda.ssmp b/recipe/Linux-x86-64-conda.ssmp index 83be3ba..2ee113b 100644 --- a/recipe/Linux-x86-64-conda.ssmp +++ b/recipe/Linux-x86-64-conda.ssmp @@ -19,7 +19,7 @@ AR = $(GCC_AR) -r CPPFLAGS += -C -P -traditional -D__NO_IPI_DRIVER -nostdinc DFLAGS = -D__FFTW3 -FCFLAGS = $(FFLAGS) -ffree-form -fopenmp +FCFLAGS = $(FFLAGS) -fbacktrace -ffree-form -fimplicit-none -std=f2008 -fopenmp $(DFLAGS) LIBS = -llapack -lblas -fftw3 -lfftw3_omp # Since LDFLAGS_LD is missing, we are linking using gfortran (which can use LDFLAGS) LD = $(FC) From fa32749d3bc46209777da79f69a031af45a01e81 Mon Sep 17 00:00:00 2001 From: Leopold Talirz Date: Wed, 13 Jan 2021 17:58:55 +0100 Subject: [PATCH 4/4] fix typo --- recipe/Linux-x86-64-conda.ssmp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/Linux-x86-64-conda.ssmp b/recipe/Linux-x86-64-conda.ssmp index 2ee113b..2a27b5c 100644 --- a/recipe/Linux-x86-64-conda.ssmp +++ b/recipe/Linux-x86-64-conda.ssmp @@ -20,7 +20,7 @@ AR = $(GCC_AR) -r CPPFLAGS += -C -P -traditional -D__NO_IPI_DRIVER -nostdinc DFLAGS = -D__FFTW3 FCFLAGS = $(FFLAGS) -fbacktrace -ffree-form -fimplicit-none -std=f2008 -fopenmp $(DFLAGS) -LIBS = -llapack -lblas -fftw3 -lfftw3_omp +LIBS = -llapack -lblas -lfftw3 -lfftw3_omp # Since LDFLAGS_LD is missing, we are linking using gfortran (which can use LDFLAGS) LD = $(FC) LDFLAGS += -fopenmp -Wl,-lgomp