From c68dfede510b54746ede384663dfeef5e72ff79c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20Rodr=C3=ADguez-Guerra?= Date: Thu, 19 Dec 2019 12:05:47 +0100 Subject: [PATCH 01/52] Enable CI for ppc64le --- conda-forge.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/conda-forge.yml b/conda-forge.yml index da4dd898..8e085983 100644 --- a/conda-forge.yml +++ b/conda-forge.yml @@ -4,3 +4,5 @@ travis: appveyor: secure: BINSTAR_TOKEN: tumuXLL8PU75WMnRDemRy02ruEq2RpNxeK3dz0MjFssnosPm2v4EFjfNB4PTotA1 +provider: + linux_ppc64le: default From 2e69790c07e88c1ca8454440ec1b9825a609448b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20Rodr=C3=ADguez-Guerra?= Date: Thu, 19 Dec 2019 12:11:49 +0100 Subject: [PATCH 02/52] Update source URLs and build requirements --- recipe/meta.yaml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 756ae1de..d1563041 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -8,9 +8,8 @@ package: version: {{ version }} source: - # the tool is GPL licensed but the download is not possible without registration, so we use a copy here - url: https://bitbucket.org/simonbray/ambertools/raw/9e3a9289ca97a2ba0f58cebdfb102c88e8912d9f/AmberTools19.tar.bz2 - sha256: 8315929b8e1d597907405ddab31d41c556a777f7df7df98745ee9d08c980bae5 + url: https://ambermd.org/downloads/AmberTools19.tar.bz2 + sha256: 0c86937904854b64e4831e047851f504ec45b42e593db4ded92c1bee5973e699 build: number: 0 @@ -26,7 +25,7 @@ requirements: - patch - tcsh - bison - - openmp + - llvm-openmp host: - python - numpy @@ -58,7 +57,7 @@ about: description: | AmberTools is a set of programs for biomolecular simulation and analysis. They are designed to work well with each other, and with the “regular” Amber - suite of programs. You can perform many simulation tasks with AmberTools, + suite of programs. You can perform many simulation tasks with AmberTools, and you can do more extensive simulations with the combination of AmberTools and Amber itself. From c527efdcc49266b39b63ccaab2f2d36b16a12095 Mon Sep 17 00:00:00 2001 From: conda-forge-admin Date: Thu, 19 Dec 2019 11:16:01 +0000 Subject: [PATCH 03/52] MNT: Re-rendered with conda-build 3.18.11, conda-smithy 3.6.5, and conda-forge-pinning 2019.12.18 --- .ci_support/linux_ppc64le_python3.6.yaml | 38 ++++++++++++++++++++++++ .ci_support/linux_ppc64le_python3.7.yaml | 38 ++++++++++++++++++++++++ .ci_support/linux_ppc64le_python3.8.yaml | 38 ++++++++++++++++++++++++ .travis.yml | 30 +++++++++++++++++++ README.md | 38 +++++++++++++++++++----- 5 files changed, 174 insertions(+), 8 deletions(-) create mode 100644 .ci_support/linux_ppc64le_python3.6.yaml create mode 100644 .ci_support/linux_ppc64le_python3.7.yaml create mode 100644 .ci_support/linux_ppc64le_python3.8.yaml create mode 100644 .travis.yml diff --git a/.ci_support/linux_ppc64le_python3.6.yaml b/.ci_support/linux_ppc64le_python3.6.yaml new file mode 100644 index 00000000..90138e23 --- /dev/null +++ b/.ci_support/linux_ppc64le_python3.6.yaml @@ -0,0 +1,38 @@ +boost: +- 1.70.0 +bzip2: +- '1' +c_compiler: +- gcc +c_compiler_version: +- '8' +channel_sources: +- conda-forge,defaults +channel_targets: +- conda-forge main +cxx_compiler: +- gxx +cxx_compiler_version: +- '8' +docker_image: +- condaforge/linux-anvil-ppc64le +fortran_compiler: +- gfortran +fortran_compiler_version: +- '8' +numpy: +- '1.16' +pin_run_as_build: + boost: + max_pin: x.x.x + bzip2: + max_pin: x + python: + min_pin: x.x + max_pin: x.x + zlib: + max_pin: x.x +python: +- '3.6' +zlib: +- '1.2' diff --git a/.ci_support/linux_ppc64le_python3.7.yaml b/.ci_support/linux_ppc64le_python3.7.yaml new file mode 100644 index 00000000..64409979 --- /dev/null +++ b/.ci_support/linux_ppc64le_python3.7.yaml @@ -0,0 +1,38 @@ +boost: +- 1.70.0 +bzip2: +- '1' +c_compiler: +- gcc +c_compiler_version: +- '8' +channel_sources: +- conda-forge,defaults +channel_targets: +- conda-forge main +cxx_compiler: +- gxx +cxx_compiler_version: +- '8' +docker_image: +- condaforge/linux-anvil-ppc64le +fortran_compiler: +- gfortran +fortran_compiler_version: +- '8' +numpy: +- '1.16' +pin_run_as_build: + boost: + max_pin: x.x.x + bzip2: + max_pin: x + python: + min_pin: x.x + max_pin: x.x + zlib: + max_pin: x.x +python: +- '3.7' +zlib: +- '1.2' diff --git a/.ci_support/linux_ppc64le_python3.8.yaml b/.ci_support/linux_ppc64le_python3.8.yaml new file mode 100644 index 00000000..8b6c17c2 --- /dev/null +++ b/.ci_support/linux_ppc64le_python3.8.yaml @@ -0,0 +1,38 @@ +boost: +- 1.70.0 +bzip2: +- '1' +c_compiler: +- gcc +c_compiler_version: +- '8' +channel_sources: +- conda-forge,defaults +channel_targets: +- conda-forge main +cxx_compiler: +- gxx +cxx_compiler_version: +- '8' +docker_image: +- condaforge/linux-anvil-ppc64le +fortran_compiler: +- gfortran +fortran_compiler_version: +- '8' +numpy: +- '1.16' +pin_run_as_build: + boost: + max_pin: x.x.x + bzip2: + max_pin: x + python: + min_pin: x.x + max_pin: x.x + zlib: + max_pin: x.x +python: +- '3.8' +zlib: +- '1.2' diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..3d531d9a --- /dev/null +++ b/.travis.yml @@ -0,0 +1,30 @@ +# This file was generated automatically from conda-smithy. To update this configuration, +# update the conda-forge.yml and/or the recipe/meta.yaml. + +language: generic + +env: + global: + # The BINSTAR_TOKEN secure variable. This is defined canonically in conda-forge.yml. + - secure: "ZNIy6T7/kNes/ESO1cPEGmBCwFhbDQykZ3xMaQu2Fo9ELzDRD5YEnViGZFwLTKjq+LvfnzdXxTtJXJ1FiyrIJG0OBCFMvr8eLq+NhQHgpoRUh7Ow1lKcjeV64/rQRHeTkZXkHQQmhpbnKHt9xhwGLFNoMoYbtY/i94Z1X4z4FAeSndqWNM+9pdSQhgORhrvl+MntOv/6SEWr18zRsS5pKQpONztFTUF2vImkQuqTCyFlj8bpwbcWG+7UHgdLOzxGXEDEFrJEO4yIuGCJMB+dGmB521t9ZJcJAb7W0BV/zt+SY7Z/w2b+ND13DDDGRtfcIqLG/IJGAYJJcvnBBTwrdaAbcEh7Yo7M8/v2BT4bT2c8TflSCB1a8Y+bJ+wIXkm0F9EishfvmRY3QbCkfKSWQNXaMeKTWzK1fZeo70DXe2yyd36GGTNWqQ4HaP8CUfZgvIw0SbpA1ICFxtC6dtqmdiDb0FCIq3YV+gUQC8rYdpPdG6Vtx5ycJNFvDRWTc6KDPk7tZn+ZPq3BF1M7eCuSOMvP4KnTzFsx0Yg1O8eR/FGV7w2qE6nHxb1xvmwlmq7MUcsbxKeTV3rARNCd5SYnWdy3DZ+92Se9pATbP7vtSu7aEPZkjb1+NwLO6u5APIx3U/xhBFmPqb78aawS6RdiA41y05hWeMgsQh4eu5hRdLQ=" + +matrix: + include: + - env: CONFIG=linux_ppc64le_python3.6 UPLOAD_PACKAGES=True PLATFORM=linux-ppc64le DOCKER_IMAGE=condaforge/linux-anvil-ppc64le + os: linux + arch: ppc64le + + - env: CONFIG=linux_ppc64le_python3.7 UPLOAD_PACKAGES=True PLATFORM=linux-ppc64le DOCKER_IMAGE=condaforge/linux-anvil-ppc64le + os: linux + arch: ppc64le + + - env: CONFIG=linux_ppc64le_python3.8 UPLOAD_PACKAGES=True PLATFORM=linux-ppc64le DOCKER_IMAGE=condaforge/linux-anvil-ppc64le + os: linux + arch: ppc64le + +script: + - export CI=travis + - export GIT_BRANCH="$TRAVIS_BRANCH" + + + - if [[ ${PLATFORM} =~ .*linux.* ]]; then ./.scripts/run_docker_build.sh; fi \ No newline at end of file diff --git a/README.md b/README.md index 965b5876..a787cd27 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Summary: AmberTools is a set of programs for biomolecular simulation and analysi AmberTools is a set of programs for biomolecular simulation and analysis. They are designed to work well with each other, and with the “regular” Amber -suite of programs. You can perform many simulation tasks with AmberTools, +suite of programs. You can perform many simulation tasks with AmberTools, and you can do more extensive simulations with the combination of AmberTools and Amber itself. @@ -20,7 +20,14 @@ Current build status ==================== - +
+ + + @@ -34,6 +41,27 @@ Current build status
Travis + + macOS + +
Azure
+ + + + + + + + + - - - -
VariantStatus
linux_ppc64le_python3.6 + + variant + +
linux_ppc64le_python3.7 + + variant + +
linux_ppc64le_python3.8 + + variant + +
linux_python3.6 @@ -72,12 +100,6 @@ Current build status Windows disabled
Linux_ppc64le - ppc64le disabled -
Current release info From 4a0974b7fb23007ffb644c36f045fee0e482ce41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20Rodr=C3=ADguez-Guerra?= Date: Thu, 19 Dec 2019 12:18:24 +0100 Subject: [PATCH 04/52] llvm-openmp is only needed for MacOS --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index d1563041..1f40e40b 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -25,7 +25,7 @@ requirements: - patch - tcsh - bison - - llvm-openmp + - llvm-openmp # [osx] host: - python - numpy From aa270603eadf9dcf2b973a35648afe32ceb59156 Mon Sep 17 00:00:00 2001 From: Jaime RGP Date: Thu, 19 Dec 2019 12:55:50 +0100 Subject: [PATCH 05/52] Try with boost-cpp --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 1f40e40b..e47ab26f 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -31,7 +31,7 @@ requirements: - numpy - scipy - matplotlib-base - - boost + - boost-cpp - bzip2 - zlib run: From 1a1343b8295ce8252fba405521482d3b8da04be3 Mon Sep 17 00:00:00 2001 From: Jaime RGP Date: Thu, 19 Dec 2019 12:56:04 +0100 Subject: [PATCH 06/52] Bump build number --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index e47ab26f..5c7ddd55 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -12,7 +12,7 @@ source: sha256: 0c86937904854b64e4831e047851f504ec45b42e593db4ded92c1bee5973e699 build: - number: 0 + number: 1 skip: True # [win or osx or py2k] requirements: From b1d5112d0c03d3dab78f77cfc60953c4c58c27e5 Mon Sep 17 00:00:00 2001 From: Jaime RGP Date: Thu, 19 Dec 2019 13:07:37 +0100 Subject: [PATCH 07/52] Bring in patches from the MacOS PR --- recipe/configure.patch | 58 ++++++++++++++++++++++++++++++++++++++++++ recipe/meta.yaml | 2 ++ 2 files changed, 60 insertions(+) create mode 100644 recipe/configure.patch diff --git a/recipe/configure.patch b/recipe/configure.patch new file mode 100644 index 00000000..54a761b2 --- /dev/null +++ b/recipe/configure.patch @@ -0,0 +1,58 @@ +From 7330111e04424b1fd185b7375a71912a11e58a99 Mon Sep 17 00:00:00 2001 +From: Simon Bray +Date: Sat, 19 Oct 2019 12:36:42 +0200 +Subject: [PATCH 1/2] r + +--- + amber18/AmberTools/src/configure2 | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/amber18/AmberTools/src/configure2 b/amber18/AmberTools/src/configure2 +index 797380b..32470b5 100644 +--- a/amber18/AmberTools/src/configure2 ++++ b/amber18/AmberTools/src/configure2 +@@ -469,7 +469,7 @@ installtype='serial' + intel_compiler_flag_mkl='no' + intelmpi='no' + is_mac='no' +-ldflags='' ++ldflags=$LDFLAGS + ld='ld ' + lfs='yes' + lm='-lm' +-- +2.17.1 + + +From a8ba9ba188d5a5574c2d9b6e0a37463cf874a3b0 Mon Sep 17 00:00:00 2001 +From: Simon Bray +Date: Sat, 19 Oct 2019 13:19:28 +0200 +Subject: [PATCH 2/2] q + +--- + amber18/AmberTools/src/configure2 | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/amber18/AmberTools/src/configure2 b/amber18/AmberTools/src/configure2 +index 32470b5..3ed06f8 100644 +--- a/amber18/AmberTools/src/configure2 ++++ b/amber18/AmberTools/src/configure2 +@@ -408,11 +408,11 @@ EOF + + # Test for the presence of /bin/csh, since it's needed for installation + +-if [ ! -x /bin/csh ]; then +- echo "Error: /bin/csh not found on your system! Install csh or tcsh and rerun" +- echo " configure." +- exit 1 +-fi ++# if [ ! -x /bin/csh ]; then ++# echo "Error: /bin/csh not found on your system! Install csh or tcsh and rerun" ++# echo " configure." ++# exit 1 ++#fi + + #------------------------------------------------------------------------------ + # Process commandline configuration options: +-- +2.17.1 diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 5c7ddd55..11661a7b 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -10,6 +10,8 @@ package: source: url: https://ambermd.org/downloads/AmberTools19.tar.bz2 sha256: 0c86937904854b64e4831e047851f504ec45b42e593db4ded92c1bee5973e699 + patches: + - configure.patch build: number: 1 From a2cc519bde5b623c4f250356f1e8ba19a045cccb Mon Sep 17 00:00:00 2001 From: Jaime RGP Date: Sat, 28 Dec 2019 01:30:41 +0100 Subject: [PATCH 08/52] Fix netcdf/fftw errors --- recipe/build.sh | 14 +++++++++++--- recipe/fftw-as-ppc64.patch | 14 ++++++++++++++ recipe/meta.yaml | 10 +++++++--- 3 files changed, 32 insertions(+), 6 deletions(-) create mode 100644 recipe/fftw-as-ppc64.patch diff --git a/recipe/build.sh b/recipe/build.sh index c00aead4..5f4f1f54 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -1,11 +1,19 @@ -if [ $(uname) == "Darwin" ]; then +if [[ "$target_platform" == osx* ]]; then export COMPILER_SET="clang" fi -if [ $(uname) == "Linux" ]; then +if [[ "$target_platform" == linux* ]]; then export COMPILER_SET="gnu" fi +NO_SSE="" +if [[ "$target_platform" == linux-ppc64le ]]; then + # needed in ppc64le because otherwise fftw-3.3 does not compile + NO_SSE="-nosse" +fi + + + # Upgrade AmberTools source to the patch level specified by the MINOR version in $PKG_VERSION for n in {1..5}; do export PATCH_LEVEL=$(echo $PKG_VERSION | cut -d. -f2) @@ -14,7 +22,7 @@ for n in {1..5}; do done # Build AmberTools without further patching -echo 'N' | ./configure -noX11 -norism --with-python ${PREFIX}/bin/python --python-install local $COMPILER_SET +echo 'N' | ./configure $NO_SSE -noX11 -norism --with-netcdf ${PREFIX} --with-python ${PYTHON} --python-install local $COMPILER_SET # using the -openmp flag causes packages not to be included in the build # however, the RISM model requires OpenMP, so -norism is set # the --prefix tag does not work, so copy the files manually to $PREFIX diff --git a/recipe/fftw-as-ppc64.patch b/recipe/fftw-as-ppc64.patch new file mode 100644 index 00000000..cecfa728 --- /dev/null +++ b/recipe/fftw-as-ppc64.patch @@ -0,0 +1,14 @@ +diff --git a/AmberTools/src/configure2 b/AmberTools/src/configure2 +index 797380b5..9494671c 100755 +--- a/AmberTools/src/configure2 ++++ b/AmberTools/src/configure2 +@@ -3087,7 +3087,8 @@ if [ "$has_fftw3" = 'yes' ]; then + else + cd fftw-3.3 && \ + ./configure --prefix=$amberprefix --libdir=$amberprefix/lib \ +- --enable-static $enable_mpi $mpicc $enable_debug $enable_sse\ ++ --enable-static $enable_mpi $mpicc $enable_debug \ ++ --build=ppc64-unknown-linux \ + CC="$cc" CFLAGS="$cflags $coptflags" \ + F77="$fc" FFLAGS="$fflags $foptflags" \ + FLIBS="$flibs_arch" \ diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 11661a7b..ab121c5e 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -12,6 +12,7 @@ source: sha256: 0c86937904854b64e4831e047851f504ec45b42e593db4ded92c1bee5973e699 patches: - configure.patch + - fftw-as-ppc64.patch # [ppc64le] build: number: 1 @@ -27,15 +28,18 @@ requirements: - patch - tcsh - bison - - llvm-openmp # [osx] + - make + - libnetcdf + - netcdf-fortran host: - python - numpy - - scipy - - matplotlib-base - boost-cpp - bzip2 - zlib + - libnetcdf + - netcdf-fortran + - llvm-openmp # [osx] run: - python - numpy From 804e6dea1150f1bb1cace51a955e0f9354bbc2c2 Mon Sep 17 00:00:00 2001 From: Jaime RGP Date: Sat, 28 Dec 2019 12:18:31 +0100 Subject: [PATCH 09/52] Update requirements --- recipe/meta.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index ab121c5e..6dec2d8e 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -31,8 +31,11 @@ requirements: - make - libnetcdf - netcdf-fortran + - perl host: - python + - cython + - setuptools - numpy - boost-cpp - bzip2 @@ -44,7 +47,8 @@ requirements: - python - numpy - scipy - - matplotlib-base + - matplotlib + - cython test: commands: From e2fcc23e6b4b0e23a281338dea1cd13b6a6d07fd Mon Sep 17 00:00:00 2001 From: Jaime RGP Date: Sat, 28 Dec 2019 13:53:14 +0100 Subject: [PATCH 10/52] Try to fix warnings --- recipe/build.sh | 2 ++ recipe/meta.yaml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/recipe/build.sh b/recipe/build.sh index 5f4f1f54..fff2a28b 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -10,6 +10,8 @@ NO_SSE="" if [[ "$target_platform" == linux-ppc64le ]]; then # needed in ppc64le because otherwise fftw-3.3 does not compile NO_SSE="-nosse" + # needed for boost arch detection + export TOOLSET="gcc" fi diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 6dec2d8e..5880337b 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -49,6 +49,8 @@ requirements: - scipy - matplotlib - cython + - libnetcdf + - netcdf-fortran test: commands: From 5a0c8e1244b91bf0f7141fff8fefbb987f17ac7b Mon Sep 17 00:00:00 2001 From: Jaime RGP Date: Sat, 28 Dec 2019 14:09:40 +0100 Subject: [PATCH 11/52] Additional patches are needed for ppc64le --- recipe/build.sh | 2 -- recipe/meta.yaml | 2 +- recipe/{fftw-as-ppc64.patch => ppc_fixes.patch} | 11 ++++++++++- 3 files changed, 11 insertions(+), 4 deletions(-) rename recipe/{fftw-as-ppc64.patch => ppc_fixes.patch} (59%) diff --git a/recipe/build.sh b/recipe/build.sh index fff2a28b..5f4f1f54 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -10,8 +10,6 @@ NO_SSE="" if [[ "$target_platform" == linux-ppc64le ]]; then # needed in ppc64le because otherwise fftw-3.3 does not compile NO_SSE="-nosse" - # needed for boost arch detection - export TOOLSET="gcc" fi diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 5880337b..69141c8d 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -12,7 +12,7 @@ source: sha256: 0c86937904854b64e4831e047851f504ec45b42e593db4ded92c1bee5973e699 patches: - configure.patch - - fftw-as-ppc64.patch # [ppc64le] + - ppc_fixes.patch # [ppc64le] build: number: 1 diff --git a/recipe/fftw-as-ppc64.patch b/recipe/ppc_fixes.patch similarity index 59% rename from recipe/fftw-as-ppc64.patch rename to recipe/ppc_fixes.patch index cecfa728..121f1fce 100644 --- a/recipe/fftw-as-ppc64.patch +++ b/recipe/ppc_fixes.patch @@ -1,5 +1,5 @@ diff --git a/AmberTools/src/configure2 b/AmberTools/src/configure2 -index 797380b5..9494671c 100755 +index 797380b5..8f071b8b 100755 --- a/AmberTools/src/configure2 +++ b/AmberTools/src/configure2 @@ -3087,7 +3087,8 @@ if [ "$has_fftw3" = 'yes' ]; then @@ -12,3 +12,12 @@ index 797380b5..9494671c 100755 CC="$cc" CFLAGS="$cflags $coptflags" \ F77="$fc" FFLAGS="$fflags $foptflags" \ FLIBS="$flibs_arch" \ +@@ -3158,7 +3159,7 @@ fi + if [ "$cuda" = "no" ]; then + printf "\nConfiguring boost (may be time-consuming)..." + cd boost +- ./bootstrap.sh --prefix=$amberprefix > ../boost_config.log ++ ./bootstrap.sh --prefix=$amberprefix --with-toolset=gcc > ../boost_config.log + ncerror=$? + if [ $ncerror -gt 0 ]; then + printf "\nError: Boost bootstrap returned $ncerror\n" From fbec902f713e84f29f4b271c525f7f3564e4eaa3 Mon Sep 17 00:00:00 2001 From: Jaime RGP Date: Thu, 2 Jan 2020 18:09:56 +0100 Subject: [PATCH 12/52] Patch config.h as a workaround for boost/fftw errors --- recipe/activate.sh | 3 ++ recipe/build.sh | 19 ++++++++- recipe/deactivate.sh | 3 ++ recipe/do_not_build_boost.patch | 68 +++++++++++++++++++++++++++++++++ recipe/meta.yaml | 10 ++++- recipe/ppc_fixes.patch | 23 ----------- 6 files changed, 100 insertions(+), 26 deletions(-) create mode 100644 recipe/activate.sh create mode 100644 recipe/deactivate.sh create mode 100644 recipe/do_not_build_boost.patch delete mode 100644 recipe/ppc_fixes.patch diff --git a/recipe/activate.sh b/recipe/activate.sh new file mode 100644 index 00000000..a2af5320 --- /dev/null +++ b/recipe/activate.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +export AMBERHOME=$CONDA_PREFIX \ No newline at end of file diff --git a/recipe/build.sh b/recipe/build.sh index 5f4f1f54..4eda9c0b 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -13,7 +13,6 @@ if [[ "$target_platform" == linux-ppc64le ]]; then fi - # Upgrade AmberTools source to the patch level specified by the MINOR version in $PKG_VERSION for n in {1..5}; do export PATCH_LEVEL=$(echo $PKG_VERSION | cut -d. -f2) @@ -22,11 +21,23 @@ for n in {1..5}; do done # Build AmberTools without further patching -echo 'N' | ./configure $NO_SSE -noX11 -norism --with-netcdf ${PREFIX} --with-python ${PYTHON} --python-install local $COMPILER_SET +echo 'N' | ./configure $NO_SSE -noX11 -norism -nofftw3 --with-netcdf ${PREFIX} --with-python ${PYTHON} --python-install local $COMPILER_SET # using the -openmp flag causes packages not to be included in the build # however, the RISM model requires OpenMP, so -norism is set # the --prefix tag does not work, so copy the files manually to $PREFIX +# Patch config.h after ./configure has run to trick make into thinking +# that boost and fftw3 have been compiled from source. We are providing +# conda packages instead. Point to the correct X11 libs location too. +echo "Patching config.h..." +sed -e "s|MEMEMBED=.*|MEMEMBED=yes|;" \ + -e "s|FFTW3=.*|FFTW3=$PREFIX/lib/libfftw3.a|" \ + -e "s|FFTWLIB=.*|FFTWLIB=-lfftw3|" \ + -e "s|MAKE_XLEAP=.*|MAKE_XLEAP=install_xleap|;" \ + -e "s|XHOME=.*|XHOME=${PREFIX}|" \ + -e "s|XLIBS=.*|XLIBS=${PREFIX}/lib|;" \ + -i config.h + bash amber.sh make @@ -38,3 +49,7 @@ cp -rf bin/* $PREFIX/bin/ cp -rf dat/* $PREFIX/dat/ cp -rf lib/* $PREFIX/lib/ cp -rf include/* $PREFIX/include/ + +# Export AMBERHOME automatically +cp ${RECIPE_DIR}/activate.sh ${PREFIX}/etc/conda/activate.d/ambertools.sh +cp ${RECIPE_DIR}/deactivate.sh ${PREFIX}/etc/conda/deactivate.d/ambertools.sh diff --git a/recipe/deactivate.sh b/recipe/deactivate.sh new file mode 100644 index 00000000..ab3a5d2f --- /dev/null +++ b/recipe/deactivate.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +unset AMBERHOME \ No newline at end of file diff --git a/recipe/do_not_build_boost.patch b/recipe/do_not_build_boost.patch new file mode 100644 index 00000000..e68b5c61 --- /dev/null +++ b/recipe/do_not_build_boost.patch @@ -0,0 +1,68 @@ +diff --git a/AmberTools/src/configure2 b/AmberTools/src/configure2 +index 797380b5..ed58f8e2 100755 +--- a/AmberTools/src/configure2 ++++ b/AmberTools/src/configure2 +@@ -3155,34 +3155,35 @@ fi + #-------------------------------------------------------------------------- + # Configure boost + #-------------------------------------------------------------------------- +-if [ "$cuda" = "no" ]; then +- printf "\nConfiguring boost (may be time-consuming)..." +- cd boost +- ./bootstrap.sh --prefix=$amberprefix > ../boost_config.log +- ncerror=$? +- if [ $ncerror -gt 0 ]; then +- printf "\nError: Boost bootstrap returned $ncerror\n" +- printf " Check $AMBEHROME/src/boost_config.log\n" +- printf " memembed and moft will not be built\n" +- memembed='' +- else +- printf "OK\n" +- printf "Compiling boost (may be time-consuming)..." +- ./b2 --with-program_options --with-iostreams --with-regex \ +- --with-system --with-timer --with-chrono --with-filesystem \ +- --with-graph --with-thread link=static install >> ../boost_config.log +- if [ $? -ne 0 ]; then +- printf "\nError: Boost compile failed.\n" +- printf " Check $AMBERHOME/src/boost_config.log\n" +- printf " memembed and moft will not be built\n" +- memembed='' +- else +- printf "OK\n" +- memembed='yes' +- fi +- fi +- cd .. +-fi ++# if [ "$cuda" = "no" ]; then ++# printf "\nConfiguring boost (may be time-consuming)..." ++# cd boost ++# ./bootstrap.sh --prefix=$amberprefix --with-toolset=gcc > ../boost_config.log ++# ncerror=$? ++# if [ $ncerror -gt 0 ]; then ++# printf "\nError: Boost bootstrap returned $ncerror\n" ++# printf " Check $AMBEHROME/src/boost_config.log\n" ++# printf " memembed and moft will not be built\n" ++# memembed='' ++# else ++# printf "OK\n" ++# printf "Compiling boost (may be time-consuming)..." ++# ./b2 --with-program_options --with-iostreams --with-regex \ ++# --with-system --with-timer --with-chrono --with-filesystem \ ++# --with-graph --with-thread link=static install >> ../boost_config.log ++# if [ $? -ne 0 ]; then ++# printf "\nError: Boost compile failed.\n" ++# printf " Check $AMBERHOME/src/boost_config.log\n" ++# printf " memembed and moft will not be built\n" ++# memembed='' ++# else ++# printf "OK\n" ++# memembed='yes' ++# fi ++# fi ++# cd .. ++# fi ++memembed='yes' + + #-------------------------------------------------------------------------- + # Configure XBLAS diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 69141c8d..e32c2a49 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -12,7 +12,7 @@ source: sha256: 0c86937904854b64e4831e047851f504ec45b42e593db4ded92c1bee5973e699 patches: - configure.patch - - ppc_fixes.patch # [ppc64le] + - do_not_build_boost.patch build: number: 1 @@ -42,6 +42,10 @@ requirements: - zlib - libnetcdf - netcdf-fortran + - fftw + - xorg-libxt + - xorg-libxext + - readline - llvm-openmp # [osx] run: - python @@ -51,6 +55,10 @@ requirements: - cython - libnetcdf - netcdf-fortran + - fftw + - xorg-libxt + - xorg-libxext + - readline test: commands: diff --git a/recipe/ppc_fixes.patch b/recipe/ppc_fixes.patch deleted file mode 100644 index 121f1fce..00000000 --- a/recipe/ppc_fixes.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/AmberTools/src/configure2 b/AmberTools/src/configure2 -index 797380b5..8f071b8b 100755 ---- a/AmberTools/src/configure2 -+++ b/AmberTools/src/configure2 -@@ -3087,7 +3087,8 @@ if [ "$has_fftw3" = 'yes' ]; then - else - cd fftw-3.3 && \ - ./configure --prefix=$amberprefix --libdir=$amberprefix/lib \ -- --enable-static $enable_mpi $mpicc $enable_debug $enable_sse\ -+ --enable-static $enable_mpi $mpicc $enable_debug \ -+ --build=ppc64-unknown-linux \ - CC="$cc" CFLAGS="$cflags $coptflags" \ - F77="$fc" FFLAGS="$fflags $foptflags" \ - FLIBS="$flibs_arch" \ -@@ -3158,7 +3159,7 @@ fi - if [ "$cuda" = "no" ]; then - printf "\nConfiguring boost (may be time-consuming)..." - cd boost -- ./bootstrap.sh --prefix=$amberprefix > ../boost_config.log -+ ./bootstrap.sh --prefix=$amberprefix --with-toolset=gcc > ../boost_config.log - ncerror=$? - if [ $ncerror -gt 0 ]; then - printf "\nError: Boost bootstrap returned $ncerror\n" From 4713d3c6ac399b6f1d06adfe0ad21a9afb2c8fe4 Mon Sep 17 00:00:00 2001 From: Jaime RGP Date: Fri, 3 Jan 2020 12:59:42 +0100 Subject: [PATCH 13/52] Fix include paths in memembed --- recipe/build.sh | 7 ++++--- recipe/fix_memembed_includes.patch | 15 +++++++++++++++ recipe/meta.yaml | 1 + 3 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 recipe/fix_memembed_includes.patch diff --git a/recipe/build.sh b/recipe/build.sh index 4eda9c0b..bf167a6f 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -30,12 +30,13 @@ echo 'N' | ./configure $NO_SSE -noX11 -norism -nofftw3 --with-netcdf ${PREFIX} - # that boost and fftw3 have been compiled from source. We are providing # conda packages instead. Point to the correct X11 libs location too. echo "Patching config.h..." -sed -e "s|MEMEMBED=.*|MEMEMBED=yes|;" \ +sed -e "s|MEMEMBED=.*|MEMEMBED=yes|" \ -e "s|FFTW3=.*|FFTW3=$PREFIX/lib/libfftw3.a|" \ -e "s|FFTWLIB=.*|FFTWLIB=-lfftw3|" \ - -e "s|MAKE_XLEAP=.*|MAKE_XLEAP=install_xleap|;" \ + -e "s|MAKE_XLEAP=.*|MAKE_XLEAP=install_xleap|" \ -e "s|XHOME=.*|XHOME=${PREFIX}|" \ - -e "s|XLIBS=.*|XLIBS=${PREFIX}/lib|;" \ + -e "s|XLIBS=.*|XLIBS=${PREFIX}/lib|" \ + -e "\$aCONDA_PREFIX=${PREFIX}" \ -i config.h bash amber.sh diff --git a/recipe/fix_memembed_includes.patch b/recipe/fix_memembed_includes.patch new file mode 100644 index 00000000..c606690a --- /dev/null +++ b/recipe/fix_memembed_includes.patch @@ -0,0 +1,15 @@ +diff --git a/AmberTools/src/packmol_memgen/packmol_memgen/lib/memembed/Makefile b/AmberTools/src/packmol_memgen/packmol_memgen/lib/memembed/Makefile +index 70503b0b..994df994 100644 +--- a/AmberTools/src/packmol_memgen/packmol_memgen/lib/memembed/Makefile ++++ b/AmberTools/src/packmol_memgen/packmol_memgen/lib/memembed/Makefile +@@ -9,8 +9,8 @@ ifndef AMBER_SOURCE + INC = -Isrc + LIBS = -lboost_thread -lboost_system -lpthread + else +-INC = -Isrc -I$(INCDIR) +-LIBS = -L$(LIBDIR) -lboost_thread -lboost_system -lpthread ++INC = -Isrc -I$(CONDA_PREFIX)/include -I$(INCDIR) ++LIBS = -L$(CONDA_PREFIX)/lib -L$(LIBDIR) -lboost_thread -lboost_system -lpthread + endif + + all: memembed diff --git a/recipe/meta.yaml b/recipe/meta.yaml index e32c2a49..2a68ec72 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -13,6 +13,7 @@ source: patches: - configure.patch - do_not_build_boost.patch + - fix_memembed_includes.patch build: number: 1 From bd1ac6788c01a191ae2ff990926b3f38161c9c18 Mon Sep 17 00:00:00 2001 From: Jaime RGP Date: Fri, 3 Jan 2020 13:06:53 +0100 Subject: [PATCH 14/52] Provide lapack, blas and arpack through conda packages --- recipe/build.sh | 2 ++ recipe/meta.yaml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/recipe/build.sh b/recipe/build.sh index bf167a6f..d2a209c1 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -36,6 +36,8 @@ sed -e "s|MEMEMBED=.*|MEMEMBED=yes|" \ -e "s|MAKE_XLEAP=.*|MAKE_XLEAP=install_xleap|" \ -e "s|XHOME=.*|XHOME=${PREFIX}|" \ -e "s|XLIBS=.*|XLIBS=${PREFIX}/lib|" \ + -e "s|LAPACK=.*|LAPACK=skip|" \ + -e "s|BLAS=.*|BLAS=skip|" \ -e "\$aCONDA_PREFIX=${PREFIX}" \ -i config.h diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 2a68ec72..6663197c 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -44,6 +44,8 @@ requirements: - libnetcdf - netcdf-fortran - fftw + - liblapack + - arpack - xorg-libxt - xorg-libxext - readline From 61a11a30988bd5fb724101ca630589e0670aeb54 Mon Sep 17 00:00:00 2001 From: Jaime RGP Date: Fri, 3 Jan 2020 13:07:23 +0100 Subject: [PATCH 15/52] Debug config.h --- recipe/build.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipe/build.sh b/recipe/build.sh index d2a209c1..312f9794 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -41,6 +41,9 @@ sed -e "s|MEMEMBED=.*|MEMEMBED=yes|" \ -e "\$aCONDA_PREFIX=${PREFIX}" \ -i config.h +echo "Resulting config.h..." +cat config.h + bash amber.sh make From 3f5e65ad245eb0a286475d880aed720c5e5e2c5c Mon Sep 17 00:00:00 2001 From: Jaime RGP Date: Fri, 3 Jan 2020 14:12:06 +0100 Subject: [PATCH 16/52] Disable arpack compilation --- recipe/meta.yaml | 9 +++++---- recipe/{ => patches}/configure.patch | 0 recipe/patches/do_not_build_arpack.patch | 14 ++++++++++++++ recipe/{ => patches}/do_not_build_boost.patch | 0 recipe/{ => patches}/fix_memembed_includes.patch | 0 5 files changed, 19 insertions(+), 4 deletions(-) rename recipe/{ => patches}/configure.patch (100%) create mode 100644 recipe/patches/do_not_build_arpack.patch rename recipe/{ => patches}/do_not_build_boost.patch (100%) rename recipe/{ => patches}/fix_memembed_includes.patch (100%) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 6663197c..d0e696aa 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -11,9 +11,10 @@ source: url: https://ambermd.org/downloads/AmberTools19.tar.bz2 sha256: 0c86937904854b64e4831e047851f504ec45b42e593db4ded92c1bee5973e699 patches: - - configure.patch - - do_not_build_boost.patch - - fix_memembed_includes.patch + - patches/configure.patch + - patches/fix_memembed_includes.patch + - patches/do_not_build_boost.patch + - patches/do_not_build_arpack.patch # [not ppc64le] build: number: 1 @@ -45,7 +46,7 @@ requirements: - netcdf-fortran - fftw - liblapack - - arpack + - arpack # [not ppc64le] - xorg-libxt - xorg-libxext - readline diff --git a/recipe/configure.patch b/recipe/patches/configure.patch similarity index 100% rename from recipe/configure.patch rename to recipe/patches/configure.patch diff --git a/recipe/patches/do_not_build_arpack.patch b/recipe/patches/do_not_build_arpack.patch new file mode 100644 index 00000000..c11b47b7 --- /dev/null +++ b/recipe/patches/do_not_build_arpack.patch @@ -0,0 +1,14 @@ +diff --git a/AmberTools/src/arpack/Makefile b/AmberTools/src/arpack/Makefile +index fb571b33..3b9ddc1b 100644 +--- a/AmberTools/src/arpack/Makefile ++++ b/AmberTools/src/arpack/Makefile +@@ -11,7 +11,8 @@ include ../config.h + @echo "[ARPACK] CC $<" + $(VB)$(CC) -c $(COPTFLAGS) $(CFLAGS) -o $@ $< + +-install: $(LIBDIR)/libarpack.a ++install: ++ @echo "[ARPACK] Skipping compilation..." + + ARPACKLIB= ivout.o dvout.o dgetv0.o dlaqrb.o dnaitr.o dnapps.o \ + dnaup2.o dnaupd.o dnconv.o dneigh.o dmout.o \ diff --git a/recipe/do_not_build_boost.patch b/recipe/patches/do_not_build_boost.patch similarity index 100% rename from recipe/do_not_build_boost.patch rename to recipe/patches/do_not_build_boost.patch diff --git a/recipe/fix_memembed_includes.patch b/recipe/patches/fix_memembed_includes.patch similarity index 100% rename from recipe/fix_memembed_includes.patch rename to recipe/patches/fix_memembed_includes.patch From c22c5361e7ebe1a7988b2908a12a4950a2ca0cd7 Mon Sep 17 00:00:00 2001 From: Jaime RGP Date: Fri, 3 Jan 2020 14:14:26 +0100 Subject: [PATCH 17/52] Create activate/deactivate dirs --- recipe/build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/recipe/build.sh b/recipe/build.sh index 312f9794..8bbcae2b 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -57,5 +57,6 @@ cp -rf lib/* $PREFIX/lib/ cp -rf include/* $PREFIX/include/ # Export AMBERHOME automatically +mkdir -p ${PREFIX}/etc/conda/{activate,deactivate}.d cp ${RECIPE_DIR}/activate.sh ${PREFIX}/etc/conda/activate.d/ambertools.sh cp ${RECIPE_DIR}/deactivate.sh ${PREFIX}/etc/conda/deactivate.d/ambertools.sh From 8b38c536bc16bf65c4a8d60c669323a002b47c6a Mon Sep 17 00:00:00 2001 From: Jaime RGP Date: Fri, 3 Jan 2020 14:36:43 +0100 Subject: [PATCH 18/52] Force copy config.h to ambertools/src --- recipe/build.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipe/build.sh b/recipe/build.sh index 8bbcae2b..746c09dc 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -41,6 +41,9 @@ sed -e "s|MEMEMBED=.*|MEMEMBED=yes|" \ -e "\$aCONDA_PREFIX=${PREFIX}" \ -i config.h +cp -f config.h AmberTools/src +cp -f config.h AmberTools/src/cphstats + echo "Resulting config.h..." cat config.h From cd9f5aa109a4930be2d766933d021f1e660df3da Mon Sep 17 00:00:00 2001 From: Jaime RGP Date: Fri, 3 Jan 2020 14:37:13 +0100 Subject: [PATCH 19/52] Build arpack for now --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index d0e696aa..5c4ff5d8 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -14,7 +14,7 @@ source: - patches/configure.patch - patches/fix_memembed_includes.patch - patches/do_not_build_boost.patch - - patches/do_not_build_arpack.patch # [not ppc64le] + # - patches/do_not_build_arpack.patch # [not ppc64le] build: number: 1 From 6f7b91b6dc03ee40f238b012d3547faf6b7f2fec Mon Sep 17 00:00:00 2001 From: Jaime RGP Date: Fri, 3 Jan 2020 15:17:54 +0100 Subject: [PATCH 20/52] Match only the start of the line --- recipe/build.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/recipe/build.sh b/recipe/build.sh index 746c09dc..fb4f8bae 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -30,14 +30,14 @@ echo 'N' | ./configure $NO_SSE -noX11 -norism -nofftw3 --with-netcdf ${PREFIX} - # that boost and fftw3 have been compiled from source. We are providing # conda packages instead. Point to the correct X11 libs location too. echo "Patching config.h..." -sed -e "s|MEMEMBED=.*|MEMEMBED=yes|" \ - -e "s|FFTW3=.*|FFTW3=$PREFIX/lib/libfftw3.a|" \ - -e "s|FFTWLIB=.*|FFTWLIB=-lfftw3|" \ - -e "s|MAKE_XLEAP=.*|MAKE_XLEAP=install_xleap|" \ - -e "s|XHOME=.*|XHOME=${PREFIX}|" \ - -e "s|XLIBS=.*|XLIBS=${PREFIX}/lib|" \ - -e "s|LAPACK=.*|LAPACK=skip|" \ - -e "s|BLAS=.*|BLAS=skip|" \ +sed -e "s|^MEMEMBED=.*|MEMEMBED=yes|" \ + -e "s|^FFTW3=.*|FFTW3=|" \ + -e "s|^FFTWLIB=.*|FFTWLIB=-lfftw3|" \ + -e "s|^MAKE_XLEAP=.*|MAKE_XLEAP=install_xleap|" \ + -e "s|^XHOME=.*|XHOME=${PREFIX}|" \ + -e "s|^XLIBS=.*|XLIBS=${PREFIX}/lib|" \ + -e "s|^LAPACK=.*|LAPACK=skip|" \ + -e "s|^BLAS=.*|BLAS=skip|" \ -e "\$aCONDA_PREFIX=${PREFIX}" \ -i config.h From ac7550ade7da7c7501fdb6a9952d99eed3254c75 Mon Sep 17 00:00:00 2001 From: Jaime RGP Date: Fri, 3 Jan 2020 15:57:13 +0100 Subject: [PATCH 21/52] Add -L to Xlibs --- recipe/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/build.sh b/recipe/build.sh index fb4f8bae..27024f6a 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -35,7 +35,7 @@ sed -e "s|^MEMEMBED=.*|MEMEMBED=yes|" \ -e "s|^FFTWLIB=.*|FFTWLIB=-lfftw3|" \ -e "s|^MAKE_XLEAP=.*|MAKE_XLEAP=install_xleap|" \ -e "s|^XHOME=.*|XHOME=${PREFIX}|" \ - -e "s|^XLIBS=.*|XLIBS=${PREFIX}/lib|" \ + -e "s|^XLIBS=.*|XLIBS=-L${PREFIX}/lib|" \ -e "s|^LAPACK=.*|LAPACK=skip|" \ -e "s|^BLAS=.*|BLAS=skip|" \ -e "\$aCONDA_PREFIX=${PREFIX}" \ From 7cf9499ee2e5a2dfbbee1eb59045a947706ac546 Mon Sep 17 00:00:00 2001 From: Jaime RGP Date: Fri, 3 Jan 2020 16:42:54 +0100 Subject: [PATCH 22/52] Add missing dependencies to reqs/run --- recipe/meta.yaml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 5c4ff5d8..91852ca5 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -36,32 +36,35 @@ requirements: - perl host: - python - - cython - setuptools + - cython - numpy - - boost-cpp - bzip2 - zlib + - boost-cpp - libnetcdf - netcdf-fortran - fftw - liblapack - - arpack # [not ppc64le] - xorg-libxt - xorg-libxext + - xorg-libx11 - readline - llvm-openmp # [osx] run: - python + - cython - numpy - scipy - matplotlib - - cython + - boost-cpp - libnetcdf - netcdf-fortran - fftw + - liblapack - xorg-libxt - xorg-libxext + - xorg-libx11 - readline test: From ead2784347daa9c3ca5104c85b1fc9b9ff5d4c6e Mon Sep 17 00:00:00 2001 From: Jaime RGP Date: Sat, 4 Jan 2020 14:06:07 +0100 Subject: [PATCH 23/52] Add some more tests (hopefully it doesn't take very long) --- recipe/build.sh | 5 ++++- recipe/meta.yaml | 15 ++++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/recipe/build.sh b/recipe/build.sh index 27024f6a..22a72dfc 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -52,8 +52,11 @@ bash amber.sh make make install -mkdir $PREFIX/dat +pushd +cd AmberTools/test && make fast +popd +mkdir $PREFIX/dat cp -rf bin/* $PREFIX/bin/ cp -rf dat/* $PREFIX/dat/ cp -rf lib/* $PREFIX/lib/ diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 91852ca5..ea6c763a 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -62,6 +62,7 @@ requirements: - netcdf-fortran - fftw - liblapack + - libopenblas - xorg-libxt - xorg-libxext - xorg-libx11 @@ -70,11 +71,22 @@ requirements: test: commands: - antechamber -h + - cpptraj -h + - ffgbsa -h + - MCPB.py -h + - mdnab -h + - minab -h + - mmpbsa_py_energy -h + - parmchk2 -h + - parmed -h + - pdb4amber -h + - respgen -h + - sqm -h - teLeap -h - tleap -h - - parmchk2 -h imports: - pytraj + - parmed about: home: http://ambermd.org/AmberTools.php @@ -91,3 +103,4 @@ about: extra: recipe-maintainers: - simonbray + - jaimergp From 277e769650f1ba443e8f380da41e57bb21eefd68 Mon Sep 17 00:00:00 2001 From: conda-forge-admin Date: Sat, 4 Jan 2020 13:19:53 +0000 Subject: [PATCH 24/52] MNT: Re-rendered with conda-build 3.18.11, conda-smithy 3.6.5, and conda-forge-pinning 2019.12.18 --- .ci_support/linux_ppc64le_python3.6.yaml | 24 ++++++++++++++++++++++-- .ci_support/linux_ppc64le_python3.7.yaml | 24 ++++++++++++++++++++++-- .ci_support/linux_ppc64le_python3.8.yaml | 24 ++++++++++++++++++++++-- .ci_support/linux_python3.6.yaml | 24 ++++++++++++++++++++++-- .ci_support/linux_python3.7.yaml | 24 ++++++++++++++++++++++-- .ci_support/linux_python3.8.yaml | 24 ++++++++++++++++++++++-- .github/CODEOWNERS | 2 +- README.md | 1 + 8 files changed, 134 insertions(+), 13 deletions(-) diff --git a/.ci_support/linux_ppc64le_python3.6.yaml b/.ci_support/linux_ppc64le_python3.6.yaml index 90138e23..fa582c4c 100644 --- a/.ci_support/linux_ppc64le_python3.6.yaml +++ b/.ci_support/linux_ppc64le_python3.6.yaml @@ -1,4 +1,4 @@ -boost: +boost_cpp: - 1.70.0 bzip2: - '1' @@ -16,23 +16,43 @@ cxx_compiler_version: - '8' docker_image: - condaforge/linux-anvil-ppc64le +fftw: +- '3' fortran_compiler: - gfortran fortran_compiler_version: - '8' +liblapack: +- 3.8.0 *netlib +libnetcdf: +- 4.7.3 +netcdf_fortran: +- '4.5' numpy: - '1.16' +perl: +- 5.26.2 pin_run_as_build: - boost: + boost-cpp: max_pin: x.x.x bzip2: max_pin: x + fftw: + max_pin: x + netcdf-fortran: + max_pin: x.x + perl: + max_pin: x.x.x python: min_pin: x.x max_pin: x.x + readline: + max_pin: x zlib: max_pin: x.x python: - '3.6' +readline: +- '8.0' zlib: - '1.2' diff --git a/.ci_support/linux_ppc64le_python3.7.yaml b/.ci_support/linux_ppc64le_python3.7.yaml index 64409979..94d529a4 100644 --- a/.ci_support/linux_ppc64le_python3.7.yaml +++ b/.ci_support/linux_ppc64le_python3.7.yaml @@ -1,4 +1,4 @@ -boost: +boost_cpp: - 1.70.0 bzip2: - '1' @@ -16,23 +16,43 @@ cxx_compiler_version: - '8' docker_image: - condaforge/linux-anvil-ppc64le +fftw: +- '3' fortran_compiler: - gfortran fortran_compiler_version: - '8' +liblapack: +- 3.8.0 *netlib +libnetcdf: +- 4.7.3 +netcdf_fortran: +- '4.5' numpy: - '1.16' +perl: +- 5.26.2 pin_run_as_build: - boost: + boost-cpp: max_pin: x.x.x bzip2: max_pin: x + fftw: + max_pin: x + netcdf-fortran: + max_pin: x.x + perl: + max_pin: x.x.x python: min_pin: x.x max_pin: x.x + readline: + max_pin: x zlib: max_pin: x.x python: - '3.7' +readline: +- '8.0' zlib: - '1.2' diff --git a/.ci_support/linux_ppc64le_python3.8.yaml b/.ci_support/linux_ppc64le_python3.8.yaml index 8b6c17c2..54b90fc6 100644 --- a/.ci_support/linux_ppc64le_python3.8.yaml +++ b/.ci_support/linux_ppc64le_python3.8.yaml @@ -1,4 +1,4 @@ -boost: +boost_cpp: - 1.70.0 bzip2: - '1' @@ -16,23 +16,43 @@ cxx_compiler_version: - '8' docker_image: - condaforge/linux-anvil-ppc64le +fftw: +- '3' fortran_compiler: - gfortran fortran_compiler_version: - '8' +liblapack: +- 3.8.0 *netlib +libnetcdf: +- 4.7.3 +netcdf_fortran: +- '4.5' numpy: - '1.16' +perl: +- 5.26.2 pin_run_as_build: - boost: + boost-cpp: max_pin: x.x.x bzip2: max_pin: x + fftw: + max_pin: x + netcdf-fortran: + max_pin: x.x + perl: + max_pin: x.x.x python: min_pin: x.x max_pin: x.x + readline: + max_pin: x zlib: max_pin: x.x python: - '3.8' +readline: +- '8.0' zlib: - '1.2' diff --git a/.ci_support/linux_python3.6.yaml b/.ci_support/linux_python3.6.yaml index 1edba055..7ff33278 100644 --- a/.ci_support/linux_python3.6.yaml +++ b/.ci_support/linux_python3.6.yaml @@ -1,4 +1,4 @@ -boost: +boost_cpp: - 1.70.0 bzip2: - '1' @@ -16,23 +16,43 @@ cxx_compiler_version: - '7' docker_image: - condaforge/linux-anvil-comp7 +fftw: +- '3' fortran_compiler: - gfortran fortran_compiler_version: - '7' +liblapack: +- 3.8.0 *netlib +libnetcdf: +- 4.7.3 +netcdf_fortran: +- '4.5' numpy: - '1.14' +perl: +- 5.26.2 pin_run_as_build: - boost: + boost-cpp: max_pin: x.x.x bzip2: max_pin: x + fftw: + max_pin: x + netcdf-fortran: + max_pin: x.x + perl: + max_pin: x.x.x python: min_pin: x.x max_pin: x.x + readline: + max_pin: x zlib: max_pin: x.x python: - '3.6' +readline: +- '8.0' zlib: - '1.2' diff --git a/.ci_support/linux_python3.7.yaml b/.ci_support/linux_python3.7.yaml index 50741e68..17d4bc2a 100644 --- a/.ci_support/linux_python3.7.yaml +++ b/.ci_support/linux_python3.7.yaml @@ -1,4 +1,4 @@ -boost: +boost_cpp: - 1.70.0 bzip2: - '1' @@ -16,23 +16,43 @@ cxx_compiler_version: - '7' docker_image: - condaforge/linux-anvil-comp7 +fftw: +- '3' fortran_compiler: - gfortran fortran_compiler_version: - '7' +liblapack: +- 3.8.0 *netlib +libnetcdf: +- 4.7.3 +netcdf_fortran: +- '4.5' numpy: - '1.14' +perl: +- 5.26.2 pin_run_as_build: - boost: + boost-cpp: max_pin: x.x.x bzip2: max_pin: x + fftw: + max_pin: x + netcdf-fortran: + max_pin: x.x + perl: + max_pin: x.x.x python: min_pin: x.x max_pin: x.x + readline: + max_pin: x zlib: max_pin: x.x python: - '3.7' +readline: +- '8.0' zlib: - '1.2' diff --git a/.ci_support/linux_python3.8.yaml b/.ci_support/linux_python3.8.yaml index 482a4e5a..c909ff92 100644 --- a/.ci_support/linux_python3.8.yaml +++ b/.ci_support/linux_python3.8.yaml @@ -1,4 +1,4 @@ -boost: +boost_cpp: - 1.70.0 bzip2: - '1' @@ -16,23 +16,43 @@ cxx_compiler_version: - '7' docker_image: - condaforge/linux-anvil-comp7 +fftw: +- '3' fortran_compiler: - gfortran fortran_compiler_version: - '7' +liblapack: +- 3.8.0 *netlib +libnetcdf: +- 4.7.3 +netcdf_fortran: +- '4.5' numpy: - '1.14' +perl: +- 5.26.2 pin_run_as_build: - boost: + boost-cpp: max_pin: x.x.x bzip2: max_pin: x + fftw: + max_pin: x + netcdf-fortran: + max_pin: x.x + perl: + max_pin: x.x.x python: min_pin: x.x max_pin: x.x + readline: + max_pin: x zlib: max_pin: x.x python: - '3.8' +readline: +- '8.0' zlib: - '1.2' diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 601f786d..e913bbbc 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* @simonbray \ No newline at end of file +* @jaimergp @simonbray \ No newline at end of file diff --git a/README.md b/README.md index a787cd27..cfa819bf 100644 --- a/README.md +++ b/README.md @@ -194,5 +194,6 @@ In order to produce a uniquely identifiable distribution: Feedstock Maintainers ===================== +* [@jaimergp](https://github.com/jaimergp/) * [@simonbray](https://github.com/simonbray/) From ea7196fb3280cf9ebcc25e4a85b75fc4f5744c55 Mon Sep 17 00:00:00 2001 From: Jaime RGP Date: Sat, 4 Jan 2020 15:06:41 +0100 Subject: [PATCH 25/52] Add missing . to pushd --- recipe/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/build.sh b/recipe/build.sh index 22a72dfc..01ad211f 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -52,7 +52,7 @@ bash amber.sh make make install -pushd +pushd . cd AmberTools/test && make fast popd From 6aef61a33e02deaf0584b2b02ba4ccdce9063a94 Mon Sep 17 00:00:00 2001 From: Jaime RGP Date: Sat, 4 Jan 2020 15:55:01 +0100 Subject: [PATCH 26/52] Tests require AMBERHOME var --- recipe/build.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/recipe/build.sh b/recipe/build.sh index 01ad211f..2fa5e5a6 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -47,13 +47,12 @@ cp -f config.h AmberTools/src/cphstats echo "Resulting config.h..." cat config.h -bash amber.sh - make make install pushd . -cd AmberTools/test && make fast +cd AmberTools/test +AMBERHOME=$(pwd) make fast popd mkdir $PREFIX/dat From a9b5203596bc3762e73d743a59fd8c87566ec3e7 Mon Sep 17 00:00:00 2001 From: Jaime RGP Date: Sat, 4 Jan 2020 15:55:38 +0100 Subject: [PATCH 27/52] Export AMBERHOME first --- recipe/build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipe/build.sh b/recipe/build.sh index 2fa5e5a6..5949cd90 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -51,8 +51,8 @@ make make install pushd . -cd AmberTools/test -AMBERHOME=$(pwd) make fast +export AMBERHOME=$(pwd) +cd AmberTools/test && make fast popd mkdir $PREFIX/dat From e3ebb3452aa2d32be1cf4ba41af5fee62e4e43c1 Mon Sep 17 00:00:00 2001 From: Jaime RGP Date: Sat, 4 Jan 2020 19:51:14 +0100 Subject: [PATCH 28/52] Do not run makte tests in this recipe; check locally if needed --- recipe/build.sh | 5 ----- 1 file changed, 5 deletions(-) diff --git a/recipe/build.sh b/recipe/build.sh index 5949cd90..a8b5bf7d 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -50,11 +50,6 @@ cat config.h make make install -pushd . -export AMBERHOME=$(pwd) -cd AmberTools/test && make fast -popd - mkdir $PREFIX/dat cp -rf bin/* $PREFIX/bin/ cp -rf dat/* $PREFIX/dat/ From e775fab95d28b14abdbb2102e4a874f7beb94561 Mon Sep 17 00:00:00 2001 From: Jaime RGP Date: Sun, 5 Jan 2020 13:53:26 +0100 Subject: [PATCH 29/52] Add libblas to reqs/run --- recipe/meta.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index ea6c763a..8bbf3eaf 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -61,6 +61,7 @@ requirements: - libnetcdf - netcdf-fortran - fftw + - libblas - liblapack - libopenblas - xorg-libxt From 6f362a5d19bd612e4978d2b0dc3d9332e2163000 Mon Sep 17 00:00:00 2001 From: Jaime RGP Date: Sun, 5 Jan 2020 13:54:07 +0100 Subject: [PATCH 30/52] Try to use --prefix to fix hardcoded path issues in nab and others --- recipe/build.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/recipe/build.sh b/recipe/build.sh index a8b5bf7d..efaaa6a4 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -21,10 +21,15 @@ for n in {1..5}; do done # Build AmberTools without further patching -echo 'N' | ./configure $NO_SSE -noX11 -norism -nofftw3 --with-netcdf ${PREFIX} --with-python ${PYTHON} --python-install local $COMPILER_SET # using the -openmp flag causes packages not to be included in the build # however, the RISM model requires OpenMP, so -norism is set # the --prefix tag does not work, so copy the files manually to $PREFIX +echo 'N' | ./configure $NO_SSE -noX11 -norism -nofftw3 \ + --with-netcdf ${PREFIX} \ + --with-python ${PYTHON} \ + --prefix ${PREFIX} \ + --python-install local \ + $COMPILER_SET # Patch config.h after ./configure has run to trick make into thinking # that boost and fftw3 have been compiled from source. We are providing From c593f96cff97e569e4176e6c8d97cd4985439505 Mon Sep 17 00:00:00 2001 From: Jaime RGP Date: Mon, 6 Jan 2020 19:07:08 +0100 Subject: [PATCH 31/52] Try with cmake --- recipe/activate.fish | 3 ++ recipe/build.sh | 69 ++++++++++-------------------------------- recipe/deactivate.fish | 3 ++ recipe/meta.yaml | 18 ++++++----- 4 files changed, 33 insertions(+), 60 deletions(-) create mode 100644 recipe/activate.fish create mode 100644 recipe/deactivate.fish diff --git a/recipe/activate.fish b/recipe/activate.fish new file mode 100644 index 00000000..20a85344 --- /dev/null +++ b/recipe/activate.fish @@ -0,0 +1,3 @@ +#!/bin/bash + +set -gx AMBERHOME "$CONDA_PREFIX" \ No newline at end of file diff --git a/recipe/build.sh b/recipe/build.sh index efaaa6a4..283c452d 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -1,17 +1,4 @@ -if [[ "$target_platform" == osx* ]]; then - export COMPILER_SET="clang" -fi - -if [[ "$target_platform" == linux* ]]; then - export COMPILER_SET="gnu" -fi - -NO_SSE="" -if [[ "$target_platform" == linux-ppc64le ]]; then - # needed in ppc64le because otherwise fftw-3.3 does not compile - NO_SSE="-nosse" -fi - +set -euxo pipefail # Upgrade AmberTools source to the patch level specified by the MINOR version in $PKG_VERSION for n in {1..5}; do @@ -21,47 +8,23 @@ for n in {1..5}; do done # Build AmberTools without further patching -# using the -openmp flag causes packages not to be included in the build -# however, the RISM model requires OpenMP, so -norism is set -# the --prefix tag does not work, so copy the files manually to $PREFIX -echo 'N' | ./configure $NO_SSE -noX11 -norism -nofftw3 \ - --with-netcdf ${PREFIX} \ - --with-python ${PYTHON} \ - --prefix ${PREFIX} \ - --python-install local \ - $COMPILER_SET - -# Patch config.h after ./configure has run to trick make into thinking -# that boost and fftw3 have been compiled from source. We are providing -# conda packages instead. Point to the correct X11 libs location too. -echo "Patching config.h..." -sed -e "s|^MEMEMBED=.*|MEMEMBED=yes|" \ - -e "s|^FFTW3=.*|FFTW3=|" \ - -e "s|^FFTWLIB=.*|FFTWLIB=-lfftw3|" \ - -e "s|^MAKE_XLEAP=.*|MAKE_XLEAP=install_xleap|" \ - -e "s|^XHOME=.*|XHOME=${PREFIX}|" \ - -e "s|^XLIBS=.*|XLIBS=-L${PREFIX}/lib|" \ - -e "s|^LAPACK=.*|LAPACK=skip|" \ - -e "s|^BLAS=.*|BLAS=skip|" \ - -e "\$aCONDA_PREFIX=${PREFIX}" \ - -i config.h - -cp -f config.h AmberTools/src -cp -f config.h AmberTools/src/cphstats - -echo "Resulting config.h..." -cat config.h - -make -make install - -mkdir $PREFIX/dat -cp -rf bin/* $PREFIX/bin/ -cp -rf dat/* $PREFIX/dat/ -cp -rf lib/* $PREFIX/lib/ -cp -rf include/* $PREFIX/include/ +mkdir build +cd build +cmake ${SRC_DIR} \ + -DCMAKE_INSTALL_PREFIX=${PREFIX} \ + -DCOMPILER=MANUAL \ + -DPYTHON_EXECUTABLE=${PYTHON} \ + -DDOWNLOAD_MINICONDA=FALSE \ + -DCHECK_UPDATES=FALSE \ + -DMPI=TRUE \ + -DOPENMP=TRUE +# -DFORCE_EXTERNAL_LIBS="netcdf;netcdf-fortran" + +make && make install # Export AMBERHOME automatically mkdir -p ${PREFIX}/etc/conda/{activate,deactivate}.d cp ${RECIPE_DIR}/activate.sh ${PREFIX}/etc/conda/activate.d/ambertools.sh +cp ${RECIPE_DIR}/activate.fish ${PREFIX}/etc/conda/activate.d/ambertools.fish cp ${RECIPE_DIR}/deactivate.sh ${PREFIX}/etc/conda/deactivate.d/ambertools.sh +cp ${RECIPE_DIR}/deactivate.fish ${PREFIX}/etc/conda/deactivate.d/ambertools.fish diff --git a/recipe/deactivate.fish b/recipe/deactivate.fish new file mode 100644 index 00000000..325c0999 --- /dev/null +++ b/recipe/deactivate.fish @@ -0,0 +1,3 @@ +#!/bin/bash + +set -e AMBERHOME \ No newline at end of file diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 8bbf3eaf..fc1f02d9 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -10,11 +10,11 @@ package: source: url: https://ambermd.org/downloads/AmberTools19.tar.bz2 sha256: 0c86937904854b64e4831e047851f504ec45b42e593db4ded92c1bee5973e699 - patches: - - patches/configure.patch - - patches/fix_memembed_includes.patch - - patches/do_not_build_boost.patch - # - patches/do_not_build_arpack.patch # [not ppc64le] + # patches: + # - patches/configure.patch + # - patches/fix_memembed_includes.patch + # - patches/do_not_build_boost.patch + # - patches/enable_cmake.patch build: number: 1 @@ -31,19 +31,23 @@ requirements: - tcsh - bison - make - - libnetcdf - - netcdf-fortran + - cmake - perl host: - python - setuptools - cython - numpy + - scipy + - matplotlib - bzip2 - zlib - boost-cpp - libnetcdf - netcdf-fortran + - pthread-stubs + - openmpi + - openmp - fftw - liblapack - xorg-libxt From f4ae006f6bcdf9003e3c92fc6f37d1fc5b7681b4 Mon Sep 17 00:00:00 2001 From: Jaime RGP Date: Mon, 6 Jan 2020 19:33:37 +0100 Subject: [PATCH 32/52] Remove openmp and openmpi for now --- recipe/build.sh | 4 +--- recipe/meta.yaml | 3 --- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/recipe/build.sh b/recipe/build.sh index 283c452d..b5d61930 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -15,9 +15,7 @@ cmake ${SRC_DIR} \ -DCOMPILER=MANUAL \ -DPYTHON_EXECUTABLE=${PYTHON} \ -DDOWNLOAD_MINICONDA=FALSE \ - -DCHECK_UPDATES=FALSE \ - -DMPI=TRUE \ - -DOPENMP=TRUE + -DCHECK_UPDATES=FALSE # -DFORCE_EXTERNAL_LIBS="netcdf;netcdf-fortran" make && make install diff --git a/recipe/meta.yaml b/recipe/meta.yaml index fc1f02d9..d03bbc51 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -46,15 +46,12 @@ requirements: - libnetcdf - netcdf-fortran - pthread-stubs - - openmpi - - openmp - fftw - liblapack - xorg-libxt - xorg-libxext - xorg-libx11 - readline - - llvm-openmp # [osx] run: - python - cython From b32152f033170e2889c9be9e922a0b84cdf39b7c Mon Sep 17 00:00:00 2001 From: Jaime RGP Date: Mon, 6 Jan 2020 20:13:01 +0100 Subject: [PATCH 33/52] Apply cmake patches from amber19 --- recipe/meta.yaml | 7 +- recipe/patches/amber19-fix-cmake.patch | 1593 ++++++++++++++++++++ recipe/patches/configure.patch | 58 - recipe/patches/do_not_build_arpack.patch | 14 - recipe/patches/do_not_build_boost.patch | 68 - recipe/patches/fix_memembed_includes.patch | 15 - 6 files changed, 1595 insertions(+), 160 deletions(-) create mode 100644 recipe/patches/amber19-fix-cmake.patch delete mode 100644 recipe/patches/configure.patch delete mode 100644 recipe/patches/do_not_build_arpack.patch delete mode 100644 recipe/patches/do_not_build_boost.patch delete mode 100644 recipe/patches/fix_memembed_includes.patch diff --git a/recipe/meta.yaml b/recipe/meta.yaml index d03bbc51..906fe95b 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -10,11 +10,8 @@ package: source: url: https://ambermd.org/downloads/AmberTools19.tar.bz2 sha256: 0c86937904854b64e4831e047851f504ec45b42e593db4ded92c1bee5973e699 - # patches: - # - patches/configure.patch - # - patches/fix_memembed_includes.patch - # - patches/do_not_build_boost.patch - # - patches/enable_cmake.patch + patches: + - patches/amber19-fix-cmake.patch build: number: 1 diff --git a/recipe/patches/amber19-fix-cmake.patch b/recipe/patches/amber19-fix-cmake.patch new file mode 100644 index 00000000..bbb44ab6 --- /dev/null +++ b/recipe/patches/amber19-fix-cmake.patch @@ -0,0 +1,1593 @@ +diff --git a/AmberTools/src/cifparse/CMakeLists.txt b/AmberTools/src/cifparse/CMakeLists.txt +index e2f684b8c3..0074c510c0 100644 +--- a/AmberTools/src/cifparse/CMakeLists.txt ++++ b/AmberTools/src/cifparse/CMakeLists.txt +@@ -5,7 +5,7 @@ set(LEXED_FILES_DIR ${CMAKE_CURRENT_BINARY_DIR}) + + # Flex and bison + flex_target(CifLex cifparse.l "${LEXED_FILES_DIR}/lex.cif.c" COMPILE_FLAGS -Pcifp) +-byacc_target(CifYacc cifparse.y ${LEXED_FILES_DIR} GENERATE_HEADER COMPILE_FLAGS -pcifp FILE_PREFIX cifp) ++bison_target(CifYacc cifparse.y "${LEXED_FILES_DIR}/cifp.tab.c" COMPILE_FLAGS -pcifp) + add_flex_bison_dependency(CifLex CifYacc) + + #build the library +diff --git a/AmberTools/src/fftw-3.3/CMakeLists.txt b/AmberTools/src/fftw-3.3/CMakeLists.txt +index 932f8a26fe..2ca0f413cc 100644 +--- a/AmberTools/src/fftw-3.3/CMakeLists.txt ++++ b/AmberTools/src/fftw-3.3/CMakeLists.txt +@@ -215,7 +215,7 @@ if(DEFINED INCOMING_STACK_BOUNDARY) + + check_c_compiler_flag(${ISB_FLAG} SUPPORTS_ISB_FLAG) + +- if(NOT SUPPORTS_AVX_FLAG) ++ if(NOT SUPPORTS_ISB_FLAG) + message(SEND_ERROR "You requested to set the incoming stack boundary, but the compiler flag to do that doesn't work") + endif() + +diff --git a/AmberTools/src/leap/src/leap/CMakeLists.txt b/AmberTools/src/leap/src/leap/CMakeLists.txt +index bbf166e0f6..14807f7505 100644 +--- a/AmberTools/src/leap/src/leap/CMakeLists.txt ++++ b/AmberTools/src/leap/src/leap/CMakeLists.txt +@@ -108,7 +108,7 @@ else() #build the leap programs + + #--------------------------------------------------------------------------------------------------------------------------------------------------------------------- + +- byacc_target(leap_yacc parser.y ${CMAKE_CURRENT_BINARY_DIR}) ++ bison_target(LeapYacc parser.y ${YACC_PARSER_FILE}) + + #--------------------------------------------------------------------------------------------------------------------------------------------------------------------- + add_library(leap_common_obj OBJECT ${COMMON_SOURCE}) +diff --git a/AmberTools/src/nab/CMakeLists.txt b/AmberTools/src/nab/CMakeLists.txt +index 6c79b6c806..7beabd278a 100644 +--- a/AmberTools/src/nab/CMakeLists.txt ++++ b/AmberTools/src/nab/CMakeLists.txt +@@ -137,8 +137,8 @@ set(INTERMED_DIR ${CMAKE_CURRENT_BINARY_DIR}/lex-intermediates) + file(MAKE_DIRECTORY ${INTERMED_DIR}) + + set(DG_OPTIONS_SOURCE dg_options.l) +-set(DG_OPTIONS_INTERMEDIATE ${INTERMED_DIR}/lex.dg_options.c) +-set(DG_OPTIONS_LEXED ${CMAKE_CURRENT_BINARY_DIR}/lex.dg_options.c) ++set(DG_OPTIONS_INTERMEDIATE ${INTERMED_DIR}/lex.dgo.c) ++set(DG_OPTIONS_LEXED ${CMAKE_CURRENT_BINARY_DIR}/lex.dgo.c) + + #default compile flags + set_property(DIRECTORY PROPERTY COMPILE_OPTIONS ${NO_OPT_CFLAGS}) +@@ -192,7 +192,7 @@ endif() + #make the lex/yacc parser (needed by checkexpr) + flex_target(NabLex ${NAB_LEX_SOURCE} ${NAB_LEX_LEXED}) + flex_target(DgOptionsLex ${DG_OPTIONS_SOURCE} ${DG_OPTIONS_INTERMEDIATE} COMPILE_FLAGS -Pdgo) +-byacc_target(NabYacc ${NAB_YACC} ${CMAKE_CURRENT_BINARY_DIR} GENERATE_HEADER) ++bison_target(NabYacc ${NAB_YACC} ${NAB_COMPILED_YACC_C}) + add_flex_bison_dependency(NabLex NabYacc) + + #do the textual replaces on dg_options +diff --git a/AmberTools/src/nab/semantics/parse2.c b/AmberTools/src/nab/semantics/parse2.c +index 7e25ec111b..3cf81ad46d 100644 +--- a/AmberTools/src/nab/semantics/parse2.c ++++ b/AmberTools/src/nab/semantics/parse2.c +@@ -420,7 +420,7 @@ static int getsyms( FILE *fp, DEF_T symtab[] ) + DEF_T *sp; + + for( sp = symtab; fgets( line, sizeof( line ), fp ); sp++ ){ +- sscanf( line, "# define %s %d", sp->d_name, &sp->d_val ); ++ sscanf( line, " %s = %d,", sp->d_name, &sp->d_val ); + sp->d_used = FALSE; + } + return( (int)(sp - symtab) ); +diff --git a/AmberTools/src/netcdf-4.6.1/CMakeLists.txt b/AmberTools/src/netcdf-4.6.1/CMakeLists.txt +index 99a9faea7f..6865bae773 100644 +--- a/AmberTools/src/netcdf-4.6.1/CMakeLists.txt ++++ b/AmberTools/src/netcdf-4.6.1/CMakeLists.txt +@@ -11,7 +11,6 @@ cmake_minimum_required(VERSION 3.6.1) + + #Project Name + project(netCDF C) +-set(PACKAGE "netCDF" CACHE STRING "") + + ##### + # Version Info: +@@ -56,8 +55,8 @@ ENDIF() + # For ctest scripts, we can use CTEST_BUILD_NAME. + ### + +-SET(BUILDNAME_PREFIX "" CACHE STRING "") +-SET(BUILDNAME_SUFFIX "" CACHE STRING "") ++SET(BUILDNAME_PREFIX "") ++SET(BUILDNAME_SUFFIX "") + + IF(BUILDNAME_PREFIX) + SET(TMP_BUILDNAME "${BUILDNAME_PREFIX}-${TMP_BUILDNAME}") +@@ -68,7 +67,7 @@ IF(BUILDNAME_SUFFIX) + ENDIF() + + IF(NOT BUILDNAME) +- SET(BUILDNAME "${TMP_BUILDNAME}" CACHE STRING "Build name variable for CDash") ++ SET(BUILDNAME "${TMP_BUILDNAME}") + ENDIF() + ### + # End BUILDNAME customization. +@@ -82,8 +81,7 @@ IF(MSVC) + ENDIF() + + #Add custom CMake Module +-SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules/" +- CACHE INTERNAL "Location of our custom CMake modules.") ++SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/") + + # auto-configure style checks, other CMake modules. + INCLUDE(CheckLibraryExists) +@@ -119,12 +117,6 @@ ENDMACRO() + FIND_PACKAGE(MakeDist) + # End 'enable dist and distcheck' + +-# Set the build type. +-IF(NOT CMAKE_BUILD_TYPE) +- SET(CMAKE_BUILD_TYPE DEBUG CACHE STRING "Choose the type of build, options are: None, Debug, Release." +- FORCE) +-ENDIF() +- + # Set build type uppercase + STRING(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE) + +@@ -165,12 +157,12 @@ ENABLE_TESTING() + INCLUDE(CTest) + + # Copy the CTest customization file into binary directory, as required. +-FILE(COPY ${CMAKE_SOURCE_DIR}/CTestCustom.cmake DESTINATION ${CMAKE_BINARY_DIR}) ++FILE(COPY ${CMAKE_CURRENT_SOURCE_DIR}/CTestCustom.cmake DESTINATION ${CMAKE_BINARY_DIR}) + + # Set Memory test program for non-MSVC based builds. + # Assume valgrind for now. + IF(NOT MSVC) +- SET(CTEST_MEMORYCHECK_COMMAND valgrind CACHE STRING "") ++ SET(CTEST_MEMORYCHECK_COMMAND valgrind) + ENDIF() + + # Set variable to define the build type. +@@ -190,26 +182,25 @@ INCLUDE(GenerateExportHeader) + # BUILD_SHARED_LIBS is provided by/used by + # CMake directly. + ## +-OPTION(BUILD_SHARED_LIBS "Configure netCDF as a shared library." ON) + IF(BUILD_SHARED_LIBS) + SET(CMAKE_POSITION_INDEPENDENT_CODE ON) + ENDIF() + +-OPTION(NC_FIND_SHARED_LIBS "Find dynamically-built versions of dependent libraries" ${BUILD_SHARED_LIBS}) ++set(NC_FIND_SHARED_LIBS ${BUILD_SHARED_LIBS}) + + ## + # We've had a request to allow for non-versioned shared libraries. + # This seems reasonable enough to accomodate. See + # https://github.com/Unidata/netcdf-c/issues/228 for more info. + ## +-OPTION(ENABLE_SHARED_LIBRARY_VERSION "Encode the library SO version in the file name of the generated library file." ON) ++set(ENABLE_SHARED_LIBRARY_VERSION ON) + + # Set some default linux gcc & apple compiler options for + # debug builds. + IF(CMAKE_COMPILER_IS_GNUCC OR APPLE) +- OPTION(ENABLE_COVERAGE_TESTS "Enable compiler flags needed to perform coverage tests." OFF) +- OPTION(ENABLE_CONVERSION_WARNINGS "Enable warnings for implicit conversion from 64 to 32-bit datatypes." ON) +- OPTION(ENABLE_LARGE_FILE_TESTS "Enable large file tests." OFF) ++ set(ENABLE_COVERAGE_TESTS FALSE) ++ set(ENABLE_CONVERSION_WARNINGS TRUE) ++ set(ENABLE_LARGE_FILE_TESTS FALSE) + + # Debugging flags + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall") +@@ -258,10 +249,10 @@ ENDIF() + ##### + # System inspection checks + ##### +-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include) +-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/oc2) +-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/libsrc) +-SET(CMAKE_REQUIRED_INCLUDES ${CMAKE_SOURCE_DIR}/libsrc) ++INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) ++INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/oc2) ++INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/libsrc) ++SET(CMAKE_REQUIRED_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}/libsrc) + + ################################ + # End Compiler Configuration +@@ -307,14 +298,14 @@ ENDIF() + ################################ + + # HDF5 cache variables. +-SET(DEFAULT_CHUNK_SIZE 4194304 CACHE STRING "Default Chunk Cache Size.") +-SET(DEFAULT_CHUNKS_IN_CACHE 10 CACHE STRING "Default number of chunks in cache.") +-SET(CHUNK_CACHE_SIZE 4194304 CACHE STRING "Default Chunk Cache Size.") +-SET(CHUNK_CACHE_NELEMS 1009 CACHE STRING "Default maximum number of elements in cache.") +-SET(CHUNK_CACHE_PREEMPTION 0.75 CACHE STRING "Default file chunk cache preemption policy for HDf5 files(a number between 0 and 1, inclusive.") +-SET(MAX_DEFAULT_CACHE_SIZE 67108864 CACHE STRING "Default maximum cache size.") +-SET(NETCDF_LIB_NAME "" CACHE STRING "Default name of the netcdf library.") +-SET(TEMP_LARGE "." CACHE STRING "Where to put large temp files if large file tests are run.") ++SET(DEFAULT_CHUNK_SIZE 4194304) ++SET(DEFAULT_CHUNKS_IN_CACHE 10) ++SET(CHUNK_CACHE_SIZE 4194304) ++SET(CHUNK_CACHE_NELEMS 1009) ++SET(CHUNK_CACHE_PREEMPTION 0.75) ++SET(MAX_DEFAULT_CACHE_SIZE 67108864) ++SET(NETCDF_LIB_NAME "") ++SET(TEMP_LARGE ".") + + IF(NOT NETCDF_LIB_NAME STREQUAL "") + SET(MOD_NETCDF_NAME ON) +@@ -356,7 +347,7 @@ ENDMACRO() + + # Option to use Static Runtimes in MSVC + IF(MSVC) +- OPTION(NC_USE_STATIC_CRT "Use static CRT Libraries ('\\MT')." OFF) ++ set(NC_USE_STATIC_CRT FALSE) + IF(NC_USE_STATIC_CRT) + SET(USE_STATIC_CRT ON) + specify_static_crt_flag() +@@ -373,23 +364,23 @@ ELSE(NOT ENABLE_V2_API) + ENDIF(NOT ENABLE_V2_API) + + # Option to build utilities +-OPTION(BUILD_UTILITIES "Build ncgen, ncgen3, ncdump." ON) ++set(BUILD_UTILITIES TRUE) + + # Option to use MMAP +-OPTION(ENABLE_MMAP "Use MMAP." ON) ++set(ENABLE_MMAP TRUE) + + # Option to use examples. +-OPTION(ENABLE_EXAMPLES "Build Examples" ON) ++set(ENABLE_EXAMPLES FALSE) + + # Option to use Diskless +-OPTION(ENABLE_DISKLESS "Build Diskless." ON) ++set(ENABLE_DISKLESS FALSE) + IF(ENABLE_DISKLESS) + SET(BUILD_DISKLESS ON) + SET(USE_DISKLESS ON) + ENDIF() + + # Option Logging, only valid for netcdf4. +-OPTION(ENABLE_LOGGING "Enable Logging." OFF) ++set(ENABLE_LOGGING FALSE) + IF(ENABLE_LOGGING) + ADD_DEFINITIONS(-DLOGGING) + SET(LOGGING ON) +@@ -397,12 +388,12 @@ ENDIF() + + # Option to automatically build netcdf-fortran. + IF(NOT MSVC) +- OPTION(ENABLE_REMOTE_FORTRAN_BOOTSTRAP "Download and build netcdf-fortran automatically (EXPERIMENTAL)." OFF) ++ set(ENABLE_REMOTE_FORTRAN_BOOTSTRAP FALSE) + IF(ENABLE_REMOTE_FORTRAN_BOOTSTRAP) + SET(BUILD_FORTRAN ON) + ENDIF() + IF(BUILD_FORTRAN) +- CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/postinstall.sh.in" ++ CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/postinstall.sh.in" + "${CMAKE_BINARY_DIR}/postinstall.sh" + @ONLY) + +@@ -424,7 +415,7 @@ ENDIF() + # Allow the user to specify libraries + # to link against, similar to automakes 'LIBS' variable. + ### +-SET(NC_EXTRA_DEPS "" CACHE STRING "Additional libraries to link against.") ++SET(NC_EXTRA_DEPS "") + IF(NC_EXTRA_DEPS) + STRING(REPLACE " " ";" DEPS_LIST ${NC_EXTRA_DEPS}) + FOREACH(_DEP ${DEPS_LIST}) +@@ -447,7 +438,7 @@ ENDIF() + ### + + # Option to use HDF4 +-OPTION(ENABLE_HDF4 "Build netCDF-4 with HDF4 read capability(HDF4, HDF5 and Zlib required)." OFF) ++set(ENABLE_HDF4 FALSE) + IF(ENABLE_HDF4) + SET(USE_HDF4 ON) + # Check for include files, libraries. +@@ -482,7 +473,7 @@ IF(ENABLE_HDF4) + IF(NOT JPEGLIB_H_INCLUDE_DIR) + MESSAGE(FATAL_ERROR "HDF4 Support enabled but cannot find jpeglib.h") + ELSE() +- SET(HAVE_JPEGLIB_H ON CACHE BOOL "") ++ SET(HAVE_JPEGLIB_H ON) + SET(HAVE_LIBJPEG TRUE) + INCLUDE_DIRECTORIES(${JPEGLIB_H_INCLUDE_DIR}) + ENDIF() +@@ -495,7 +486,7 @@ IF(ENABLE_HDF4) + MESSAGE(STATUS "Found JPEG libraries: ${JPEG_LIB}") + + # Option to enable HDF4 file tests. +- OPTION(ENABLE_HDF4_FILE_TESTS "Run HDF4 file tests. This fetches sample HDF4 files from the Unidata ftp site to test with (requires curl)." ON) ++ set(ENABLE_HDF4_FILE_TESTS FALSE) + IF(ENABLE_HDF4_FILE_TESTS) + FIND_PROGRAM(PROG_CURL NAMES curl) + IF(PROG_CURL) +@@ -509,42 +500,43 @@ ENDIF() + + # Option to Build DLL + IF(WIN32) +- OPTION(ENABLE_DLL "Build a Windows DLL." ${BUILD_SHARED_LIBS}) ++ set(ENABLE_DLL ${BUILD_SHARED_LIBS}) + IF(ENABLE_DLL) +- SET(BUILD_DLL ON CACHE BOOL "") ++ SET(BUILD_DLL ON) + ADD_DEFINITIONS(-DDLL_NETCDF) + ADD_DEFINITIONS(-DDLL_EXPORT) + ADD_DEFINITIONS(-DUTF8PROC_DLLEXPORT) + ENDIF() + ENDIF() + # Did the user specify a default minimum blocksize for posixio? +-SET(NCIO_MINBLOCKSIZE 256 CACHE STRING "Minimum I/O Blocksize for netCDF classic and 64-bit offset format files.") ++SET(NCIO_MINBLOCKSIZE 256) + + # Build netCDF4 +-OPTION(ENABLE_NETCDF_4 "Enable netCDF-4" ON) ++set(ENABLE_NETCDF_4 FALSE) + IF(ENABLE_NETCDF_4) +- SET(USE_NETCDF4 ON CACHE BOOL "") +- SET(ENABLE_NETCDF_4 ON CACHE BOOL "") +- SET(ENABLE_NETCDF4 ON CACHE BOOL "") ++ SET(USE_NETCDF4 ON) ++ SET(ENABLE_NETCDF_4 ON) ++ SET(ENABLE_NETCDF4 ON) + ELSE() + SET(USE_HDF4_FILE_TESTS OFF) + SET(USE_HDF4 OFF) ++ SET(USE_NETCDF4 OFF) + SET(ENABLE_HDF4_FILE_TESTS OFF) + SET(ENABLE_HDF4 OFF) + ENDIF() + + # Option to allow for strict null file padding. + # See https://github.com/Unidata/netcdf-c/issues/657 for more information +-OPTION(ENABLE_STRICT_NULL_BYTE_HEADER_PADDING "Enable strict null byte header padding." OFF) ++set(ENABLE_STRICT_NULL_BYTE_HEADER_PADDING FALSE) + + IF(ENABLE_STRICT_NULL_BYTE_HEADER_PADDING) +- SET(USE_STRICT_NULL_BYTE_HEADER_PADDING ON CACHE BOOL "") ++ SET(USE_STRICT_NULL_BYTE_HEADER_PADDING ON) + ENDIF(ENABLE_STRICT_NULL_BYTE_HEADER_PADDING) + + # Option for building RPC +-OPTION(ENABLE_RPC "Enable RPC Client and Server." OFF) ++set(ENABLE_RPC FALSE) + IF(ENABLE_RPC) +- SET(BUILD_RPC ON CACHE BOOL "") ++ SET(BUILD_RPC ON) + ENDIF() + + ## +@@ -564,7 +556,7 @@ ENDIF() + # * HDF5_INCLUDE_DIR + # * + ## +-OPTION(USE_HDF5 "Use HDF5." ${ENABLE_NETCDF_4}) ++set(USE_HDF5 FALSE) + IF(USE_HDF5 OR ENABLE_NETCDF_4) + SET(USE_HDF5 ON) + SET(USE_NETCDF4 ON) +@@ -741,7 +733,7 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4) + ENDIF() + + SET(H5_USE_16_API 1) +- OPTION(NC_ENABLE_HDF_16_API "Enable HDF5 1.6.x Compatibility(Required)" ON) ++ set(NC_ENABLE_HDF_16_API FALSE) + IF(NOT NC_ENABLE_HDF_16_API) + SET(H5_USE_16_API 0) + ENDIF() +@@ -760,22 +752,22 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4) + ENDIF(USE_HDF5 OR ENABLE_NETCDF_4) + + # Option to turn on CDF5 support. +-OPTION(ENABLE_CDF5 "Enable CDF5 Support." OFF) ++set(ENABLE_CDF5 FALSE) + IF(ENABLE_CDF5) +- SET(USE_CDF5 ON CACHE BOOL "") ++ SET(USE_CDF5 ON) + ENDIF(ENABLE_CDF5) + + # Option to Build DAP2+DAP4 Clients +-OPTION(ENABLE_DAP "Enable DAP2 and DAP4 Client." ON) ++set(ENABLE_DAP FALSE) + IF(ENABLE_DAP) +- SET(USE_DAP ON CACHE BOOL "") +- SET(ENABLE_DAP2 ON CACHE BOOL "") ++ SET(USE_DAP ON) ++ SET(ENABLE_DAP2 ON) + + + IF(ENABLE_NETCDF_4) +- SET(ENABLE_DAP4 ON CACHE BOOL "") ++ SET(ENABLE_DAP4 ON) + ELSE(ENABLE_NETCDF_4) +- SET(ENABLE_DAP4 OFF CACHE BOOL "") ++ SET(ENABLE_DAP4 OFF) + ENDIF(ENABLE_NETCDF_4) + + FIND_PACKAGE(CURL) +@@ -822,29 +814,20 @@ ELSE() + ENDIF() + + +-# Check for the math library so it can be explicitly linked. +-IF(NOT WIN32) +- FIND_LIBRARY(HAVE_LIBM NAMES math m libm) +- MESSAGE(STATUS "Found Math library: ${HAVE_LIBM}") +- IF(NOT HAVE_LIBM) +- MESSAGE(FATAL_ERROR "Unable to find the math library.") +- ENDIF() +-ENDIF() +- + # Option to Enable DAP long tests, remote tests. +-OPTION(ENABLE_DAP_LONG_TESTS "Enable DAP long tests." OFF) +-OPTION(ENABLE_DAP_REMOTE_TESTS "Enable DAP remote tests." ON) +-SET(REMOTETESTSERVERS "remotetest.unidata.ucar.edu,jetstream.unidata.ucar.edu" CACHE STRING "test servers to use for remote test") ++set(ENABLE_DAP_LONG_TESTS OFF) ++set(ENABLE_DAP_REMOTE_TESTS FALSE) ++SET(REMOTETESTSERVERS "remotetest.unidata.ucar.edu,jetstream.unidata.ucar.edu") + + # If netCDF4 and DAP, Option for DAP groups. + IF(ENABLE_NETCDF_4 AND ENABLE_DAP2) +- OPTION(ENABLE_DAP_GROUPS "Whether netcdf4 group names should be enabled." ON) ++ set(ENABLE_DAP_GROUPS TRUE) + ELSE() +- SET(ENABLE_DAP_GROUPS OFF CACHE BOOL "Whether netcdf4 group names should be enabled.") ++ SET(ENABLE_DAP_GROUPS OFF) + ENDIF() + + # Enable some developer-only tests +-OPTION(ENABLE_EXTRA_TESTS "Enable Extra tests. Some may not work because of known issues. Developers only." OFF) ++set(ENABLE_EXTRA_TESTS FALSE) + IF(ENABLE_EXTRA_TESTS) + SET(EXTRA_TESTS ON) + ENDIF() +@@ -852,9 +835,9 @@ ENDIF() + # Option to use bundled XGetopt in place of getopt(). This is mostly useful + # for MSVC builds. If not building utilities, getopt() isn't required at all. + IF(MSVC) +- OPTION(ENABLE_XGETOPT "Enable bundled XGetOpt instead of external getopt()." ON) ++ set(ENABLE_XGETOPT TRUE) + IF(ENABLE_XGETOPT) +- SET(USE_X_GETOPT ON CACHE BOOL "") ++ SET(USE_X_GETOPT ON) + ENDIF() + ENDIF() + +@@ -862,29 +845,29 @@ SET(MATH "") + IF(NOT WIN32) + + # STDIO instead of posixio. +- OPTION(ENABLE_STDIO "If true, use stdio instead of posixio (ex. on the Cray)" OFF) ++ set(ENABLE_STDIO FALSE) + IF(ENABLE_STDIO) +- SET(USE_STDIO ON CACHE BOOL "") ++ SET(USE_STDIO ON) + ENDIF() + + # FFIO insteaad of PosixIO +- OPTION(ENABLE_FFIO "If true, use ffio instead of posixio" OFF) ++ set(ENABLE_FFIO FALSE) + IF(ENABLE_FFIO) +- SET(USE_FFIO ON CACHE BOOL "") ++ SET(USE_FFIO ON) + ENDIF() + ENDIF() + + ## + # Enable Tests + ## +-OPTION(ENABLE_TESTS "Enable basic tests, run with 'make test'." ON) ++set(ENABLE_TESTS FALSE) + IF(ENABLE_TESTS) +- SET(BUILD_TESTSETS ON CACHE BOOL "") ++ SET(BUILD_TESTSETS ON) + + # Options for CTest-based tests, dashboards. +- SET(NC_CTEST_PROJECT_NAME "netcdf-c" CACHE STRING "Project Name for CTest-based testing purposes.") +- SET(NC_CTEST_DROP_SITE "cdash.unidata.ucar.edu" CACHE STRING "Dashboard location for CTest-based testing purposes.") +- SET(NC_CTEST_DROP_LOC_PREFIX "" CACHE STRING "Prefix for Dashboard location on remote server when using CTest-based testing.") ++ SET(NC_CTEST_PROJECT_NAME "netcdf-c") ++ SET(NC_CTEST_DROP_SITE "cdash.unidata.ucar.edu") ++ SET(NC_CTEST_DROP_LOC_PREFIX "") + + FIND_PROGRAM(HOSTNAME_CMD NAMES hostname) + IF(NOT MSVC) +@@ -892,11 +875,11 @@ IF(ENABLE_TESTS) + ENDIF() + IF(HOSTNAME_CMD) + EXEC_PROGRAM(${HOSTNAME_CMD} ARGS "${HOSTNAME_ARG}" OUTPUT_VARIABLE HOSTNAME) +- SET(NC_CTEST_SITE "${HOSTNAME}" CACHE STRING "Hostname of test machine.") ++ SET(NC_CTEST_SITE "${HOSTNAME}") + ENDIF() + + IF(NC_CTEST_SITE) +- SET(SITE "${NC_CTEST_SITE}" CACHE STRING "") ++ SET(SITE "${NC_CTEST_SITE}") + ENDIF() + + # Create a CTestConfig file from the template. +@@ -920,7 +903,7 @@ IF(ENABLE_TESTS) + # which are known to fail. + ### + +- OPTION(ENABLE_FAILING_TESTS "Run tests which are known to fail, check to see if any have been fixed." OFF) ++ set(ENABLE_FAILING_TESTS FALSE) + + ### + # End known-failures. +@@ -931,7 +914,7 @@ ENDIF() + ### + # Option to enable extreme numbers during testing. + ### +-OPTION(ENABLE_EXTREME_NUMBERS "Enable extreme numbers during testing, such as MAX_INT-1" ON) ++set(ENABLE_EXTREME_NUMBERS TRUE) + IF(ENABLE_EXTREME_NUMBERS) + SET(USE_EXTREME_NUMBERS ON) + ENDIF() +@@ -942,22 +925,22 @@ IF(ENABLE_LARGE_FILE_TESTS) + ENDIF() + + # Location for large file tests. +-SET(TEMP_LARGE "." CACHE STRING "Location to store large file tests.") ++SET(TEMP_LARGE ".") + +-OPTION(ENABLE_FSYNC "Enable experimental fsync code." OFF) ++set(ENABLE_FSYNC FALSE) + IF(ENABLE_FSYNC) + SET(USE_FSYNC ON) + ENDIF() + + # Temporary +-OPTION (ENABLE_JNA "Enable jna bug fix code." OFF) ++set (ENABLE_JNA FALSE) + IF(ENABLE_JNA) + SET(JNA ON) + ENDIF() + + # Linux specific large file support flags. + # Modelled after check in CMakeLists.txt for hdf5. +-OPTION(ENABLE_LARGE_FILE_SUPPORT "Enable large file support." ON) ++set(ENABLE_LARGE_FILE_SUPPORT TRUE) + IF(ENABLE_LARGE_FILE_SUPPORT) + IF(MSVC) + SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE") +@@ -968,41 +951,41 @@ IF(ENABLE_LARGE_FILE_SUPPORT) + ENDIF() + ENDIF() + +-OPTION(ENABLE_EXAMPLE_TESTS "Run extra example tests. Requires GNU Sed. Ignored if netCDF-4 is not Enabled" OFF) ++set(ENABLE_EXAMPLE_TESTS FALSE) + IF(NOT ENABLE_NETCDF_4 AND ENABLE_EXAMPLE_TESTS) + SET(ENABLE_EXAMPLE_TESTS OFF) + ENDIF() + + # Enable Parallel (different than pnetcdf). + SET(STATUS_PARALLEL "OFF") +-OPTION(ENABLE_PARALLEL4 "Build netCDF-4 with parallel IO" "${HDF5_PARALLEL}") ++set(ENABLE_PARALLEL4 FALSE) + IF(ENABLE_PARALLEL4 AND ENABLE_NETCDF_4) + IF(NOT HDF5_PARALLEL) +- SET(USE_PARALLEL OFF CACHE BOOL "") ++ SET(USE_PARALLEL OFF) + MESSAGE(STATUS "Cannot find HDF5 library built with parallel support. Disabling parallel build.") + ELSE() +- SET(HDF5_PARALLEL ON CACHE BOOL "") +- SET(USE_PARALLEL ON CACHE BOOL "") +- SET(USE_PARALLEL4 ON CACHE BOOL "") ++ SET(HDF5_PARALLEL ON) ++ SET(USE_PARALLEL ON) ++ SET(USE_PARALLEL4 ON) + SET(STATUS_PARALLEL "ON") + ENDIF() + ENDIF() + + # Options to enable parallel IO, tests. + SET(STATUS_PNETCDF "OFF") +-OPTION(ENABLE_PNETCDF "Build with parallel I/O for classic and 64-bit offset files using parallel-netcdf." OFF) ++set(ENABLE_PNETCDF FALSE) + + IF(ENABLE_PNETCDF) + # Check for ncmpi_create in libpnetcdf, define USE_PNETCDF + # Does the user want to turn on PNETCDF read ability? +- SET(USE_PNETCDF ON CACHE BOOL "") ++ SET(USE_PNETCDF ON) + FIND_LIBRARY(PNETCDF NAMES pnetcdf) + FIND_PATH(PNETCDF_INCLUDE_DIR pnetcdf.h) + IF(NOT PNETCDF) + MESSAGE(STATUS "Cannot find PnetCDF library. Disabling PnetCDF support.") +- SET(USE_PNETCDF OFF CACHE BOOL "") ++ SET(USE_PNETCDF OFF) + ELSE(NOT PNETCDF) +- SET(USE_PARALLEL ON CACHE BOOL "") ++ SET(USE_PARALLEL ON) + + # Check PnetCDF version. Must be >= 1.6.0 + set(pnetcdf_h "${PNETCDF_INCLUDE_DIR}/pnetcdf.h" ) +@@ -1032,7 +1015,7 @@ ENDIF() + + # Options to enable use of fill values for elements casuing NC_ERANGE + SET(STATUS_ERANGE_FILL "OFF") +-OPTION(ENABLE_ERANGE_FILL "Enable use of fill value when out-of-range type conversion causes NC_ERANGE error." OF) ++set(ENABLE_ERANGE_FILL FALSE) + IF(ENABLE_ERANGE_FILL) + SET(STATUS_ERANGE_FILL "ON") + ADD_DEFINITIONS(-DERANGE_FILL) +@@ -1040,7 +1023,7 @@ ENDIF() + + # Options to use a more relaxed coordinate argument boundary check + SET(STATUS_RELAX_COORD_BOUND "OFF") +-OPTION(ENABLE_ZERO_LENGTH_COORD_BOUND "Enable a more relaxed boundary error check NC_EINVALCOORDS to allow coordinate start argument equal to dimension size when argument count is zero." OFF) ++set(ENABLE_ZERO_LENGTH_COORD_BOUND FALSE) + IF(ENABLE_ZERO_LENGTH_COORD_BOUND) + SET(STATUS_RELAX_COORD_BOUND "ON") + ENDIF() +@@ -1076,7 +1059,7 @@ IF(STATUS_PNETCDF) + ENDIF() + + IF(STATUS_ERANGE_FILL) +- SET(M4FLAGS "-DERANGE_FILL" CACHE STRING "") ++ SET(M4FLAGS "-DERANGE_FILL") + ENDIF() + + IF(STATUS_RELAX_COORD_BOUND) +@@ -1085,11 +1068,11 @@ IF(STATUS_RELAX_COORD_BOUND) + ENDIF() + + # Enable Parallel Tests. +-OPTION(ENABLE_PARALLEL_TESTS "Enable Parallel IO Tests. Requires HDF5/NetCDF4 with parallel I/O Support." ${USE_PARALLEL}) ++set(ENABLE_PARALLEL_TESTS FALSE) + IF(ENABLE_PARALLEL_TESTS AND USE_PARALLEL) +- SET(TEST_PARALLEL ON CACHE BOOL "") ++ SET(TEST_PARALLEL ON) + IF(USE_NETCDF4) +- SET(TEST_PARALLEL4 ON CACHE BOOL "") ++ SET(TEST_PARALLEL4 ON) + ENDIF() + ENDIF() + +@@ -1098,26 +1081,18 @@ IF (ENABLE_PARALLEL_TESTS AND NOT USE_PARALLEL) + ENDIF() + + # Enable special filter test; experimental when using cmake. +-OPTION(ENABLE_FILTER_TESTING "Enable filter testing. Ignored if shared libraries or netCDF4 are not enabled" OFF) +-IF(NOT ENABLE_NETCDF4) +- MESSAGE(WARNING "ENABLE_FILTER_TESTING requires netCDF-4. Disabling.") +- SET(ENABLE_FILTER_TESTING OFF CACHE BOOL "") +-ENDIF() +-IF(NOT BUILD_SHARED_LIBS) +- MESSAGE(WARNING "ENABLE_FILTER_TESTING requires shared libraries. Disabling.") +- SET(ENABLE_FILTER_TESTING OFF CACHE BOOL "") +-ENDIF() ++set(ENABLE_FILTER_TESTING OFF) + + # Determine whether or not to generate documentation. +-OPTION(ENABLE_DOXYGEN "Enable generation of doxygen-based documentation." OFF) ++set(ENABLE_DOXYGEN FALSE) + IF(ENABLE_DOXYGEN) + FIND_PACKAGE(Doxygen REQUIRED) + # Offer the option to build internal documentation. +- OPTION(ENABLE_INTERNAL_DOCS "Build internal documentation. This is of interest to developers only." OFF) ++ set(ENABLE_INTERNAL_DOCS FALSE) + IF(ENABLE_INTERNAL_DOCS) +- SET(BUILD_INTERNAL_DOCS YES CACHE STRING "") ++ SET(BUILD_INTERNAL_DOCS YES) + ELSE() +- SET(BUILD_INTERNAL_DOCS NO CACHE STRING "") ++ SET(BUILD_INTERNAL_DOCS NO) + ENDIF() + + ### +@@ -1125,57 +1100,57 @@ IF(ENABLE_DOXYGEN) + # If we are building release documentation, we need to set some + # variables that will be used in the Doxygen.in template. + ### +- OPTION(ENABLE_DOXYGEN_BUILD_RELEASE_DOCS "Build release documentation. This is of interest only to the netCDF developers." OFF) ++ set(ENABLE_DOXYGEN_BUILD_RELEASE_DOCS OFF) + IF(ENABLE_DOXYGEN_BUILD_RELEASE_DOCS) +- SET(DOXYGEN_CSS_FILE "${CMAKE_SOURCE_DIR}/docs/release.css" CACHE STRING "") +- SET(DOXYGEN_HEADER_FILE "${CMAKE_SOURCE_DIR}/docs/release_header.html" CACHE STRING "") +- SET(DOXYGEN_SEARCHENGINE "NO" CACHE STRING "") +- SET(ENABLE_DOXYGEN_SERVER_BASED_SEARCH NO CACHE STRING "") ++ SET(DOXYGEN_CSS_FILE "${CMAKE_CURRENT_SOURCE_DIR}/docs/release.css") ++ SET(DOXYGEN_HEADER_FILE "${CMAKE_CURRENT_SOURCE_DIR}/docs/release_header.html") ++ SET(DOXYGEN_SEARCHENGINE "NO") ++ SET(ENABLE_DOXYGEN_SERVER_BASED_SEARCH NO) + ELSE() +- SET(DOXYGEN_CSS_FILE "" CACHE STRING "") +- SET(DOXYGEN_HEADER_FILE "" CACHE STRING "") +- SET(DOXYGEN_SEARCHENGINE "YES" CACHE STRING "") ++ SET(DOXYGEN_CSS_FILE "") ++ SET(DOXYGEN_HEADER_FILE "") ++ SET(DOXYGEN_SEARCHENGINE "YES") + + # If not using release document configuration, + # provide an option for server-based search. +- OPTION(ENABLE_DOXYGEN_SERVER_SIDE_SEARCH "Configure Doxygen with server-based search." OFF) ++ set(ENABLE_DOXYGEN_SERVER_SIDE_SEARCH FALSE) + IF(ENABLE_DOXYGEN_SERVER_SIDE_SEARCH) +- SET(DOXYGEN_SERVER_BASED_SEARCH "YES" CACHE STRING "") ++ SET(DOXYGEN_SERVER_BASED_SEARCH "YES") + ELSE() +- SET(DOXYGEN_SERVER_BASED_SEARCH "NO" CACHE STRING "") ++ SET(DOXYGEN_SERVER_BASED_SEARCH "NO") + ENDIF(ENABLE_DOXYGEN_SERVER_SIDE_SEARCH) + + + ENDIF(ENABLE_DOXYGEN_BUILD_RELEASE_DOCS) + # Option to turn on the TODO list in the doxygen-generated documentation. +- OPTION(DOXYGEN_ENABLE_TASKS "Turn on test, todo, bug lists in documentation. This is of interest to developers only." OFF) ++ set(DOXYGEN_ENABLE_TASKS FALSE) + IF(DOXYGEN_ENABLE_TASKS) +- SET(SHOW_DOXYGEN_TAG_LIST YES CACHE STRING "") ++ SET(SHOW_DOXYGEN_TAG_LIST YES) + ELSE(DOXYGEN_ENABLE_TASKS) +- SET(SHOW_DOXYGEN_TODO_LIST NO CACHE STRING "") ++ SET(SHOW_DOXYGEN_TODO_LIST NO) + ENDIF(DOXYGEN_ENABLE_TASKS) + +- OPTION(ENABLE_DOXYGEN_PDF_OUTPUT "[EXPERIMENTAL] Turn on PDF output for Doxygen-generated documentation." OFF) ++ set(ENABLE_DOXYGEN_PDF_OUTPUT FALSE) + + IF(ENABLE_DOXYGEN_PDF_OUTPUT) +- SET(NC_ENABLE_DOXYGEN_PDF_OUTPUT "YES" CACHE STRING "") ++ SET(NC_ENABLE_DOXYGEN_PDF_OUTPUT "YES") + ELSE() +- SET(NC_ENABLE_DOXYGEN_PDF_OUTPUT "NO" CACHE STRING "") ++ SET(NC_ENABLE_DOXYGEN_PDF_OUTPUT "NO") + ENDIF() + + FIND_PROGRAM(NC_DOT NAMES dot) + # Specify whether or not 'dot' was found on the system path. + IF(NC_DOT) +- SET(HAVE_DOT YES CACHE STRING "") ++ SET(HAVE_DOT YES) + ELSE(NC_DOT) +- SET(HAVE_DOT NO CACHE STRING "") ++ SET(HAVE_DOT NO) + ENDIF(NC_DOT) + ENDIF() + + # By default, MSVC has a stack size of 1000000. + # Allow a user to override this. + IF(MSVC) +- SET(NC_MSVC_STACK_SIZE 40000000 CACHE STRING "Default stack size for MSVC-based projects.") ++ SET(NC_MSVC_STACK_SIZE 40000000) + # By default, CMake sets the stack to 1000000. + # Remove this limitation. + # See here for more details: +@@ -1289,7 +1264,7 @@ CHECK_TYPE_SIZE("ssize_t" HAVE_SSIZE_T) + CHECK_TYPE_SIZE("__int64" SIZEOF___INT_64) + CHECK_TYPE_SIZE("int64_t" SIZEOF_INT64_T) + CHECK_TYPE_SIZE("uint64_t" SIZEOF_UINT64_T) +-CHECK_TYPE_SIZE("unsigned char" SIZEOF_UCHAR) ++CHECK_TYPE_SIZE("unsigned char" SIZEOF_UNSIGNED_CHAR) + CHECK_TYPE_SIZE("unsigned short int" SIZEOF_UNSIGNED_SHORT_INT) + CHECK_TYPE_SIZE("unsigned int" SIZEOF_UNSIGNED_INT) + CHECK_TYPE_SIZE("long long" SIZEOF_LONGLONG) +@@ -1385,7 +1360,7 @@ MACRO(add_bin_env_temp_large_test prefix F) + ) + ENDIF() + +- ADD_TEST(${prefix}_${F} bash "-c" "TEMP_LARGE=${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/${prefix}_${F}") ++ ADD_TEST(${prefix}_${F} bash "-c" "TEMP_LARGE=${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/${prefix}_${F}") + IF(MSVC) + SET_PROPERTY(TARGET ${prefix}_${F} PROPERTY FOLDER "tests") + SET_TARGET_PROPERTIES(${prefix}_${F} PROPERTIES RUNTIME_OUTPUT_DIRECTORY +@@ -1410,7 +1385,7 @@ MACRO(add_bin_env_test prefix F) + ) + ENDIF() + +- ADD_TEST(${prefix}_${F} bash "-c" "TOPSRCDIR=${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/${prefix}_${F}") ++ ADD_TEST(${prefix}_${F} bash "-c" "TOPSRCDIR=${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/${prefix}_${F}") + IF(MSVC) + SET_PROPERTY(TARGET ${prefix}_${F} PROPERTY FOLDER "tests") + ENDIF() +@@ -1552,7 +1527,7 @@ ENDIF() + + MACRO(add_sh_test prefix F) + IF(HAVE_BASH) +- ADD_TEST(${prefix}_${F} bash "-c" "export srcdir=${CMAKE_CURRENT_SOURCE_DIR};export TOPSRCDIR=${CMAKE_SOURCE_DIR};${CMAKE_CURRENT_BINARY_DIR}/${F}.sh") ++ ADD_TEST(${prefix}_${F} bash "-c" "export srcdir=${CMAKE_CURRENT_SOURCE_DIR};export TOPSRCDIR=${CMAKE_CURRENT_SOURCE_DIR};${CMAKE_CURRENT_BINARY_DIR}/${F}.sh") + ENDIF() + ENDMACRO() + +@@ -1774,6 +1749,7 @@ INSTALL(FILES ${netCDF_BINARY_DIR}/netcdf.pc + INSTALL(PROGRAMS ${netCDF_BINARY_DIR}/nc-config + DESTINATION ${CMAKE_INSTALL_BINDIR} + COMPONENT utilities) ++ + + ### + # End pkgconfig, nc-config file creation. +@@ -1782,11 +1758,11 @@ INSTALL(PROGRAMS ${netCDF_BINARY_DIR}/nc-config + ## + # Print the configuration summary + ## +-print_conf_summary() ++#print_conf_summary() + + # Enable Makedist files. +-ADD_MAKEDIST() +-ENABLE_MAKEDIST(README.md COPYRIGHT RELEASE_NOTES.md INSTALL INSTALL.cmake test_prog.c lib_flags.am cmake CMakeLists.txt COMPILE.cmake.txt config.h.cmake.in cmake_uninstall.cmake.in netcdf-config-version.cmake.in netcdf-config.cmake.in FixBundle.cmake.in nc-config.cmake.in configure configure.ac install-sh config.h.in config.sub CTestConfig.cmake.in) ++#ADD_MAKEDIST() ++#ENABLE_MAKEDIST(README.md COPYRIGHT RELEASE_NOTES.md INSTALL INSTALL.cmake test_prog.c lib_flags.am cmake CMakeLists.txt COMPILE.cmake.txt config.h.cmake.in cmake_uninstall.cmake.in netcdf-config-version.cmake.in netcdf-config.cmake.in FixBundle.cmake.in nc-config.cmake.in configure configure.ac install-sh config.h.in config.sub CTestConfig.cmake.in) + + ##### + # Configure and print the libnetcdf.settings file. +@@ -1799,7 +1775,7 @@ SET(host_cpu "${cpu}") + SET(host_vendor "${osname}") + SET(host_os "${osrel}") + SET(abs_top_builddir "${CMAKE_BINARY_DIR}") +-SET(abs_top_srcdir "${CMAKE_SOURCE_DIR}") ++SET(abs_top_srcdir "${CMAKE_CURRENT_SOURCE_DIR}") + + SET(CC_VERSION "${CMAKE_C_COMPILER}") + +@@ -1843,7 +1819,7 @@ CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/libnetcdf.settings.in" + # might also work on Windows. + FILE(READ "${CMAKE_CURRENT_BINARY_DIR}/libnetcdf.settings" + LIBNETCDF_SETTINGS) +-MESSAGE(${LIBNETCDF_SETTINGS}) ++#MESSAGE(${LIBNETCDF_SETTINGS}) + + # Install libnetcdf.settings file into same location + # as the libraries. +@@ -1868,16 +1844,16 @@ FILE(COPY ${netCDF_SOURCE_DIR}/include/netcdf_meta.h + ##### + # Build test_common.sh + ##### +-SET(EXTRA_DIST ${EXTRA_DIST} ${CMAKE_SOURCE_DIR}/test_common.in) +-SET(TOPSRCDIR "${CMAKE_SOURCE_DIR}") ++SET(EXTRA_DIST ${EXTRA_DIST} ${CMAKE_CURRENT_SOURCE_DIR}/test_common.in) ++SET(TOPSRCDIR "${CMAKE_CURRENT_SOURCE_DIR}") + SET(TOPBUILDDIR "${CMAKE_BINARY_DIR}") +-configure_file(${CMAKE_SOURCE_DIR}/test_common.in ${CMAKE_BINARY_DIR}/test_common.sh @ONLY NEWLINE_STYLE LF) ++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/test_common.in ${CMAKE_BINARY_DIR}/test_common.sh @ONLY NEWLINE_STYLE LF) + + ##### + # Build nc_test4/findplugin.sh + ##### + SET(ISCMAKE "1") +-configure_file(${CMAKE_SOURCE_DIR}/nc_test4/findplugin.in ${CMAKE_BINARY_DIR}/nc_test4/findplugin.sh @ONLY NEWLINE_STYLE LF) ++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/nc_test4/findplugin.in ${CMAKE_BINARY_DIR}/nc_test4/findplugin.sh @ONLY NEWLINE_STYLE LF) + + + #### +@@ -1934,4 +1910,4 @@ install( + + # CPack inclusion must come last. + # INCLUDE(CPack) +-INCLUDE(CMakeInstallation.cmake) ++#INCLUDE(CMakeInstallation.cmake) +diff --git a/AmberTools/src/netcdf-4.6.1/config.h.cmake.in b/AmberTools/src/netcdf-4.6.1/config.h.cmake.in +index 35be9ca461..9317c9a71f 100644 +--- a/AmberTools/src/netcdf-4.6.1/config.h.cmake.in ++++ b/AmberTools/src/netcdf-4.6.1/config.h.cmake.in +@@ -335,8 +335,8 @@ are set when opening a binary file on Windows. */ + /* Define to 1 if you have the header file. */ + #cmakedefine HAVE_SYS_TYPES_H 1 + +-/* Define to 1 if the system has the type `uchar'. */ +-#cmakedefine HAVE_UCHAR 1 ++/* Define to 1 if the system has the type `unsigned char'. */ ++#cmakedefine HAVE_UNSIGNED_CHAR 1 + + /* Define to 1 if the system has the type `uint'. */ + #cmakedefine HAVE_UINT 1 +@@ -422,7 +422,7 @@ are set when opening a binary file on Windows. */ + #cmakedefine SIZEOF_CHAR @SIZEOF_CHAR@ + + /* The size of `uchar` as computed by sizeof. */ +-#cmakedefine SIZEOF_UCHAR @SIZEOF_UCHAR@ ++#cmakedefine SIZEOF_UNSIGNED_CHAR @SIZEOF_UNSIGNED_CHAR@ + + /* The size of `__int64` found on Windows systems. */ + #cmakedefine SIZEOF___INT64 ${SIZEOF___INT64} +diff --git a/AmberTools/src/netcdf-4.6.1/config.h.in b/AmberTools/src/netcdf-4.6.1/config.h.in +index d0d2fea38b..d5a8818bba 100644 +--- a/AmberTools/src/netcdf-4.6.1/config.h.in ++++ b/AmberTools/src/netcdf-4.6.1/config.h.in +@@ -256,8 +256,8 @@ + /* Define to 1 if you have the header file. */ + #undef HAVE_SYS_TYPES_H + +-/* Define to 1 if the system has the type `uchar'. */ +-#undef HAVE_UCHAR ++/* Define to 1 if the system has the type `unsigned char'. */ ++#undef HAVE_UNSIGNED_CHAR + + /* Define to 1 if the system has the type `uint'. */ + #undef HAVE_UINT +@@ -365,9 +365,6 @@ + /* The size of `ssize_t', as computed by sizeof. */ + #undef SIZEOF_SSIZE_T + +-/* The size of `uchar', as computed by sizeof. */ +-#undef SIZEOF_UCHAR +- + /* The size of `uint', as computed by sizeof. */ + #undef SIZEOF_UINT + +diff --git a/AmberTools/src/netcdf-4.6.1/include/ncconfigure.h b/AmberTools/src/netcdf-4.6.1/include/ncconfigure.h +index 0b20bb5f9b..8438dc96db 100644 +--- a/AmberTools/src/netcdf-4.6.1/include/ncconfigure.h ++++ b/AmberTools/src/netcdf-4.6.1/include/ncconfigure.h +@@ -47,9 +47,9 @@ char *nulldup(const char* s); + #endif + + #ifndef HAVE_STRLCAT +-#ifdef _MSC_VER ++#if defined(_MSC_VER) || defined(__MINGW32__) + /* Windows strlcat_s is equivalent to strlcat, but different arg order */ +-#define strlcat(d,s,n) strcat_s((d),(n),(s)) ++#define strlcat(d,s,n) strcat_s(d,n,s) + #else + extern size_t strlcat(char* dst, const char* src, size_t dsize); + #endif +diff --git a/AmberTools/src/netcdf-4.6.1/libdispatch/dstring.c b/AmberTools/src/netcdf-4.6.1/libdispatch/dstring.c +index 2a3cece0d5..516713a4ad 100644 +--- a/AmberTools/src/netcdf-4.6.1/libdispatch/dstring.c ++++ b/AmberTools/src/netcdf-4.6.1/libdispatch/dstring.c +@@ -319,7 +319,8 @@ strdup(const char* s) + */ + + #ifndef HAVE_STRLCAT +-#ifndef _MSC_VER /* We will use strcat_s */ ++#if !defined(_MSC_VER) && !defined(__MINGW32__) ++ + /* + * Appends src to string dst of size dsize (unlike strncat, dsize is the + * full size of dst, not space left). At most dsize-1 characters +diff --git a/AmberTools/src/netcdf-4.6.1/liblib/CMakeLists.txt b/AmberTools/src/netcdf-4.6.1/liblib/CMakeLists.txt +index 1afc85486c..f10ec6f2da 100644 +--- a/AmberTools/src/netcdf-4.6.1/liblib/CMakeLists.txt ++++ b/AmberTools/src/netcdf-4.6.1/liblib/CMakeLists.txt +@@ -51,7 +51,11 @@ ENDIF() + + SET(TLL_LIBS "") + +-SET(TLL_LIBS ${TLL_LIBS} ${HAVE_LIBM} ${ZLIB_LIBRARY}) ++SET(TLL_LIBS ${TLL_LIBS} ${ZLIB_LIBRARY}) ++ ++if(libm_ENABLED) ++ list(APPEND TLL_LIBS libm) ++endif() + + # Add extra dependencies specified via NC_EXTRA_DEPS + SET(TLL_LIBS ${TLL_LIBS} ${EXTRA_DEPS}) +@@ -117,6 +121,9 @@ IF(ENABLE_SHARED_LIBRARY_VERSION) + ) + ENDIF(ENABLE_SHARED_LIBRARY_VERSION) + ++# attach the NetCDF include directory to the NetCDF library ++target_include_directories(netcdf INTERFACE $) ++ + ### + # The INCLUDES directive was introduced in 2.8.12. + # However, 2.8.11 is still the default on some +diff --git a/AmberTools/src/netcdf-4.6.1/libsrc/CMakeLists.txt b/AmberTools/src/netcdf-4.6.1/libsrc/CMakeLists.txt +index 4dc6e1aae3..3119f0885c 100644 +--- a/AmberTools/src/netcdf-4.6.1/libsrc/CMakeLists.txt ++++ b/AmberTools/src/netcdf-4.6.1/libsrc/CMakeLists.txt +@@ -50,17 +50,3 @@ IF (BUILD_PARALLEL) + SET(ARGS_MANPAGE ${ARGS_MANPAGE} -DPARALLEL_IO=TRUE) + ENDIF(BUILD_PARALLEL) + +-# Generate the man page. +-IF(HAVE_M4) +- +- FILE(GLOB libsrc_MANPAGE ${CMAKE_SOURCE_DIR}/docs/netcdf.m4) +- FILE(COPY ${libsrc_MANPAGE} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) +- +- ADD_CUSTOM_TARGET(manpage ALL +- +- COMMAND ${NC_M4} ${ARGS_MANPAGE} '${CMAKE_CURRENT_BINARY_DIR}/netcdf.m4' > '${CMAKE_CURRENT_BINARY_DIR}/netcdf.3' +- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} +- ) +- +- INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/netcdf.3 DESTINATION "share/man/man3" COMPONENT documentation) +-ENDIF() +diff --git a/AmberTools/src/netcdf-4.6.1/nc_test/CMakeLists.txt b/AmberTools/src/netcdf-4.6.1/nc_test/CMakeLists.txt +index 06943c5c87..e504dca909 100644 +--- a/AmberTools/src/netcdf-4.6.1/nc_test/CMakeLists.txt ++++ b/AmberTools/src/netcdf-4.6.1/nc_test/CMakeLists.txt +@@ -24,10 +24,11 @@ SET (nc_test_SRC + ) + + ADD_EXECUTABLE(nc_test ${nc_test_SRC}) +-TARGET_LINK_LIBRARIES(nc_test +- netcdf +- ${HAVE_LIBM} +- ) ++TARGET_LINK_LIBRARIES(nc_test netcdf) ++ ++if(libm_ENABLED) ++ target_link_libraries(nc_test libm) ++endif() + + # Some extra stand-alone tests + SET(TESTS t_nc tst_small tst_misc tst_norm tst_names tst_nofill tst_nofill2 tst_nofill3 tst_meta tst_inq_type tst_utf8_validate tst_utf8_phrases tst_global_fillval tst_max_var_dims tst_formats tst_def_var_fill) +diff --git a/AmberTools/src/pbsa/CMakeLists.txt b/AmberTools/src/pbsa/CMakeLists.txt +index d271663bad..a37b0b140e 100644 +--- a/AmberTools/src/pbsa/CMakeLists.txt ++++ b/AmberTools/src/pbsa/CMakeLists.txt +@@ -2,22 +2,22 @@ project(pbsa C Fortran) + + set(EXECUTABLE_SOURCES dsvdc.F90 pbsa.F90 pb_read.F90 pb_write.F90 getcoor.F90 + runmd.F90 runmin.F90 force.F90 pbsa_lib.F90 pb_init.F90 density.F90 np_force.F90 pb_force.F90 +- pb_p3m.F90 pb_fdfrc.F90 pb_crgview.F90 pb_fddrv.F90 pb_iimdrv.F90 pb_anaiim.F90 pb_nlsolver.F90 ++ pb_p3m.F90 pb_fdfrc.F90 pb_crgview.F90 pb_fddrv.F90 pb_anaiim.F90 pb_nhadrv.F90 pb_iimdrv.F90 pb_augdrv.F90 pb_nlsolver.F90 + pb_bldsys.F90 pb_mpfrc.F90 pb_direct.F90 pb_list.F90 timer.F90 + egb.F90 ene.F90 locmem.F90 myopen.F90 rdparm.F90 pb_lsolver.F90 + decomp.F90 rgroup.F90 rfree.F90 debug.F90 + irre32.F90 phidev.F90 project.F90 qld.F90 + irre31.F90 miniop.F90 + transf.F90 curv.F90 GrToPr.F90 jumps.F90 +- regular.F90 gmres.F90 sa_driver.F90 +- daxpy.F90 ddot.F90 dheqr.F90 dpigmr.F90 dscal.F90 dslui2.F90 dxlcal.F90 +- dchkw.F90 dgmres.F90 dnrm2.F90 drlcal.F90 dsilus.F90 dslui.F90 isdgmr.F90 +- dcopy.F90 dhels.F90 dorth.F90 ds2y.F90 dslugm.F90 dsmv.F90 qs2i1d.F90 +- d1mach.F90 fdump.F90 i1mach.F90 j4save.F90 xercnt.F90 xerhlt.F90 xermsg.F90 +- xerprn.F90 xersve.F90 xgetua.F90 +- bicg.F90 dbcg.F90 dslui4.F90 dsluti.F90 dsmtv.F90 dslubc.F90 isdbcg.F90 ++ regular.F90 bicg.F90 gmres.F90 sa_driver.F90 ++ daxpy.F90 ddot.F90 dheqr.F90 dpigmr.F90 dxlcal.F90 ++ dchkw.F90 dgmres.F90 dnrm2.F90 drlcal.F90 isdgmr.F90 ++ dcopy.F90 dhels.F90 dorth.F90 ++ ds2y.F90 dscal.F90 dsilus.F90 dslugm.F90 dslui.F90 dslui2.F90 dsmv.F90 qs2i1d.F90 ++ d1mach.F90 fdump.F90 i1mach.F90 j4save.F90 xercnt.F90 xerhlt.F90 xermsg.F90 ++ xerprn.F90 xersve.F90 xgetua.F90 + pb_chkfrc.F90 svdcmp.F90 svbksb.F90 pythag.F90 +- pb_augdrv.F90 interpX.F90 gen_dx_file.F90 ++ interpX.F90 gen_dx_file.F90 + parms.F90 memory_module.F90 rdpqr.F90) + + #sources for libpbsa +@@ -42,8 +42,8 @@ set(SANDER_PBSA_SOURCES interpX.F90 np_force.F90 pb_fdfrc.F90 pb_force.F90 pb_i + svbksb.F90 svdcmp.F90 transf.F90) + + # sources or libpbsa_cuda +-set(PBSA_CUDA_CUDA_SOURCES cuda_cg_wrapper.cu cuda_mg_wrapper.cu) +-set(PBSA_CUDA_CXX_SOURCES band2csr.cpp) ++set(PBSA_CUDA_CUDA_SOURCES cusp_LinearSolvers.cu cusparse_LinearSolvers.cu cuda_pb.cu kLinearSolvers.cu cuda_LinearSolvers.cu) ++set(PBSA_CUDA_CXX_SOURCES ) + + #------------------------------------------------------------------------------------------ + +@@ -133,7 +133,7 @@ if(CUDA) + -DCUDA_MG) # [DCUDA_MG, NULL - for other CUDA solvers] + + cuda_add_executable(pbsa.cuda ${EXECUTABLE_SOURCES} ${PBSA_CUDA_CUDA_SOURCES} ${PBSA_CUDA_CXX_SOURCES} OPTIONS ${PBSA_CUDA_DEFINITIONS}) +- target_link_libraries(pbsa.cuda cublas netlib amber_common netcdff netcdf) ++ target_link_libraries(pbsa.cuda cublas cusparse netlib amber_common netcdff netcdf) + + config_module_dirs(pbsa.cuda ${PBSAEXE_MOD_DIR} ${AMBER_COMMON_MOD_DIR}) + +@@ -141,7 +141,7 @@ if(CUDA) + target_compile_definitions(pbsa.cuda PRIVATE CUDA) + + # it seems like CMake sometimes gets confused about which compiler to use for linking +- set_property(TARGET pbsa.cuda PROPERTY LINKER_LANGUAGE Fortran) ++ set_property(TARGET pbsa.cuda PROPERTY LINKER_LANGUAGE CXX) + + install(TARGETS pbsa.cuda DESTINATION ${BINDIR} COMPONENT CUDA) + endif() +diff --git a/AmberTools/src/rism/CMakeLists.txt b/AmberTools/src/rism/CMakeLists.txt +index 028d71cb4f..6838075447 100644 +--- a/AmberTools/src/rism/CMakeLists.txt ++++ b/AmberTools/src/rism/CMakeLists.txt +@@ -47,6 +47,20 @@ set(RISM_INTERFACE_SOURCES amber_rism_interface.F90) + + apply_optimization_declarations(${RISM_LIB_SOURCES} ${RISM_MPI_SOURCES} ${RISM_THERMO_SOURCES} ${RISM_INTERFACE_SOURCES}) + ++#--------------------------------------------------------------------------------------------------------------------------------------------------------------------- ++ ++flex_target(rism_options_lex rism_options.l lex.rism.c) ++ ++add_custom_target(rism_lex ALL DEPENDS lex.rism.c) #give CMake a reason to do the lexing ++ ++#--------------------------------------------------------------------------------------------------------------------------------------------------------------------- ++ ++# detect missing getline() and fix it ++check_all_functions(getline) ++ ++if(NOT HAVE_GETLINE) ++ list(APPEND SINGLE_POINT_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/getline/getline.c) ++endif() + + #--------------------------------------------------------------------------------------------------------------------------------------------------------------------- + +@@ -76,10 +90,17 @@ make_pic_if_needed(sff_rism_interface) + + # rism3d.snglpnt + add_executable(rism3d.snglpnt ${SINGLE_POINT_SOURCES}) ++add_dependencies(rism3d.snglpnt rism_lex) # make sure lexing is done first + set_property(TARGET rism3d.snglpnt PROPERTY COMPILE_OPTIONS ${OPT_CFLAGS}) + target_link_libraries(rism3d.snglpnt sff rism fftw netlib amber_common xblas) + install(TARGETS rism3d.snglpnt DESTINATION ${BINDIR}) + ++if(NOT HAVE_GETLINE) ++ target_include_directories(rism3d.snglpnt PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/getline) ++ target_compile_definitions(rism3d.snglpnt PRIVATE USE_INTERNAL_GETLINE) ++ ++endif() ++ + #rism 1D executable + add_executable(rism1d ${RISM1D_SOURCES}) + config_module_dirs(rism1d ${RISM1D_MOD_DIR} ${RISMLIB_MOD_DIR} ${AMBER_COMMON_MOD_DIR}) +diff --git a/AmberTools/src/rism/getline/getline.c b/AmberTools/src/rism/getline/getline.c +new file mode 100644 +index 0000000000..73b320ed6d +--- /dev/null ++++ b/AmberTools/src/rism/getline/getline.c +@@ -0,0 +1,55 @@ ++/* This code is public domain -- Will Hartung 4/9/09 */ ++#include "getline.h" ++ ++ssize_t getline(char **lineptr, size_t *n, FILE *stream) ++{ ++ char *bufptr = NULL; ++ char *p = bufptr; ++ size_t size; ++ int c; ++ ++ if (lineptr == NULL) { ++ return -1; ++ } ++ if (stream == NULL) { ++ return -1; ++ } ++ if (n == NULL) { ++ return -1; ++ } ++ bufptr = *lineptr; ++ size = *n; ++ ++ c = fgetc(stream); ++ if (c == EOF) { ++ return -1; ++ } ++ if (bufptr == NULL) { ++ bufptr = malloc(128); ++ if (bufptr == NULL) { ++ return -1; ++ } ++ size = 128; ++ } ++ p = bufptr; ++ while(c != EOF) { ++ if ((p - bufptr + 1) > size) { ++ size = size + 128; ++ bufptr = realloc(bufptr, size); ++ if (bufptr == NULL) { ++ return -1; ++ } ++ } ++ *p++ = c; ++ if (c == '\n') { ++ break; ++ } ++ c = fgetc(stream); ++ } ++ ++ *p++ = '\0'; ++ *lineptr = bufptr; ++ *n = size; ++ ++ return p - bufptr - 1; ++} +diff --git a/AmberTools/src/rism/getline/getline.h b/AmberTools/src/rism/getline/getline.h +new file mode 100644 +index 0000000000..9c10d4fcff +--- /dev/null ++++ b/AmberTools/src/rism/getline/getline.h +@@ -0,0 +1,6 @@ ++#include ++#include ++ ++// Amber's portable getline() for systems that lack it ++ ++ssize_t getline(char **lineptr, size_t *n, FILE *stream); +diff --git a/AmberTools/src/rism/rism3d.snglpnt.c b/AmberTools/src/rism/rism3d.snglpnt.c +index 1167aead94..b98abe9228 100644 +--- a/AmberTools/src/rism/rism3d.snglpnt.c ++++ b/AmberTools/src/rism/rism3d.snglpnt.c +@@ -17,6 +17,10 @@ + #include "../sff/sff.h" + #include "../sff/timer.h" + ++#ifdef USE_INTERNAL_GETLINE ++#include ++#endif ++ + #ifdef MPI + int mpierror(int); + int mpifinalize(void); +diff --git a/AmberTools/src/sff/CMakeLists.txt b/AmberTools/src/sff/CMakeLists.txt +index b2f21d1b94..6bad31cb89 100644 +--- a/AmberTools/src/sff/CMakeLists.txt ++++ b/AmberTools/src/sff/CMakeLists.txt +@@ -26,9 +26,9 @@ set(LEXED_FILES_DIR "${CMAKE_BINARY_DIR}/AmberTools/src/sff") + set(LEX_INTERMEDIATES_DIR "${LEXED_FILES_DIR}/intermediates") + file(MAKE_DIRECTORY ${LEX_INTERMEDIATES_DIR}) + +-set(INTERMEDIATE_LEXED_FILE "${LEX_INTERMEDIATES_DIR}/yy.mm_options.c") ++set(INTERMEDIATE_LEXED_FILE "${LEX_INTERMEDIATES_DIR}/yy.mmo.c") + +-set(FINAL_LEXED_FILE "${LEXED_FILES_DIR}/lex.mm_options.c") ++set(FINAL_LEXED_FILE "${LEXED_FILES_DIR}/lex.mmo.c") + + flex_target(mm_options_lex mm_options.l ${INTERMEDIATE_LEXED_FILE} COMPILE_FLAGS -Pmmo) + +@@ -75,8 +75,6 @@ add_dependencies(sff sff_lex) + make_pic_if_needed(sff) + target_include_directories(sff INTERFACE .) + +- +- + #these files have alternate code (enabled with the SQM flag) for SANDER and SQM. + add_library(sff_fortran ${SFF_FORTRAN_C_SOURCES} $) + set_property(TARGET sff_fortran PROPERTY COMPILE_DEFINITIONS SQM) +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ec8a7d225b..0a26e6bc6c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -76,9 +76,6 @@ if(BUILD_HOST_TOOLS) #include only the couple of files needed for building the h + + include(AmberBuildSystem2ndInit) + +- # code for using built-in tools +- include(byacc) +- + include(CppVectorGen) + include(ExternalPrograms) + +@@ -98,8 +95,8 @@ if(BUILD_HOST_TOOLS) #include only the couple of files needed for building the h + set(BUNDLE_SIGNATURE AMHT) + include(Packaging) + +- # Tools we need to build: ucpp, byacc, rule_parse, nab2c, and utilMakeHelp +- set(AMBER_TOOLS ucpp-1.3 byacc nab leap) ++ # Tools we need to build: ucpp, rule_parse, nab2c, and utilMakeHelp ++ set(AMBER_TOOLS ucpp-1.3 nab leap) + + else() #include all configuration segments + +@@ -112,7 +109,6 @@ else() #include all configuration segments + include(AmberBuildSystem2ndInit) + + # code for using built-in tools +- include(byacc) + include(nab) + + #configuration code +@@ -130,7 +126,7 @@ else() #include all configuration segments + + # 3rd party tools + # -------------------------------------------------------------------- +- set(REQUIRED_3RDPARTY_TOOLS ucpp byacc netcdf netcdf-fortran xblas zlib) ++ set(REQUIRED_3RDPARTY_TOOLS ucpp netcdf netcdf-fortran xblas zlib) + if(USE_FFT) + list(APPEND REQUIRED_3RDPARTY_TOOLS fftw) + endif() +@@ -138,7 +134,7 @@ else() #include all configuration segments + # whether blas and lapack are required + set(LINALG_LIBS_REQUIRED TRUE) + # programs where INTERNAL is a valid status +- set(BUNDLED_3RDPARTY_TOOLS blas lapack arpack byacc ucpp c9x-complex netcdf netcdf-fortran pnetcdf fftw readline xblas mpi4py perlmol) ++ set(BUNDLED_3RDPARTY_TOOLS blas lapack arpack ucpp c9x-complex netcdf netcdf-fortran pnetcdf fftw readline xblas mpi4py perlmol) + include(3rdPartyTools) + + # -------------------------------------------------------------------- +diff --git a/cmake/3rdPartyTools.cmake b/cmake/3rdPartyTools.cmake +index fd6b060927..5ee0671364 100644 +--- a/cmake/3rdPartyTools.cmake ++++ b/cmake/3rdPartyTools.cmake +@@ -9,7 +9,6 @@ set(3RDPARTY_TOOLS + blas + lapack + arpack +-byacc + ucpp + c9x-complex + netcdf +@@ -34,7 +33,6 @@ set(3RDPARTY_TOOL_USES + "for fundamental linear algebra calculations" + "for fundamental linear algebra calculations" + "for fundamental linear algebra calculations" +-"for compiling Amber's yacc parsers" + "used as a preprocessor for the NAB compiler" + "used as a support library on systems that do not have C99 complex.h support" + "for creating trajectory data files" +@@ -161,20 +159,6 @@ if(NEED_ucpp) + endif() + endif() + +-#------------------------------------------------------------------------------ +-# check for byacc +-# Amber needs Berkeley YACC. It will NOT build with GNU bison. +-#------------------------------------------------------------------------------ +-if(NEED_byacc) +- find_program(BYACC_LOCATION byacc DOC "Path to a Berkeley YACC. GNU Bison will NOT work.") +- +- if(${BYACC_LOCATION}) +- set_3rdparty(byacc EXTERNAL) +- else() +- set_3rdparty(byacc INTERNAL) +- endif() +-endif() +- + #------------------------------------------------------------------------------ + # Readline + #------------------------------------------------------------------------------ +@@ -688,15 +672,6 @@ elseif(ucpp_INTERNAL) + list(APPEND 3RDPARTY_SUBDIRS ucpp-1.3) + endif() + +-#------------------------------------------------------------------------------ +-# byacc +-#------------------------------------------------------------------------------ +-if(byacc_EXTERNAL) +- import_executable(byacc ${UCPP_LOCATION}) +-elseif(byacc_INTERNAL) +- list(APPEND 3RDPARTY_SUBDIRS byacc) +-endif() +- + #------------------------------------------------------------------------------ + # Readline + #------------------------------------------------------------------------------ +@@ -793,7 +768,7 @@ elseif(netcdf_INTERNAL) + On cray systems you can usually load the system NetCDF with 'module load cray-netcdf' or 'module load netcdf'.") + endif() + +- list(APPEND 3RDPARTY_SUBDIRS netcdf-4.3.0) ++ list(APPEND 3RDPARTY_SUBDIRS netcdf-4.6.1) + endif() + + if(netcdf-fortran_EXTERNAL) +diff --git a/cmake/AmberBuildSystemInit.cmake b/cmake/AmberBuildSystemInit.cmake +index ebd71a869b..5f13a68cc8 100644 +--- a/cmake/AmberBuildSystemInit.cmake ++++ b/cmake/AmberBuildSystemInit.cmake +@@ -56,7 +56,7 @@ include(CMakeParseArguments) + include(Utils) + include(Shorthand) + include(ColorMessage) +-include(Policies) ++include(Policies NO_POLICY_SCOPE) + + # get install directories + include(InstallDirs) +diff --git a/cmake/CompilerFlags.cmake b/cmake/CompilerFlags.cmake +index 914eddbbb7..1a49da16a3 100644 +--- a/cmake/CompilerFlags.cmake ++++ b/cmake/CompilerFlags.cmake +@@ -289,6 +289,11 @@ if("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "Intel") + set(CMAKE_Fortran_FLAGS_DEBUG "-g -debug all") + + set(OPT_FFLAGS -ip -O3) ++ ++ if("${CMAKE_Fortran_COMPILER_VERSION}" VERSION_EQUAL 18) ++ message(WARNING "Significant test failures were experienced with 2018 versions of Intel compilers! Workarounds for these known problems have been implemented. \ ++However, we do not recommend building Amber with icc version 18. Versions 19, 17, and 16 are much more stable.") ++ endif() + + if(SSE) + +diff --git a/cmake/CudaConfig.cmake b/cmake/CudaConfig.cmake +index 6ae0a65eb2..e091f86c2c 100644 +--- a/cmake/CudaConfig.cmake ++++ b/cmake/CudaConfig.cmake +@@ -19,15 +19,10 @@ else() + + set(CUDA_HOST_COMPILER ${CMAKE_CXX_COMPILER}) + +- option(VOLTA "Build the CUDA version of pmemd with special optimizations for the Volta architecture (this will be deprecated as the optimizations become standardized in a later release)" FALSE) +- if(VOLTA AND (${CUDA_VERSION} VERSION_LESS 9.0)) +- message(FATAL_ERROR "Volta optimizations cannot be built with this CUDA version. Please disable the VOLTA option, or upgrade CUDA.") +- endif() +- + #Note at present we do not include SM3.5 or SM3.7 since they sometimes show performance + #regressions over just using SM3.0. + #SM7.0 = V100 and Volta Geforce / GTX Ampere? +- set(SM70FLAGS -gencode arch=compute_60,code=sm_70) ++ set(SM70FLAGS -gencode arch=compute_70,code=sm_70) + #SM6.2 = ??? + set(SM62FLAGS -gencode arch=compute_62,code=sm_62) + #SM6.1 = GP106 = GTX-1070, GP104 = GTX-1080, GP102 = Titan-X[P] +@@ -56,21 +51,14 @@ else() + + elseif(${CUDA_VERSION} VERSION_EQUAL 8.0) + message(STATUS "Configuring CUDA for SM3.0, SM5.0, SM5.2, SM5.3, SM6.0, SM6.1 and SM6.2") +- message(STATUS "BE AWARE: CUDA 8.0 does not support V100, Volta Gefore / GTX Ampere? or other Volta based GPUs.") ++ message(STATUS "BE AWARE: CUDA 8.0 does not support V100, GV100, Titan-V or later GPUs") + list(APPEND CUDA_NVCC_FLAGS ${SM30FLAGS} ${SM50FLAGS} ${SM52FLAGS} ${SM53FLAGS} ${SM60FLAGS} ${SM61FLAGS} -Wno-deprecated-gpu-targets) + +- elseif((${CUDA_VERSION} VERSION_EQUAL 9.0) OR (${CUDA_VERSION} VERSION_EQUAL 9.1)) +- +- if(VOLTA) +- message(STATUS "Configuring for SM7.0 only with special optimizations") +- list(APPEND CUDA_NVCC_FLAGS ${SM70FLAGS} -DVOLTAOPT) +- else() +- message(STATUS "Configuring CUDA for SM3.0, SM5.0, SM5.2, SM5.3, SM6.0, SM6.1, and SM7.0") +- list(APPEND CUDA_NVCC_FLAGS ${SM30FLAGS} ${SM50FLAGS} ${SM52FLAGS} ${SM53FLAGS} ${SM60FLAGS} ${SM61FLAGS} ${SM70FLAGS} -Wno-deprecated-gpu-targets) +- endif() +- ++ elseif(((${CUDA_VERSION} VERSION_EQUAL 9.0) OR (${CUDA_VERSION} VERSION_GREATER 9.0)) AND (${CUDA_VERSION} VERSION_EQUAL 10.2 OR ${CUDA_VERSION} VERSION_LESS 10.2)) ++ message(STATUS "Configuring for SM3.0, SM3.5, SM3.7, SM5.0, SM5.2, SM5.3, SM6.0, SM6.1 and SM7.0") ++ list(APPEND CUDA_NVCC_FLAGS ${SM30FLAGS} ${SM50FLAGS} ${SM52FLAGS} ${SM53FLAGS} ${SM60FLAGS} ${SM61FLAGS} ${SM70FLAGS} -Wno-deprecated-gpu-targets -Wno-deprecated-declarations) + else() +- message(FATAL_ERROR "Error: Unsupported CUDA version. AMBER requires CUDA version >= 7.5. ++ message(FATAL_ERROR "Error: Unsupported CUDA version. AMBER requires CUDA version >= 7.5 and <= 10.2. + Please upgrade your CUDA installation or disable building with CUDA.") + endif() + +@@ -85,6 +73,7 @@ else() + import_libraries(cufft LIBRARIES ${CUDA_CUFFT_LIBRARIES}) + + import_library(curand ${CUDA_curand_LIBRARY}) ++ import_library(cusparse ${CUDA_cusparse_LIBRARY}) + + # Before CMake 3.7, FindCUDA did not automatically link libcudadevrt, as is required for seperable compilation. + # Finder code copied from here: https://github.com/Kitware/CMake/commit/891e0ebdcea547b10689eee9fd008a27e4afd3b9 +diff --git a/cmake/ExternalPrograms.cmake b/cmake/ExternalPrograms.cmake +index 5ee53798be..52038903f5 100644 +--- a/cmake/ExternalPrograms.cmake ++++ b/cmake/ExternalPrograms.cmake +@@ -17,6 +17,11 @@ find_program(M4 m4) + #------------------------------------------------------------------------------ + find_package(FLEX REQUIRED) + ++#------------------------------------------------------------------------------ ++# Bison ++#------------------------------------------------------------------------------ ++find_package(BISON REQUIRED) ++ + #------------------------------------------------------------------------------ + # bash, for running shell scripts + #------------------------------------------------------------------------------ +diff --git a/cmake/FixCondaShebang/CMakeLists.txt b/cmake/FixCondaShebang/CMakeLists.txt +index 32a2a7fbc7..83ff55672c 100644 +--- a/cmake/FixCondaShebang/CMakeLists.txt ++++ b/cmake/FixCondaShebang/CMakeLists.txt +@@ -2,7 +2,7 @@ + + # The Miniconda shebang fixer script neds to run after all other install rules. + # Unfortuantely, CMake does not have any way to make a custom install rule be installed after subdirectories. +-# So, this is a dummy subdirectory for CMake to process as the last to-level subdirectory. ++# So, this is a dummy subdirectory for CMake to process as the last top-level subdirectory. + + # All we have to do is + # create an install rule to invoke FixCondaShebang.cmake +diff --git a/cmake/PMEMDCompilerFlags.cmake b/cmake/PMEMDCompilerFlags.cmake +index 9d9fa81f08..7c24005b79 100644 +--- a/cmake/PMEMDCompilerFlags.cmake ++++ b/cmake/PMEMDCompilerFlags.cmake +@@ -40,7 +40,7 @@ set(EMIL_MIC_FLAGS "") + # and a new pmemd. executable will be created + #------------------------------------------------------------------------------- + +-set(PMEMD_CUDA_PRECISIONS SPFP DPFP SPXP) ++set(PMEMD_CUDA_PRECISIONS SPFP DPFP) + + #precision of pmemd which gets installed as pmemd.cuda + set(PMEMD_DEFAULT_PRECISION SPFP) +diff --git a/cmake/PythonInterpreterConfig.cmake b/cmake/PythonInterpreterConfig.cmake +index 57843ab1bf..be5c725a27 100644 +--- a/cmake/PythonInterpreterConfig.cmake ++++ b/cmake/PythonInterpreterConfig.cmake +@@ -50,7 +50,7 @@ if(DOWNLOAD_MINICONDA) + unset(ENV{_CONDA_PYTHON2}) + endif() + +- set(MINICONDA_VERSION 4.3.21) ++ set(MINICONDA_VERSION 4.5.11) + option(MINICONDA_USE_PY3 "If true, Amber will download a Python 3 miniconda when DOWNLOAD_MINICONDA is enabled. Otherwise, Python 2.7 Miniconda will get downloaded." FALSE) + + include(UseMiniconda) +diff --git a/cmake/Replace.cmake b/cmake/Replace.cmake +index 64122f9167..0f52af02e1 100644 +--- a/cmake/Replace.cmake ++++ b/cmake/Replace.cmake +@@ -37,6 +37,7 @@ function(buildtime_file_replace INPUTFILE OUTPUTFILE) + add_custom_command( + OUTPUT ${OUTPUTFILE} + COMMAND ${CMAKE_COMMAND} -DTO_REPLACE=${REPLACE_TO_REPLACE} -DREPLACEMENT=${REPLACE_REPLACEMENT} -DINPUTFILE=${INPUTFILE} -DOUTPUTFILE=${OUTPUTFILE} -P ${CMAKE_SOURCE_DIR}/cmake/Replace-runtime.cmake VERBATIM ++ COMMENT "Processing ${INPUTFILE} to ${OUTPUTFILE}" + DEPENDS ${INPUTFILE}) + + +diff --git a/cmake/RunnablePrograms.cmake b/cmake/RunnablePrograms.cmake +index 6fea4aa610..436494236a 100644 +--- a/cmake/RunnablePrograms.cmake ++++ b/cmake/RunnablePrograms.cmake +@@ -3,7 +3,7 @@ + + # Must be included after MPIConfig + +-set(EXECUTABLES_TO_IMPORT byacc ucpp utilMakeHelp nab2c mpinab2c rule_parse) ++set(EXECUTABLES_TO_IMPORT ucpp utilMakeHelp nab2c mpinab2c rule_parse) + + set(EXECUTABLES_TO_IMPORT_REQUIRED TRUE TRUE TRUE TRUE ${MPI} TRUE) # true if the corresponding executable is needed to build Amber + +diff --git a/cmake/UseMiniconda.cmake b/cmake/UseMiniconda.cmake +index 73e9989ff2..fe10b0bec5 100644 +--- a/cmake/UseMiniconda.cmake ++++ b/cmake/UseMiniconda.cmake +@@ -154,7 +154,7 @@ function(download_and_use_miniconda) + execute_process(COMMAND ${CONDA} install -y nomkl) + endif() + +- execute_process(COMMAND ${CONDA} install -y conda-build numpy scipy cython=0.25 ipython notebook pytest RESULT_VARIABLE PACKAGE_INSTALL_RETVAL) ++ execute_process(COMMAND ${CONDA} install -y -q conda-build numpy scipy cython=0.25 ipython notebook pytest RESULT_VARIABLE PACKAGE_INSTALL_RETVAL) + if(NOT ${PACKAGE_INSTALL_RETVAL} EQUAL 0) + message(FATAL_ERROR "Installation of packages failed! Please fix what's wrong, or disable Miniconda.") + endif() +diff --git a/cmake/byacc.cmake b/cmake/byacc.cmake +deleted file mode 100644 +index 28db4230ca..0000000000 +--- a/cmake/byacc.cmake ++++ /dev/null +@@ -1,61 +0,0 @@ +-#Modified version of BISON_TARGET (from FindBison) which uses AMBER's in-tree byacc +-#some yacc programs in AMBER use syntax that won't compile with GNU bison, so we have to use byacc. Believe me, I've tried. +- +-#usage: byacc_target( [GENERATE_HEADER] [COMPILE_FLAGS ] [FILE_PREFIX ]) +-#always generates the ${FILE_PREFIX}.tab.c (and possibly ${FILE_PREFIX}.tab.h) in the output directory +-#input file is relative to the current source directory +- +-#GENERATE_HEADER: also generate ${FILE_PREFIX}.tab.h +- +-#Targets created by this macro work with add_flex_bison_dependency() +- +-macro(byacc_target NAME INPUT OUTPUT_DIR) +- set(BYACC_TARGET_output_header "") +- set(BYACC_TARGET_cmdopt "") +- +- cmake_parse_arguments( +- BYACC_TARGET_ARG +- GENERATE_HEADER +- FILE_PREFIX +- COMPILE_FLAGS +- ${ARGN}) +- +- if(NOT "${BYACC_TARGET_ARG_UNPARSED_ARGUMENTS}" STREQUAL "") +- message(SEND_ERROR "Incorrect Usage") +- else() +- +- if(NOT "${BYACC_TARGET_ARG_COMPILE_FLAGS}" STREQUAL "") +- list(APPEND BYACC_TARGET_cmdopt ${BYACC_TARGET_ARG_COMPILE_FLAGS}) +- endif() +- +- if("${BYACC_TARGET_ARG_FILE_PREFIX}" STREQUAL "") +- set(BYACC_TARGET_ARG_FILE_PREFIX y) +- else() +- list(APPEND BYACC_TARGET_cmdopt -b ${BYACC_TARGET_ARG_FILE_PREFIX}) +- endif() +- +- set(BYACC_TARGET_outputs ${OUTPUT_DIR}/${BYACC_TARGET_ARG_FILE_PREFIX}.tab.c) +- +- if(${BYACC_TARGET_ARG_GENERATE_HEADER}) +- list(APPEND BYACC_TARGET_cmdopt -d) +- list(APPEND BYACC_TARGET_outputs ${OUTPUT_DIR}/${BYACC_TARGET_ARG_FILE_PREFIX}.tab.h) +- endif() +- +- add_custom_command(OUTPUT ${BYACC_TARGET_outputs} +- COMMAND ${RUNNABLE_byacc} ${BYACC_TARGET_cmdopt} ${CMAKE_CURRENT_SOURCE_DIR}/${INPUT} +- VERBATIM +- DEPENDS ${INPUT} +- COMMENT "[BYACC][${NAME}] Building parser with berkeley yacc" +- WORKING_DIRECTORY ${OUTPUT_DIR}) +- +- # define target variables +- # use "BISON" for compatibility with bison_target +- set(BISON_${NAME}_DEFINED TRUE) +- set(BISON_${NAME}_INPUT ${INPUT}) +- set(BISON_${NAME}_OUTPUTS ${BYACC_TARGET_outputs}) +- set(BISON_${NAME}_COMPILE_FLAGS ${BYACC_TARGET_cmdopt}) +- set(BISON_${NAME}_OUTPUT_SOURCE ${OUTPUT_DIR}/${BYACC_TARGET_ARG_FILE_PREFIX}.tab.c) +- set(BISON_${NAME}_OUTPUT_HEADER ${OUTPUT_DIR}/${BYACC_TARGET_ARG_FILE_PREFIX}.tab.h) +- +- endif() +-endmacro() diff --git a/recipe/patches/configure.patch b/recipe/patches/configure.patch deleted file mode 100644 index 54a761b2..00000000 --- a/recipe/patches/configure.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 7330111e04424b1fd185b7375a71912a11e58a99 Mon Sep 17 00:00:00 2001 -From: Simon Bray -Date: Sat, 19 Oct 2019 12:36:42 +0200 -Subject: [PATCH 1/2] r - ---- - amber18/AmberTools/src/configure2 | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/amber18/AmberTools/src/configure2 b/amber18/AmberTools/src/configure2 -index 797380b..32470b5 100644 ---- a/amber18/AmberTools/src/configure2 -+++ b/amber18/AmberTools/src/configure2 -@@ -469,7 +469,7 @@ installtype='serial' - intel_compiler_flag_mkl='no' - intelmpi='no' - is_mac='no' --ldflags='' -+ldflags=$LDFLAGS - ld='ld ' - lfs='yes' - lm='-lm' --- -2.17.1 - - -From a8ba9ba188d5a5574c2d9b6e0a37463cf874a3b0 Mon Sep 17 00:00:00 2001 -From: Simon Bray -Date: Sat, 19 Oct 2019 13:19:28 +0200 -Subject: [PATCH 2/2] q - ---- - amber18/AmberTools/src/configure2 | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/amber18/AmberTools/src/configure2 b/amber18/AmberTools/src/configure2 -index 32470b5..3ed06f8 100644 ---- a/amber18/AmberTools/src/configure2 -+++ b/amber18/AmberTools/src/configure2 -@@ -408,11 +408,11 @@ EOF - - # Test for the presence of /bin/csh, since it's needed for installation - --if [ ! -x /bin/csh ]; then -- echo "Error: /bin/csh not found on your system! Install csh or tcsh and rerun" -- echo " configure." -- exit 1 --fi -+# if [ ! -x /bin/csh ]; then -+# echo "Error: /bin/csh not found on your system! Install csh or tcsh and rerun" -+# echo " configure." -+# exit 1 -+#fi - - #------------------------------------------------------------------------------ - # Process commandline configuration options: --- -2.17.1 diff --git a/recipe/patches/do_not_build_arpack.patch b/recipe/patches/do_not_build_arpack.patch deleted file mode 100644 index c11b47b7..00000000 --- a/recipe/patches/do_not_build_arpack.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/AmberTools/src/arpack/Makefile b/AmberTools/src/arpack/Makefile -index fb571b33..3b9ddc1b 100644 ---- a/AmberTools/src/arpack/Makefile -+++ b/AmberTools/src/arpack/Makefile -@@ -11,7 +11,8 @@ include ../config.h - @echo "[ARPACK] CC $<" - $(VB)$(CC) -c $(COPTFLAGS) $(CFLAGS) -o $@ $< - --install: $(LIBDIR)/libarpack.a -+install: -+ @echo "[ARPACK] Skipping compilation..." - - ARPACKLIB= ivout.o dvout.o dgetv0.o dlaqrb.o dnaitr.o dnapps.o \ - dnaup2.o dnaupd.o dnconv.o dneigh.o dmout.o \ diff --git a/recipe/patches/do_not_build_boost.patch b/recipe/patches/do_not_build_boost.patch deleted file mode 100644 index e68b5c61..00000000 --- a/recipe/patches/do_not_build_boost.patch +++ /dev/null @@ -1,68 +0,0 @@ -diff --git a/AmberTools/src/configure2 b/AmberTools/src/configure2 -index 797380b5..ed58f8e2 100755 ---- a/AmberTools/src/configure2 -+++ b/AmberTools/src/configure2 -@@ -3155,34 +3155,35 @@ fi - #-------------------------------------------------------------------------- - # Configure boost - #-------------------------------------------------------------------------- --if [ "$cuda" = "no" ]; then -- printf "\nConfiguring boost (may be time-consuming)..." -- cd boost -- ./bootstrap.sh --prefix=$amberprefix > ../boost_config.log -- ncerror=$? -- if [ $ncerror -gt 0 ]; then -- printf "\nError: Boost bootstrap returned $ncerror\n" -- printf " Check $AMBEHROME/src/boost_config.log\n" -- printf " memembed and moft will not be built\n" -- memembed='' -- else -- printf "OK\n" -- printf "Compiling boost (may be time-consuming)..." -- ./b2 --with-program_options --with-iostreams --with-regex \ -- --with-system --with-timer --with-chrono --with-filesystem \ -- --with-graph --with-thread link=static install >> ../boost_config.log -- if [ $? -ne 0 ]; then -- printf "\nError: Boost compile failed.\n" -- printf " Check $AMBERHOME/src/boost_config.log\n" -- printf " memembed and moft will not be built\n" -- memembed='' -- else -- printf "OK\n" -- memembed='yes' -- fi -- fi -- cd .. --fi -+# if [ "$cuda" = "no" ]; then -+# printf "\nConfiguring boost (may be time-consuming)..." -+# cd boost -+# ./bootstrap.sh --prefix=$amberprefix --with-toolset=gcc > ../boost_config.log -+# ncerror=$? -+# if [ $ncerror -gt 0 ]; then -+# printf "\nError: Boost bootstrap returned $ncerror\n" -+# printf " Check $AMBEHROME/src/boost_config.log\n" -+# printf " memembed and moft will not be built\n" -+# memembed='' -+# else -+# printf "OK\n" -+# printf "Compiling boost (may be time-consuming)..." -+# ./b2 --with-program_options --with-iostreams --with-regex \ -+# --with-system --with-timer --with-chrono --with-filesystem \ -+# --with-graph --with-thread link=static install >> ../boost_config.log -+# if [ $? -ne 0 ]; then -+# printf "\nError: Boost compile failed.\n" -+# printf " Check $AMBERHOME/src/boost_config.log\n" -+# printf " memembed and moft will not be built\n" -+# memembed='' -+# else -+# printf "OK\n" -+# memembed='yes' -+# fi -+# fi -+# cd .. -+# fi -+memembed='yes' - - #-------------------------------------------------------------------------- - # Configure XBLAS diff --git a/recipe/patches/fix_memembed_includes.patch b/recipe/patches/fix_memembed_includes.patch deleted file mode 100644 index c606690a..00000000 --- a/recipe/patches/fix_memembed_includes.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/AmberTools/src/packmol_memgen/packmol_memgen/lib/memembed/Makefile b/AmberTools/src/packmol_memgen/packmol_memgen/lib/memembed/Makefile -index 70503b0b..994df994 100644 ---- a/AmberTools/src/packmol_memgen/packmol_memgen/lib/memembed/Makefile -+++ b/AmberTools/src/packmol_memgen/packmol_memgen/lib/memembed/Makefile -@@ -9,8 +9,8 @@ ifndef AMBER_SOURCE - INC = -Isrc - LIBS = -lboost_thread -lboost_system -lpthread - else --INC = -Isrc -I$(INCDIR) --LIBS = -L$(LIBDIR) -lboost_thread -lboost_system -lpthread -+INC = -Isrc -I$(CONDA_PREFIX)/include -I$(INCDIR) -+LIBS = -L$(CONDA_PREFIX)/lib -L$(LIBDIR) -lboost_thread -lboost_system -lpthread - endif - - all: memembed From 53e438e24c9db24a2d31277be6f4c648c95cf72a Mon Sep 17 00:00:00 2001 From: Jaime RGP Date: Mon, 6 Jan 2020 20:38:29 +0100 Subject: [PATCH 34/52] Patch manually to debug --- recipe/build.sh | 5 ++++- recipe/meta.yaml | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/recipe/build.sh b/recipe/build.sh index b5d61930..393a7a6f 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -7,7 +7,10 @@ for n in {1..5}; do ./update_amber --update-to=AmberTools.${PATCH_LEVEL} && break done -# Build AmberTools without further patching +# Patch manually +patch --verbose -p1 --ignore-whitespace -t -i ${RECIPE_DIR}/patches/amber19-fix-cmake.patch + +# Build AmberTools with cmake mkdir build cd build cmake ${SRC_DIR} \ diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 906fe95b..15fc61f1 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -10,8 +10,8 @@ package: source: url: https://ambermd.org/downloads/AmberTools19.tar.bz2 sha256: 0c86937904854b64e4831e047851f504ec45b42e593db4ded92c1bee5973e699 - patches: - - patches/amber19-fix-cmake.patch + # patches: + # - patches/amber19-fix-cmake.patch build: number: 1 From 63c64b9ca5966ff0f83392b1e3d11bc80b08c115 Mon Sep 17 00:00:00 2001 From: Jaime RGP Date: Mon, 6 Jan 2020 20:59:31 +0100 Subject: [PATCH 35/52] Patch patch :) --- recipe/build.sh | 4 +-- recipe/meta.yaml | 4 +-- recipe/patches/amber19-fix-cmake.patch | 42 -------------------------- 3 files changed, 4 insertions(+), 46 deletions(-) diff --git a/recipe/build.sh b/recipe/build.sh index 393a7a6f..5bcfd1cb 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -7,8 +7,8 @@ for n in {1..5}; do ./update_amber --update-to=AmberTools.${PATCH_LEVEL} && break done -# Patch manually -patch --verbose -p1 --ignore-whitespace -t -i ${RECIPE_DIR}/patches/amber19-fix-cmake.patch +# Patch manually (errors seem to be unimportant) +# patch -p1 --ignore-whitespace -t -i ${RECIPE_DIR}/patches/amber19-fix-cmake.patch || true # Build AmberTools with cmake mkdir build diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 15fc61f1..906fe95b 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -10,8 +10,8 @@ package: source: url: https://ambermd.org/downloads/AmberTools19.tar.bz2 sha256: 0c86937904854b64e4831e047851f504ec45b42e593db4ded92c1bee5973e699 - # patches: - # - patches/amber19-fix-cmake.patch + patches: + - patches/amber19-fix-cmake.patch build: number: 1 diff --git a/recipe/patches/amber19-fix-cmake.patch b/recipe/patches/amber19-fix-cmake.patch index bbb44ab6..96050572 100644 --- a/recipe/patches/amber19-fix-cmake.patch +++ b/recipe/patches/amber19-fix-cmake.patch @@ -1346,19 +1346,6 @@ index fd6b060927..5ee0671364 100644 endif() if(netcdf-fortran_EXTERNAL) -diff --git a/cmake/AmberBuildSystemInit.cmake b/cmake/AmberBuildSystemInit.cmake -index ebd71a869b..5f13a68cc8 100644 ---- a/cmake/AmberBuildSystemInit.cmake -+++ b/cmake/AmberBuildSystemInit.cmake -@@ -56,7 +56,7 @@ include(CMakeParseArguments) - include(Utils) - include(Shorthand) - include(ColorMessage) --include(Policies) -+include(Policies NO_POLICY_SCOPE) - - # get install directories - include(InstallDirs) diff --git a/cmake/CompilerFlags.cmake b/cmake/CompilerFlags.cmake index 914eddbbb7..1a49da16a3 100644 --- a/cmake/CompilerFlags.cmake @@ -1431,22 +1418,6 @@ index 6ae0a65eb2..e091f86c2c 100644 # Before CMake 3.7, FindCUDA did not automatically link libcudadevrt, as is required for seperable compilation. # Finder code copied from here: https://github.com/Kitware/CMake/commit/891e0ebdcea547b10689eee9fd008a27e4afd3b9 -diff --git a/cmake/ExternalPrograms.cmake b/cmake/ExternalPrograms.cmake -index 5ee53798be..52038903f5 100644 ---- a/cmake/ExternalPrograms.cmake -+++ b/cmake/ExternalPrograms.cmake -@@ -17,6 +17,11 @@ find_program(M4 m4) - #------------------------------------------------------------------------------ - find_package(FLEX REQUIRED) - -+#------------------------------------------------------------------------------ -+# Bison -+#------------------------------------------------------------------------------ -+find_package(BISON REQUIRED) -+ - #------------------------------------------------------------------------------ - # bash, for running shell scripts - #------------------------------------------------------------------------------ diff --git a/cmake/FixCondaShebang/CMakeLists.txt b/cmake/FixCondaShebang/CMakeLists.txt index 32a2a7fbc7..83ff55672c 100644 --- a/cmake/FixCondaShebang/CMakeLists.txt @@ -1473,19 +1444,6 @@ index 9d9fa81f08..7c24005b79 100644 #precision of pmemd which gets installed as pmemd.cuda set(PMEMD_DEFAULT_PRECISION SPFP) -diff --git a/cmake/PythonInterpreterConfig.cmake b/cmake/PythonInterpreterConfig.cmake -index 57843ab1bf..be5c725a27 100644 ---- a/cmake/PythonInterpreterConfig.cmake -+++ b/cmake/PythonInterpreterConfig.cmake -@@ -50,7 +50,7 @@ if(DOWNLOAD_MINICONDA) - unset(ENV{_CONDA_PYTHON2}) - endif() - -- set(MINICONDA_VERSION 4.3.21) -+ set(MINICONDA_VERSION 4.5.11) - option(MINICONDA_USE_PY3 "If true, Amber will download a Python 3 miniconda when DOWNLOAD_MINICONDA is enabled. Otherwise, Python 2.7 Miniconda will get downloaded." FALSE) - - include(UseMiniconda) diff --git a/cmake/Replace.cmake b/cmake/Replace.cmake index 64122f9167..0f52af02e1 100644 --- a/cmake/Replace.cmake From 518c8b907aa5642d3e30b19d750bfee786c75ba0 Mon Sep 17 00:00:00 2001 From: Jaime RGP Date: Mon, 6 Jan 2020 21:32:28 +0100 Subject: [PATCH 36/52] Re-add patch to fix newline errors (?) --- recipe/patches/amber19-fix-cmake.patch | 513 ++++++++++++++----------- 1 file changed, 278 insertions(+), 235 deletions(-) diff --git a/recipe/patches/amber19-fix-cmake.patch b/recipe/patches/amber19-fix-cmake.patch index 96050572..76fe0f21 100644 --- a/recipe/patches/amber19-fix-cmake.patch +++ b/recipe/patches/amber19-fix-cmake.patch @@ -3,38 +3,38 @@ index e2f684b8c3..0074c510c0 100644 --- a/AmberTools/src/cifparse/CMakeLists.txt +++ b/AmberTools/src/cifparse/CMakeLists.txt @@ -5,7 +5,7 @@ set(LEXED_FILES_DIR ${CMAKE_CURRENT_BINARY_DIR}) - + # Flex and bison flex_target(CifLex cifparse.l "${LEXED_FILES_DIR}/lex.cif.c" COMPILE_FLAGS -Pcifp) -byacc_target(CifYacc cifparse.y ${LEXED_FILES_DIR} GENERATE_HEADER COMPILE_FLAGS -pcifp FILE_PREFIX cifp) +bison_target(CifYacc cifparse.y "${LEXED_FILES_DIR}/cifp.tab.c" COMPILE_FLAGS -pcifp) add_flex_bison_dependency(CifLex CifYacc) - + #build the library diff --git a/AmberTools/src/fftw-3.3/CMakeLists.txt b/AmberTools/src/fftw-3.3/CMakeLists.txt index 932f8a26fe..2ca0f413cc 100644 --- a/AmberTools/src/fftw-3.3/CMakeLists.txt +++ b/AmberTools/src/fftw-3.3/CMakeLists.txt @@ -215,7 +215,7 @@ if(DEFINED INCOMING_STACK_BOUNDARY) - + check_c_compiler_flag(${ISB_FLAG} SUPPORTS_ISB_FLAG) - + - if(NOT SUPPORTS_AVX_FLAG) + if(NOT SUPPORTS_ISB_FLAG) message(SEND_ERROR "You requested to set the incoming stack boundary, but the compiler flag to do that doesn't work") endif() - + diff --git a/AmberTools/src/leap/src/leap/CMakeLists.txt b/AmberTools/src/leap/src/leap/CMakeLists.txt index bbf166e0f6..14807f7505 100644 --- a/AmberTools/src/leap/src/leap/CMakeLists.txt +++ b/AmberTools/src/leap/src/leap/CMakeLists.txt @@ -108,7 +108,7 @@ else() #build the leap programs - + #--------------------------------------------------------------------------------------------------------------------------------------------------------------------- - + - byacc_target(leap_yacc parser.y ${CMAKE_CURRENT_BINARY_DIR}) + bison_target(LeapYacc parser.y ${YACC_PARSER_FILE}) - + #--------------------------------------------------------------------------------------------------------------------------------------------------------------------- add_library(leap_common_obj OBJECT ${COMMON_SOURCE}) diff --git a/AmberTools/src/nab/CMakeLists.txt b/AmberTools/src/nab/CMakeLists.txt @@ -43,13 +43,13 @@ index 6c79b6c806..7beabd278a 100644 +++ b/AmberTools/src/nab/CMakeLists.txt @@ -137,8 +137,8 @@ set(INTERMED_DIR ${CMAKE_CURRENT_BINARY_DIR}/lex-intermediates) file(MAKE_DIRECTORY ${INTERMED_DIR}) - + set(DG_OPTIONS_SOURCE dg_options.l) -set(DG_OPTIONS_INTERMEDIATE ${INTERMED_DIR}/lex.dg_options.c) -set(DG_OPTIONS_LEXED ${CMAKE_CURRENT_BINARY_DIR}/lex.dg_options.c) +set(DG_OPTIONS_INTERMEDIATE ${INTERMED_DIR}/lex.dgo.c) +set(DG_OPTIONS_LEXED ${CMAKE_CURRENT_BINARY_DIR}/lex.dgo.c) - + #default compile flags set_property(DIRECTORY PROPERTY COMPILE_OPTIONS ${NO_OPT_CFLAGS}) @@ -192,7 +192,7 @@ endif() @@ -59,7 +59,7 @@ index 6c79b6c806..7beabd278a 100644 -byacc_target(NabYacc ${NAB_YACC} ${CMAKE_CURRENT_BINARY_DIR} GENERATE_HEADER) +bison_target(NabYacc ${NAB_YACC} ${NAB_COMPILED_YACC_C}) add_flex_bison_dependency(NabLex NabYacc) - + #do the textual replaces on dg_options diff --git a/AmberTools/src/nab/semantics/parse2.c b/AmberTools/src/nab/semantics/parse2.c index 7e25ec111b..3cf81ad46d 100644 @@ -67,7 +67,7 @@ index 7e25ec111b..3cf81ad46d 100644 +++ b/AmberTools/src/nab/semantics/parse2.c @@ -420,7 +420,7 @@ static int getsyms( FILE *fp, DEF_T symtab[] ) DEF_T *sp; - + for( sp = symtab; fgets( line, sizeof( line ), fp ); sp++ ){ - sscanf( line, "# define %s %d", sp->d_name, &sp->d_val ); + sscanf( line, " %s = %d,", sp->d_name, &sp->d_val ); @@ -79,27 +79,27 @@ index 99a9faea7f..6865bae773 100644 --- a/AmberTools/src/netcdf-4.6.1/CMakeLists.txt +++ b/AmberTools/src/netcdf-4.6.1/CMakeLists.txt @@ -11,7 +11,6 @@ cmake_minimum_required(VERSION 3.6.1) - + #Project Name project(netCDF C) -set(PACKAGE "netCDF" CACHE STRING "") - + ##### # Version Info: @@ -56,8 +55,8 @@ ENDIF() # For ctest scripts, we can use CTEST_BUILD_NAME. ### - + -SET(BUILDNAME_PREFIX "" CACHE STRING "") -SET(BUILDNAME_SUFFIX "" CACHE STRING "") +SET(BUILDNAME_PREFIX "") +SET(BUILDNAME_SUFFIX "") - + IF(BUILDNAME_PREFIX) SET(TMP_BUILDNAME "${BUILDNAME_PREFIX}-${TMP_BUILDNAME}") @@ -68,7 +67,7 @@ IF(BUILDNAME_SUFFIX) ENDIF() - + IF(NOT BUILDNAME) - SET(BUILDNAME "${TMP_BUILDNAME}" CACHE STRING "Build name variable for CDash") + SET(BUILDNAME "${TMP_BUILDNAME}") @@ -108,18 +108,18 @@ index 99a9faea7f..6865bae773 100644 # End BUILDNAME customization. @@ -82,8 +81,7 @@ IF(MSVC) ENDIF() - + #Add custom CMake Module -SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules/" - CACHE INTERNAL "Location of our custom CMake modules.") +SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/") - + # auto-configure style checks, other CMake modules. INCLUDE(CheckLibraryExists) @@ -119,12 +117,6 @@ ENDMACRO() FIND_PACKAGE(MakeDist) # End 'enable dist and distcheck' - + -# Set the build type. -IF(NOT CMAKE_BUILD_TYPE) - SET(CMAKE_BUILD_TYPE DEBUG CACHE STRING "Choose the type of build, options are: None, Debug, Release." @@ -128,21 +128,21 @@ index 99a9faea7f..6865bae773 100644 - # Set build type uppercase STRING(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE) - + @@ -165,12 +157,12 @@ ENABLE_TESTING() INCLUDE(CTest) - + # Copy the CTest customization file into binary directory, as required. -FILE(COPY ${CMAKE_SOURCE_DIR}/CTestCustom.cmake DESTINATION ${CMAKE_BINARY_DIR}) +FILE(COPY ${CMAKE_CURRENT_SOURCE_DIR}/CTestCustom.cmake DESTINATION ${CMAKE_BINARY_DIR}) - + # Set Memory test program for non-MSVC based builds. # Assume valgrind for now. IF(NOT MSVC) - SET(CTEST_MEMORYCHECK_COMMAND valgrind CACHE STRING "") + SET(CTEST_MEMORYCHECK_COMMAND valgrind) ENDIF() - + # Set variable to define the build type. @@ -190,26 +182,25 @@ INCLUDE(GenerateExportHeader) # BUILD_SHARED_LIBS is provided by/used by @@ -152,10 +152,10 @@ index 99a9faea7f..6865bae773 100644 IF(BUILD_SHARED_LIBS) SET(CMAKE_POSITION_INDEPENDENT_CODE ON) ENDIF() - + -OPTION(NC_FIND_SHARED_LIBS "Find dynamically-built versions of dependent libraries" ${BUILD_SHARED_LIBS}) +set(NC_FIND_SHARED_LIBS ${BUILD_SHARED_LIBS}) - + ## # We've had a request to allow for non-versioned shared libraries. # This seems reasonable enough to accomodate. See @@ -163,7 +163,7 @@ index 99a9faea7f..6865bae773 100644 ## -OPTION(ENABLE_SHARED_LIBRARY_VERSION "Encode the library SO version in the file name of the generated library file." ON) +set(ENABLE_SHARED_LIBRARY_VERSION ON) - + # Set some default linux gcc & apple compiler options for # debug builds. IF(CMAKE_COMPILER_IS_GNUCC OR APPLE) @@ -173,7 +173,7 @@ index 99a9faea7f..6865bae773 100644 + set(ENABLE_COVERAGE_TESTS FALSE) + set(ENABLE_CONVERSION_WARNINGS TRUE) + set(ENABLE_LARGE_FILE_TESTS FALSE) - + # Debugging flags SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall") @@ -258,10 +249,10 @@ ENDIF() @@ -188,12 +188,12 @@ index 99a9faea7f..6865bae773 100644 +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/oc2) +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/libsrc) +SET(CMAKE_REQUIRED_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}/libsrc) - + ################################ # End Compiler Configuration @@ -307,14 +298,14 @@ ENDIF() ################################ - + # HDF5 cache variables. -SET(DEFAULT_CHUNK_SIZE 4194304 CACHE STRING "Default Chunk Cache Size.") -SET(DEFAULT_CHUNKS_IN_CACHE 10 CACHE STRING "Default number of chunks in cache.") @@ -211,11 +211,11 @@ index 99a9faea7f..6865bae773 100644 +SET(MAX_DEFAULT_CACHE_SIZE 67108864) +SET(NETCDF_LIB_NAME "") +SET(TEMP_LARGE ".") - + IF(NOT NETCDF_LIB_NAME STREQUAL "") SET(MOD_NETCDF_NAME ON) @@ -356,7 +347,7 @@ ENDMACRO() - + # Option to use Static Runtimes in MSVC IF(MSVC) - OPTION(NC_USE_STATIC_CRT "Use static CRT Libraries ('\\MT')." OFF) @@ -225,19 +225,19 @@ index 99a9faea7f..6865bae773 100644 specify_static_crt_flag() @@ -373,23 +364,23 @@ ELSE(NOT ENABLE_V2_API) ENDIF(NOT ENABLE_V2_API) - + # Option to build utilities -OPTION(BUILD_UTILITIES "Build ncgen, ncgen3, ncdump." ON) +set(BUILD_UTILITIES TRUE) - + # Option to use MMAP -OPTION(ENABLE_MMAP "Use MMAP." ON) +set(ENABLE_MMAP TRUE) - + # Option to use examples. -OPTION(ENABLE_EXAMPLES "Build Examples" ON) +set(ENABLE_EXAMPLES FALSE) - + # Option to use Diskless -OPTION(ENABLE_DISKLESS "Build Diskless." ON) +set(ENABLE_DISKLESS FALSE) @@ -245,7 +245,7 @@ index 99a9faea7f..6865bae773 100644 SET(BUILD_DISKLESS ON) SET(USE_DISKLESS ON) ENDIF() - + # Option Logging, only valid for netcdf4. -OPTION(ENABLE_LOGGING "Enable Logging." OFF) +set(ENABLE_LOGGING FALSE) @@ -253,7 +253,7 @@ index 99a9faea7f..6865bae773 100644 ADD_DEFINITIONS(-DLOGGING) SET(LOGGING ON) @@ -397,12 +388,12 @@ ENDIF() - + # Option to automatically build netcdf-fortran. IF(NOT MSVC) - OPTION(ENABLE_REMOTE_FORTRAN_BOOTSTRAP "Download and build netcdf-fortran automatically (EXPERIMENTAL)." OFF) @@ -266,7 +266,7 @@ index 99a9faea7f..6865bae773 100644 + CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/postinstall.sh.in" "${CMAKE_BINARY_DIR}/postinstall.sh" @ONLY) - + @@ -424,7 +415,7 @@ ENDIF() # Allow the user to specify libraries # to link against, similar to automakes 'LIBS' variable. @@ -278,7 +278,7 @@ index 99a9faea7f..6865bae773 100644 FOREACH(_DEP ${DEPS_LIST}) @@ -447,7 +438,7 @@ ENDIF() ### - + # Option to use HDF4 -OPTION(ENABLE_HDF4 "Build netCDF-4 with HDF4 read capability(HDF4, HDF5 and Zlib required)." OFF) +set(ENABLE_HDF4 FALSE) @@ -296,7 +296,7 @@ index 99a9faea7f..6865bae773 100644 ENDIF() @@ -495,7 +486,7 @@ IF(ENABLE_HDF4) MESSAGE(STATUS "Found JPEG libraries: ${JPEG_LIB}") - + # Option to enable HDF4 file tests. - OPTION(ENABLE_HDF4_FILE_TESTS "Run HDF4 file tests. This fetches sample HDF4 files from the Unidata ftp site to test with (requires curl)." ON) + set(ENABLE_HDF4_FILE_TESTS FALSE) @@ -304,7 +304,7 @@ index 99a9faea7f..6865bae773 100644 FIND_PROGRAM(PROG_CURL NAMES curl) IF(PROG_CURL) @@ -509,42 +500,43 @@ ENDIF() - + # Option to Build DLL IF(WIN32) - OPTION(ENABLE_DLL "Build a Windows DLL." ${BUILD_SHARED_LIBS}) @@ -320,7 +320,7 @@ index 99a9faea7f..6865bae773 100644 # Did the user specify a default minimum blocksize for posixio? -SET(NCIO_MINBLOCKSIZE 256 CACHE STRING "Minimum I/O Blocksize for netCDF classic and 64-bit offset format files.") +SET(NCIO_MINBLOCKSIZE 256) - + # Build netCDF4 -OPTION(ENABLE_NETCDF_4 "Enable netCDF-4" ON) +set(ENABLE_NETCDF_4 FALSE) @@ -338,17 +338,17 @@ index 99a9faea7f..6865bae773 100644 SET(ENABLE_HDF4_FILE_TESTS OFF) SET(ENABLE_HDF4 OFF) ENDIF() - + # Option to allow for strict null file padding. # See https://github.com/Unidata/netcdf-c/issues/657 for more information -OPTION(ENABLE_STRICT_NULL_BYTE_HEADER_PADDING "Enable strict null byte header padding." OFF) +set(ENABLE_STRICT_NULL_BYTE_HEADER_PADDING FALSE) - + IF(ENABLE_STRICT_NULL_BYTE_HEADER_PADDING) - SET(USE_STRICT_NULL_BYTE_HEADER_PADDING ON CACHE BOOL "") + SET(USE_STRICT_NULL_BYTE_HEADER_PADDING ON) ENDIF(ENABLE_STRICT_NULL_BYTE_HEADER_PADDING) - + # Option for building RPC -OPTION(ENABLE_RPC "Enable RPC Client and Server." OFF) +set(ENABLE_RPC FALSE) @@ -356,7 +356,7 @@ index 99a9faea7f..6865bae773 100644 - SET(BUILD_RPC ON CACHE BOOL "") + SET(BUILD_RPC ON) ENDIF() - + ## @@ -564,7 +556,7 @@ ENDIF() # * HDF5_INCLUDE_DIR @@ -369,7 +369,7 @@ index 99a9faea7f..6865bae773 100644 SET(USE_NETCDF4 ON) @@ -741,7 +733,7 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4) ENDIF() - + SET(H5_USE_16_API 1) - OPTION(NC_ENABLE_HDF_16_API "Enable HDF5 1.6.x Compatibility(Required)" ON) + set(NC_ENABLE_HDF_16_API FALSE) @@ -378,7 +378,7 @@ index 99a9faea7f..6865bae773 100644 ENDIF() @@ -760,22 +752,22 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4) ENDIF(USE_HDF5 OR ENABLE_NETCDF_4) - + # Option to turn on CDF5 support. -OPTION(ENABLE_CDF5 "Enable CDF5 Support." OFF) +set(ENABLE_CDF5 FALSE) @@ -386,7 +386,7 @@ index 99a9faea7f..6865bae773 100644 - SET(USE_CDF5 ON CACHE BOOL "") + SET(USE_CDF5 ON) ENDIF(ENABLE_CDF5) - + # Option to Build DAP2+DAP4 Clients -OPTION(ENABLE_DAP "Enable DAP2 and DAP4 Client." ON) +set(ENABLE_DAP FALSE) @@ -395,8 +395,8 @@ index 99a9faea7f..6865bae773 100644 - SET(ENABLE_DAP2 ON CACHE BOOL "") + SET(USE_DAP ON) + SET(ENABLE_DAP2 ON) - - + + IF(ENABLE_NETCDF_4) - SET(ENABLE_DAP4 ON CACHE BOOL "") + SET(ENABLE_DAP4 ON) @@ -404,12 +404,12 @@ index 99a9faea7f..6865bae773 100644 - SET(ENABLE_DAP4 OFF CACHE BOOL "") + SET(ENABLE_DAP4 OFF) ENDIF(ENABLE_NETCDF_4) - + FIND_PACKAGE(CURL) @@ -822,29 +814,20 @@ ELSE() ENDIF() - - + + -# Check for the math library so it can be explicitly linked. -IF(NOT WIN32) - FIND_LIBRARY(HAVE_LIBM NAMES math m libm) @@ -426,7 +426,7 @@ index 99a9faea7f..6865bae773 100644 +set(ENABLE_DAP_LONG_TESTS OFF) +set(ENABLE_DAP_REMOTE_TESTS FALSE) +SET(REMOTETESTSERVERS "remotetest.unidata.ucar.edu,jetstream.unidata.ucar.edu") - + # If netCDF4 and DAP, Option for DAP groups. IF(ENABLE_NETCDF_4 AND ENABLE_DAP2) - OPTION(ENABLE_DAP_GROUPS "Whether netcdf4 group names should be enabled." ON) @@ -435,7 +435,7 @@ index 99a9faea7f..6865bae773 100644 - SET(ENABLE_DAP_GROUPS OFF CACHE BOOL "Whether netcdf4 group names should be enabled.") + SET(ENABLE_DAP_GROUPS OFF) ENDIF() - + # Enable some developer-only tests -OPTION(ENABLE_EXTRA_TESTS "Enable Extra tests. Some may not work because of known issues. Developers only." OFF) +set(ENABLE_EXTRA_TESTS FALSE) @@ -453,10 +453,10 @@ index 99a9faea7f..6865bae773 100644 + SET(USE_X_GETOPT ON) ENDIF() ENDIF() - + @@ -862,29 +845,29 @@ SET(MATH "") IF(NOT WIN32) - + # STDIO instead of posixio. - OPTION(ENABLE_STDIO "If true, use stdio instead of posixio (ex. on the Cray)" OFF) + set(ENABLE_STDIO FALSE) @@ -464,7 +464,7 @@ index 99a9faea7f..6865bae773 100644 - SET(USE_STDIO ON CACHE BOOL "") + SET(USE_STDIO ON) ENDIF() - + # FFIO insteaad of PosixIO - OPTION(ENABLE_FFIO "If true, use ffio instead of posixio" OFF) + set(ENABLE_FFIO FALSE) @@ -473,7 +473,7 @@ index 99a9faea7f..6865bae773 100644 + SET(USE_FFIO ON) ENDIF() ENDIF() - + ## # Enable Tests ## @@ -482,7 +482,7 @@ index 99a9faea7f..6865bae773 100644 IF(ENABLE_TESTS) - SET(BUILD_TESTSETS ON CACHE BOOL "") + SET(BUILD_TESTSETS ON) - + # Options for CTest-based tests, dashboards. - SET(NC_CTEST_PROJECT_NAME "netcdf-c" CACHE STRING "Project Name for CTest-based testing purposes.") - SET(NC_CTEST_DROP_SITE "cdash.unidata.ucar.edu" CACHE STRING "Dashboard location for CTest-based testing purposes.") @@ -490,7 +490,7 @@ index 99a9faea7f..6865bae773 100644 + SET(NC_CTEST_PROJECT_NAME "netcdf-c") + SET(NC_CTEST_DROP_SITE "cdash.unidata.ucar.edu") + SET(NC_CTEST_DROP_LOC_PREFIX "") - + FIND_PROGRAM(HOSTNAME_CMD NAMES hostname) IF(NOT MSVC) @@ -892,11 +875,11 @@ IF(ENABLE_TESTS) @@ -500,20 +500,20 @@ index 99a9faea7f..6865bae773 100644 - SET(NC_CTEST_SITE "${HOSTNAME}" CACHE STRING "Hostname of test machine.") + SET(NC_CTEST_SITE "${HOSTNAME}") ENDIF() - + IF(NC_CTEST_SITE) - SET(SITE "${NC_CTEST_SITE}" CACHE STRING "") + SET(SITE "${NC_CTEST_SITE}") ENDIF() - + # Create a CTestConfig file from the template. @@ -920,7 +903,7 @@ IF(ENABLE_TESTS) # which are known to fail. ### - + - OPTION(ENABLE_FAILING_TESTS "Run tests which are known to fail, check to see if any have been fixed." OFF) + set(ENABLE_FAILING_TESTS FALSE) - + ### # End known-failures. @@ -931,7 +914,7 @@ ENDIF() @@ -527,24 +527,24 @@ index 99a9faea7f..6865bae773 100644 ENDIF() @@ -942,22 +925,22 @@ IF(ENABLE_LARGE_FILE_TESTS) ENDIF() - + # Location for large file tests. -SET(TEMP_LARGE "." CACHE STRING "Location to store large file tests.") +SET(TEMP_LARGE ".") - + -OPTION(ENABLE_FSYNC "Enable experimental fsync code." OFF) +set(ENABLE_FSYNC FALSE) IF(ENABLE_FSYNC) SET(USE_FSYNC ON) ENDIF() - + # Temporary -OPTION (ENABLE_JNA "Enable jna bug fix code." OFF) +set (ENABLE_JNA FALSE) IF(ENABLE_JNA) SET(JNA ON) ENDIF() - + # Linux specific large file support flags. # Modelled after check in CMakeLists.txt for hdf5. -OPTION(ENABLE_LARGE_FILE_SUPPORT "Enable large file support." ON) @@ -555,13 +555,13 @@ index 99a9faea7f..6865bae773 100644 @@ -968,41 +951,41 @@ IF(ENABLE_LARGE_FILE_SUPPORT) ENDIF() ENDIF() - + -OPTION(ENABLE_EXAMPLE_TESTS "Run extra example tests. Requires GNU Sed. Ignored if netCDF-4 is not Enabled" OFF) +set(ENABLE_EXAMPLE_TESTS FALSE) IF(NOT ENABLE_NETCDF_4 AND ENABLE_EXAMPLE_TESTS) SET(ENABLE_EXAMPLE_TESTS OFF) ENDIF() - + # Enable Parallel (different than pnetcdf). SET(STATUS_PARALLEL "OFF") -OPTION(ENABLE_PARALLEL4 "Build netCDF-4 with parallel IO" "${HDF5_PARALLEL}") @@ -581,12 +581,12 @@ index 99a9faea7f..6865bae773 100644 SET(STATUS_PARALLEL "ON") ENDIF() ENDIF() - + # Options to enable parallel IO, tests. SET(STATUS_PNETCDF "OFF") -OPTION(ENABLE_PNETCDF "Build with parallel I/O for classic and 64-bit offset files using parallel-netcdf." OFF) +set(ENABLE_PNETCDF FALSE) - + IF(ENABLE_PNETCDF) # Check for ncmpi_create in libpnetcdf, define USE_PNETCDF # Does the user want to turn on PNETCDF read ability? @@ -601,11 +601,11 @@ index 99a9faea7f..6865bae773 100644 ELSE(NOT PNETCDF) - SET(USE_PARALLEL ON CACHE BOOL "") + SET(USE_PARALLEL ON) - + # Check PnetCDF version. Must be >= 1.6.0 set(pnetcdf_h "${PNETCDF_INCLUDE_DIR}/pnetcdf.h" ) @@ -1032,7 +1015,7 @@ ENDIF() - + # Options to enable use of fill values for elements casuing NC_ERANGE SET(STATUS_ERANGE_FILL "OFF") -OPTION(ENABLE_ERANGE_FILL "Enable use of fill value when out-of-range type conversion causes NC_ERANGE error." OF) @@ -614,7 +614,7 @@ index 99a9faea7f..6865bae773 100644 SET(STATUS_ERANGE_FILL "ON") ADD_DEFINITIONS(-DERANGE_FILL) @@ -1040,7 +1023,7 @@ ENDIF() - + # Options to use a more relaxed coordinate argument boundary check SET(STATUS_RELAX_COORD_BOUND "OFF") -OPTION(ENABLE_ZERO_LENGTH_COORD_BOUND "Enable a more relaxed boundary error check NC_EINVALCOORDS to allow coordinate start argument equal to dimension size when argument count is zero." OFF) @@ -624,16 +624,16 @@ index 99a9faea7f..6865bae773 100644 ENDIF() @@ -1076,7 +1059,7 @@ IF(STATUS_PNETCDF) ENDIF() - + IF(STATUS_ERANGE_FILL) - SET(M4FLAGS "-DERANGE_FILL" CACHE STRING "") + SET(M4FLAGS "-DERANGE_FILL") ENDIF() - + IF(STATUS_RELAX_COORD_BOUND) @@ -1085,11 +1068,11 @@ IF(STATUS_RELAX_COORD_BOUND) ENDIF() - + # Enable Parallel Tests. -OPTION(ENABLE_PARALLEL_TESTS "Enable Parallel IO Tests. Requires HDF5/NetCDF4 with parallel I/O Support." ${USE_PARALLEL}) +set(ENABLE_PARALLEL_TESTS FALSE) @@ -645,10 +645,10 @@ index 99a9faea7f..6865bae773 100644 + SET(TEST_PARALLEL4 ON) ENDIF() ENDIF() - + @@ -1098,26 +1081,18 @@ IF (ENABLE_PARALLEL_TESTS AND NOT USE_PARALLEL) ENDIF() - + # Enable special filter test; experimental when using cmake. -OPTION(ENABLE_FILTER_TESTING "Enable filter testing. Ignored if shared libraries or netCDF4 are not enabled" OFF) -IF(NOT ENABLE_NETCDF4) @@ -660,7 +660,7 @@ index 99a9faea7f..6865bae773 100644 - SET(ENABLE_FILTER_TESTING OFF CACHE BOOL "") -ENDIF() +set(ENABLE_FILTER_TESTING OFF) - + # Determine whether or not to generate documentation. -OPTION(ENABLE_DOXYGEN "Enable generation of doxygen-based documentation." OFF) +set(ENABLE_DOXYGEN FALSE) @@ -676,7 +676,7 @@ index 99a9faea7f..6865bae773 100644 - SET(BUILD_INTERNAL_DOCS NO CACHE STRING "") + SET(BUILD_INTERNAL_DOCS NO) ENDIF() - + ### @@ -1125,57 +1100,57 @@ IF(ENABLE_DOXYGEN) # If we are building release documentation, we need to set some @@ -700,7 +700,7 @@ index 99a9faea7f..6865bae773 100644 + SET(DOXYGEN_CSS_FILE "") + SET(DOXYGEN_HEADER_FILE "") + SET(DOXYGEN_SEARCHENGINE "YES") - + # If not using release document configuration, # provide an option for server-based search. - OPTION(ENABLE_DOXYGEN_SERVER_SIDE_SEARCH "Configure Doxygen with server-based search." OFF) @@ -712,8 +712,8 @@ index 99a9faea7f..6865bae773 100644 - SET(DOXYGEN_SERVER_BASED_SEARCH "NO" CACHE STRING "") + SET(DOXYGEN_SERVER_BASED_SEARCH "NO") ENDIF(ENABLE_DOXYGEN_SERVER_SIDE_SEARCH) - - + + ENDIF(ENABLE_DOXYGEN_BUILD_RELEASE_DOCS) # Option to turn on the TODO list in the doxygen-generated documentation. - OPTION(DOXYGEN_ENABLE_TASKS "Turn on test, todo, bug lists in documentation. This is of interest to developers only." OFF) @@ -725,10 +725,10 @@ index 99a9faea7f..6865bae773 100644 - SET(SHOW_DOXYGEN_TODO_LIST NO CACHE STRING "") + SET(SHOW_DOXYGEN_TODO_LIST NO) ENDIF(DOXYGEN_ENABLE_TASKS) - + - OPTION(ENABLE_DOXYGEN_PDF_OUTPUT "[EXPERIMENTAL] Turn on PDF output for Doxygen-generated documentation." OFF) + set(ENABLE_DOXYGEN_PDF_OUTPUT FALSE) - + IF(ENABLE_DOXYGEN_PDF_OUTPUT) - SET(NC_ENABLE_DOXYGEN_PDF_OUTPUT "YES" CACHE STRING "") + SET(NC_ENABLE_DOXYGEN_PDF_OUTPUT "YES") @@ -736,7 +736,7 @@ index 99a9faea7f..6865bae773 100644 - SET(NC_ENABLE_DOXYGEN_PDF_OUTPUT "NO" CACHE STRING "") + SET(NC_ENABLE_DOXYGEN_PDF_OUTPUT "NO") ENDIF() - + FIND_PROGRAM(NC_DOT NAMES dot) # Specify whether or not 'dot' was found on the system path. IF(NC_DOT) @@ -747,7 +747,7 @@ index 99a9faea7f..6865bae773 100644 + SET(HAVE_DOT NO) ENDIF(NC_DOT) ENDIF() - + # By default, MSVC has a stack size of 1000000. # Allow a user to override this. IF(MSVC) @@ -768,7 +768,7 @@ index 99a9faea7f..6865bae773 100644 @@ -1385,7 +1360,7 @@ MACRO(add_bin_env_temp_large_test prefix F) ) ENDIF() - + - ADD_TEST(${prefix}_${F} bash "-c" "TEMP_LARGE=${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/${prefix}_${F}") + ADD_TEST(${prefix}_${F} bash "-c" "TEMP_LARGE=${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/${prefix}_${F}") IF(MSVC) @@ -777,27 +777,27 @@ index 99a9faea7f..6865bae773 100644 @@ -1410,7 +1385,7 @@ MACRO(add_bin_env_test prefix F) ) ENDIF() - + - ADD_TEST(${prefix}_${F} bash "-c" "TOPSRCDIR=${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/${prefix}_${F}") + ADD_TEST(${prefix}_${F} bash "-c" "TOPSRCDIR=${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/${prefix}_${F}") IF(MSVC) SET_PROPERTY(TARGET ${prefix}_${F} PROPERTY FOLDER "tests") ENDIF() @@ -1552,7 +1527,7 @@ ENDIF() - + MACRO(add_sh_test prefix F) IF(HAVE_BASH) - ADD_TEST(${prefix}_${F} bash "-c" "export srcdir=${CMAKE_CURRENT_SOURCE_DIR};export TOPSRCDIR=${CMAKE_SOURCE_DIR};${CMAKE_CURRENT_BINARY_DIR}/${F}.sh") + ADD_TEST(${prefix}_${F} bash "-c" "export srcdir=${CMAKE_CURRENT_SOURCE_DIR};export TOPSRCDIR=${CMAKE_CURRENT_SOURCE_DIR};${CMAKE_CURRENT_BINARY_DIR}/${F}.sh") ENDIF() ENDMACRO() - + @@ -1774,6 +1749,7 @@ INSTALL(FILES ${netCDF_BINARY_DIR}/netcdf.pc INSTALL(PROGRAMS ${netCDF_BINARY_DIR}/nc-config DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT utilities) -+ - ++ + ### # End pkgconfig, nc-config file creation. @@ -1782,11 +1758,11 @@ INSTALL(PROGRAMS ${netCDF_BINARY_DIR}/nc-config @@ -806,13 +806,13 @@ index 99a9faea7f..6865bae773 100644 ## -print_conf_summary() +#print_conf_summary() - + # Enable Makedist files. -ADD_MAKEDIST() -ENABLE_MAKEDIST(README.md COPYRIGHT RELEASE_NOTES.md INSTALL INSTALL.cmake test_prog.c lib_flags.am cmake CMakeLists.txt COMPILE.cmake.txt config.h.cmake.in cmake_uninstall.cmake.in netcdf-config-version.cmake.in netcdf-config.cmake.in FixBundle.cmake.in nc-config.cmake.in configure configure.ac install-sh config.h.in config.sub CTestConfig.cmake.in) +#ADD_MAKEDIST() +#ENABLE_MAKEDIST(README.md COPYRIGHT RELEASE_NOTES.md INSTALL INSTALL.cmake test_prog.c lib_flags.am cmake CMakeLists.txt COMPILE.cmake.txt config.h.cmake.in cmake_uninstall.cmake.in netcdf-config-version.cmake.in netcdf-config.cmake.in FixBundle.cmake.in nc-config.cmake.in configure configure.ac install-sh config.h.in config.sub CTestConfig.cmake.in) - + ##### # Configure and print the libnetcdf.settings file. @@ -1799,7 +1775,7 @@ SET(host_cpu "${cpu}") @@ -821,16 +821,16 @@ index 99a9faea7f..6865bae773 100644 SET(abs_top_builddir "${CMAKE_BINARY_DIR}") -SET(abs_top_srcdir "${CMAKE_SOURCE_DIR}") +SET(abs_top_srcdir "${CMAKE_CURRENT_SOURCE_DIR}") - + SET(CC_VERSION "${CMAKE_C_COMPILER}") - + @@ -1843,7 +1819,7 @@ CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/libnetcdf.settings.in" # might also work on Windows. FILE(READ "${CMAKE_CURRENT_BINARY_DIR}/libnetcdf.settings" LIBNETCDF_SETTINGS) -MESSAGE(${LIBNETCDF_SETTINGS}) +#MESSAGE(${LIBNETCDF_SETTINGS}) - + # Install libnetcdf.settings file into same location # as the libraries. @@ -1868,16 +1844,16 @@ FILE(COPY ${netCDF_SOURCE_DIR}/include/netcdf_meta.h @@ -844,18 +844,18 @@ index 99a9faea7f..6865bae773 100644 SET(TOPBUILDDIR "${CMAKE_BINARY_DIR}") -configure_file(${CMAKE_SOURCE_DIR}/test_common.in ${CMAKE_BINARY_DIR}/test_common.sh @ONLY NEWLINE_STYLE LF) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/test_common.in ${CMAKE_BINARY_DIR}/test_common.sh @ONLY NEWLINE_STYLE LF) - + ##### # Build nc_test4/findplugin.sh ##### SET(ISCMAKE "1") -configure_file(${CMAKE_SOURCE_DIR}/nc_test4/findplugin.in ${CMAKE_BINARY_DIR}/nc_test4/findplugin.sh @ONLY NEWLINE_STYLE LF) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/nc_test4/findplugin.in ${CMAKE_BINARY_DIR}/nc_test4/findplugin.sh @ONLY NEWLINE_STYLE LF) - - + + #### @@ -1934,4 +1910,4 @@ install( - + # CPack inclusion must come last. # INCLUDE(CPack) -INCLUDE(CMakeInstallation.cmake) @@ -867,21 +867,21 @@ index 35be9ca461..9317c9a71f 100644 @@ -335,8 +335,8 @@ are set when opening a binary file on Windows. */ /* Define to 1 if you have the header file. */ #cmakedefine HAVE_SYS_TYPES_H 1 - + -/* Define to 1 if the system has the type `uchar'. */ -#cmakedefine HAVE_UCHAR 1 +/* Define to 1 if the system has the type `unsigned char'. */ +#cmakedefine HAVE_UNSIGNED_CHAR 1 - + /* Define to 1 if the system has the type `uint'. */ #cmakedefine HAVE_UINT 1 @@ -422,7 +422,7 @@ are set when opening a binary file on Windows. */ #cmakedefine SIZEOF_CHAR @SIZEOF_CHAR@ - + /* The size of `uchar` as computed by sizeof. */ -#cmakedefine SIZEOF_UCHAR @SIZEOF_UCHAR@ +#cmakedefine SIZEOF_UNSIGNED_CHAR @SIZEOF_UNSIGNED_CHAR@ - + /* The size of `__int64` found on Windows systems. */ #cmakedefine SIZEOF___INT64 ${SIZEOF___INT64} diff --git a/AmberTools/src/netcdf-4.6.1/config.h.in b/AmberTools/src/netcdf-4.6.1/config.h.in @@ -891,31 +891,31 @@ index d0d2fea38b..d5a8818bba 100644 @@ -256,8 +256,8 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H - + -/* Define to 1 if the system has the type `uchar'. */ -#undef HAVE_UCHAR +/* Define to 1 if the system has the type `unsigned char'. */ +#undef HAVE_UNSIGNED_CHAR - + /* Define to 1 if the system has the type `uint'. */ #undef HAVE_UINT @@ -365,9 +365,6 @@ /* The size of `ssize_t', as computed by sizeof. */ #undef SIZEOF_SSIZE_T - + -/* The size of `uchar', as computed by sizeof. */ -#undef SIZEOF_UCHAR - /* The size of `uint', as computed by sizeof. */ #undef SIZEOF_UINT - + diff --git a/AmberTools/src/netcdf-4.6.1/include/ncconfigure.h b/AmberTools/src/netcdf-4.6.1/include/ncconfigure.h index 0b20bb5f9b..8438dc96db 100644 --- a/AmberTools/src/netcdf-4.6.1/include/ncconfigure.h +++ b/AmberTools/src/netcdf-4.6.1/include/ncconfigure.h @@ -47,9 +47,9 @@ char *nulldup(const char* s); #endif - + #ifndef HAVE_STRLCAT -#ifdef _MSC_VER +#if defined(_MSC_VER) || defined(__MINGW32__) @@ -931,7 +931,7 @@ index 2a3cece0d5..516713a4ad 100644 +++ b/AmberTools/src/netcdf-4.6.1/libdispatch/dstring.c @@ -319,7 +319,8 @@ strdup(const char* s) */ - + #ifndef HAVE_STRLCAT -#ifndef _MSC_VER /* We will use strcat_s */ +#if !defined(_MSC_VER) && !defined(__MINGW32__) @@ -944,22 +944,22 @@ index 1afc85486c..f10ec6f2da 100644 --- a/AmberTools/src/netcdf-4.6.1/liblib/CMakeLists.txt +++ b/AmberTools/src/netcdf-4.6.1/liblib/CMakeLists.txt @@ -51,7 +51,11 @@ ENDIF() - + SET(TLL_LIBS "") - + -SET(TLL_LIBS ${TLL_LIBS} ${HAVE_LIBM} ${ZLIB_LIBRARY}) +SET(TLL_LIBS ${TLL_LIBS} ${ZLIB_LIBRARY}) + +if(libm_ENABLED) + list(APPEND TLL_LIBS libm) +endif() - + # Add extra dependencies specified via NC_EXTRA_DEPS SET(TLL_LIBS ${TLL_LIBS} ${EXTRA_DEPS}) @@ -117,6 +121,9 @@ IF(ENABLE_SHARED_LIBRARY_VERSION) ) ENDIF(ENABLE_SHARED_LIBRARY_VERSION) - + +# attach the NetCDF include directory to the NetCDF library +target_include_directories(netcdf INTERFACE $) + @@ -973,7 +973,7 @@ index 4dc6e1aae3..3119f0885c 100644 @@ -50,17 +50,3 @@ IF (BUILD_PARALLEL) SET(ARGS_MANPAGE ${ARGS_MANPAGE} -DPARALLEL_IO=TRUE) ENDIF(BUILD_PARALLEL) - + -# Generate the man page. -IF(HAVE_M4) - @@ -994,7 +994,7 @@ index 06943c5c87..e504dca909 100644 +++ b/AmberTools/src/netcdf-4.6.1/nc_test/CMakeLists.txt @@ -24,10 +24,11 @@ SET (nc_test_SRC ) - + ADD_EXECUTABLE(nc_test ${nc_test_SRC}) -TARGET_LINK_LIBRARIES(nc_test - netcdf @@ -1005,7 +1005,7 @@ index 06943c5c87..e504dca909 100644 +if(libm_ENABLED) + target_link_libraries(nc_test libm) +endif() - + # Some extra stand-alone tests SET(TESTS t_nc tst_small tst_misc tst_norm tst_names tst_nofill tst_nofill2 tst_nofill3 tst_meta tst_inq_type tst_utf8_validate tst_utf8_phrases tst_global_fillval tst_max_var_dims tst_formats tst_def_var_fill) diff --git a/AmberTools/src/pbsa/CMakeLists.txt b/AmberTools/src/pbsa/CMakeLists.txt @@ -1013,64 +1013,64 @@ index d271663bad..a37b0b140e 100644 --- a/AmberTools/src/pbsa/CMakeLists.txt +++ b/AmberTools/src/pbsa/CMakeLists.txt @@ -2,22 +2,22 @@ project(pbsa C Fortran) - - set(EXECUTABLE_SOURCES dsvdc.F90 pbsa.F90 pb_read.F90 pb_write.F90 getcoor.F90 - runmd.F90 runmin.F90 force.F90 pbsa_lib.F90 pb_init.F90 density.F90 np_force.F90 pb_force.F90 -- pb_p3m.F90 pb_fdfrc.F90 pb_crgview.F90 pb_fddrv.F90 pb_iimdrv.F90 pb_anaiim.F90 pb_nlsolver.F90 -+ pb_p3m.F90 pb_fdfrc.F90 pb_crgview.F90 pb_fddrv.F90 pb_anaiim.F90 pb_nhadrv.F90 pb_iimdrv.F90 pb_augdrv.F90 pb_nlsolver.F90 + + set(EXECUTABLE_SOURCES dsvdc.F90 pbsa.F90 pb_read.F90 pb_write.F90 getcoor.F90 + runmd.F90 runmin.F90 force.F90 pbsa_lib.F90 pb_init.F90 density.F90 np_force.F90 pb_force.F90 +- pb_p3m.F90 pb_fdfrc.F90 pb_crgview.F90 pb_fddrv.F90 pb_iimdrv.F90 pb_anaiim.F90 pb_nlsolver.F90 ++ pb_p3m.F90 pb_fdfrc.F90 pb_crgview.F90 pb_fddrv.F90 pb_anaiim.F90 pb_nhadrv.F90 pb_iimdrv.F90 pb_augdrv.F90 pb_nlsolver.F90 pb_bldsys.F90 pb_mpfrc.F90 pb_direct.F90 pb_list.F90 timer.F90 - egb.F90 ene.F90 locmem.F90 myopen.F90 rdparm.F90 pb_lsolver.F90 - decomp.F90 rgroup.F90 rfree.F90 debug.F90 - irre32.F90 phidev.F90 project.F90 qld.F90 - irre31.F90 miniop.F90 - transf.F90 curv.F90 GrToPr.F90 jumps.F90 + egb.F90 ene.F90 locmem.F90 myopen.F90 rdparm.F90 pb_lsolver.F90 + decomp.F90 rgroup.F90 rfree.F90 debug.F90 + irre32.F90 phidev.F90 project.F90 qld.F90 + irre31.F90 miniop.F90 + transf.F90 curv.F90 GrToPr.F90 jumps.F90 - regular.F90 gmres.F90 sa_driver.F90 -- daxpy.F90 ddot.F90 dheqr.F90 dpigmr.F90 dscal.F90 dslui2.F90 dxlcal.F90 -- dchkw.F90 dgmres.F90 dnrm2.F90 drlcal.F90 dsilus.F90 dslui.F90 isdgmr.F90 -- dcopy.F90 dhels.F90 dorth.F90 ds2y.F90 dslugm.F90 dsmv.F90 qs2i1d.F90 -- d1mach.F90 fdump.F90 i1mach.F90 j4save.F90 xercnt.F90 xerhlt.F90 xermsg.F90 -- xerprn.F90 xersve.F90 xgetua.F90 -- bicg.F90 dbcg.F90 dslui4.F90 dsluti.F90 dsmtv.F90 dslubc.F90 isdbcg.F90 +- daxpy.F90 ddot.F90 dheqr.F90 dpigmr.F90 dscal.F90 dslui2.F90 dxlcal.F90 +- dchkw.F90 dgmres.F90 dnrm2.F90 drlcal.F90 dsilus.F90 dslui.F90 isdgmr.F90 +- dcopy.F90 dhels.F90 dorth.F90 ds2y.F90 dslugm.F90 dsmv.F90 qs2i1d.F90 +- d1mach.F90 fdump.F90 i1mach.F90 j4save.F90 xercnt.F90 xerhlt.F90 xermsg.F90 +- xerprn.F90 xersve.F90 xgetua.F90 +- bicg.F90 dbcg.F90 dslui4.F90 dsluti.F90 dsmtv.F90 dslubc.F90 isdbcg.F90 + regular.F90 bicg.F90 gmres.F90 sa_driver.F90 -+ daxpy.F90 ddot.F90 dheqr.F90 dpigmr.F90 dxlcal.F90 -+ dchkw.F90 dgmres.F90 dnrm2.F90 drlcal.F90 isdgmr.F90 -+ dcopy.F90 dhels.F90 dorth.F90 -+ ds2y.F90 dscal.F90 dsilus.F90 dslugm.F90 dslui.F90 dslui2.F90 dsmv.F90 qs2i1d.F90 -+ d1mach.F90 fdump.F90 i1mach.F90 j4save.F90 xercnt.F90 xerhlt.F90 xermsg.F90 -+ xerprn.F90 xersve.F90 xgetua.F90 ++ daxpy.F90 ddot.F90 dheqr.F90 dpigmr.F90 dxlcal.F90 ++ dchkw.F90 dgmres.F90 dnrm2.F90 drlcal.F90 isdgmr.F90 ++ dcopy.F90 dhels.F90 dorth.F90 ++ ds2y.F90 dscal.F90 dsilus.F90 dslugm.F90 dslui.F90 dslui2.F90 dsmv.F90 qs2i1d.F90 ++ d1mach.F90 fdump.F90 i1mach.F90 j4save.F90 xercnt.F90 xerhlt.F90 xermsg.F90 ++ xerprn.F90 xersve.F90 xgetua.F90 pb_chkfrc.F90 svdcmp.F90 svbksb.F90 pythag.F90 -- pb_augdrv.F90 interpX.F90 gen_dx_file.F90 -+ interpX.F90 gen_dx_file.F90 +- pb_augdrv.F90 interpX.F90 gen_dx_file.F90 ++ interpX.F90 gen_dx_file.F90 parms.F90 memory_module.F90 rdpqr.F90) - + #sources for libpbsa @@ -42,8 +42,8 @@ set(SANDER_PBSA_SOURCES interpX.F90 np_force.F90 pb_fdfrc.F90 pb_force.F90 pb_i svbksb.F90 svdcmp.F90 transf.F90) - + # sources or libpbsa_cuda -set(PBSA_CUDA_CUDA_SOURCES cuda_cg_wrapper.cu cuda_mg_wrapper.cu) -set(PBSA_CUDA_CXX_SOURCES band2csr.cpp) +set(PBSA_CUDA_CUDA_SOURCES cusp_LinearSolvers.cu cusparse_LinearSolvers.cu cuda_pb.cu kLinearSolvers.cu cuda_LinearSolvers.cu) +set(PBSA_CUDA_CXX_SOURCES ) - + #------------------------------------------------------------------------------------------ - + @@ -133,7 +133,7 @@ if(CUDA) -DCUDA_MG) # [DCUDA_MG, NULL - for other CUDA solvers] - + cuda_add_executable(pbsa.cuda ${EXECUTABLE_SOURCES} ${PBSA_CUDA_CUDA_SOURCES} ${PBSA_CUDA_CXX_SOURCES} OPTIONS ${PBSA_CUDA_DEFINITIONS}) - target_link_libraries(pbsa.cuda cublas netlib amber_common netcdff netcdf) + target_link_libraries(pbsa.cuda cublas cusparse netlib amber_common netcdff netcdf) - + config_module_dirs(pbsa.cuda ${PBSAEXE_MOD_DIR} ${AMBER_COMMON_MOD_DIR}) - + @@ -141,7 +141,7 @@ if(CUDA) - target_compile_definitions(pbsa.cuda PRIVATE CUDA) - + target_compile_definitions(pbsa.cuda PRIVATE CUDA) + # it seems like CMake sometimes gets confused about which compiler to use for linking - set_property(TARGET pbsa.cuda PROPERTY LINKER_LANGUAGE Fortran) + set_property(TARGET pbsa.cuda PROPERTY LINKER_LANGUAGE CXX) - + install(TARGETS pbsa.cuda DESTINATION ${BINDIR} COMPONENT CUDA) endif() diff --git a/AmberTools/src/rism/CMakeLists.txt b/AmberTools/src/rism/CMakeLists.txt @@ -1078,9 +1078,9 @@ index 028d71cb4f..6838075447 100644 --- a/AmberTools/src/rism/CMakeLists.txt +++ b/AmberTools/src/rism/CMakeLists.txt @@ -47,6 +47,20 @@ set(RISM_INTERFACE_SOURCES amber_rism_interface.F90) - - apply_optimization_declarations(${RISM_LIB_SOURCES} ${RISM_MPI_SOURCES} ${RISM_THERMO_SOURCES} ${RISM_INTERFACE_SOURCES}) - + + apply_optimization_declarations(${RISM_LIB_SOURCES} ${RISM_MPI_SOURCES} ${RISM_THERMO_SOURCES} ${RISM_INTERFACE_SOURCES}) + +#--------------------------------------------------------------------------------------------------------------------------------------------------------------------- + +flex_target(rism_options_lex rism_options.l lex.rism.c) @@ -1095,22 +1095,22 @@ index 028d71cb4f..6838075447 100644 +if(NOT HAVE_GETLINE) + list(APPEND SINGLE_POINT_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/getline/getline.c) +endif() - + #--------------------------------------------------------------------------------------------------------------------------------------------------------------------- - + @@ -76,10 +90,17 @@ make_pic_if_needed(sff_rism_interface) - + # rism3d.snglpnt add_executable(rism3d.snglpnt ${SINGLE_POINT_SOURCES}) +add_dependencies(rism3d.snglpnt rism_lex) # make sure lexing is done first set_property(TARGET rism3d.snglpnt PROPERTY COMPILE_OPTIONS ${OPT_CFLAGS}) target_link_libraries(rism3d.snglpnt sff rism fftw netlib amber_common xblas) install(TARGETS rism3d.snglpnt DESTINATION ${BINDIR}) - + +if(NOT HAVE_GETLINE) + target_include_directories(rism3d.snglpnt PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/getline) + target_compile_definitions(rism3d.snglpnt PRIVATE USE_INTERNAL_GETLINE) -+ ++ +endif() + #rism 1D executable @@ -1196,7 +1196,7 @@ index 1167aead94..b98abe9228 100644 @@ -17,6 +17,10 @@ #include "../sff/sff.h" #include "../sff/timer.h" - + +#ifdef USE_INTERNAL_GETLINE +#include +#endif @@ -1211,19 +1211,19 @@ index b2f21d1b94..6bad31cb89 100644 @@ -26,9 +26,9 @@ set(LEXED_FILES_DIR "${CMAKE_BINARY_DIR}/AmberTools/src/sff") set(LEX_INTERMEDIATES_DIR "${LEXED_FILES_DIR}/intermediates") file(MAKE_DIRECTORY ${LEX_INTERMEDIATES_DIR}) - + -set(INTERMEDIATE_LEXED_FILE "${LEX_INTERMEDIATES_DIR}/yy.mm_options.c") +set(INTERMEDIATE_LEXED_FILE "${LEX_INTERMEDIATES_DIR}/yy.mmo.c") - + -set(FINAL_LEXED_FILE "${LEXED_FILES_DIR}/lex.mm_options.c") +set(FINAL_LEXED_FILE "${LEXED_FILES_DIR}/lex.mmo.c") - + flex_target(mm_options_lex mm_options.l ${INTERMEDIATE_LEXED_FILE} COMPILE_FLAGS -Pmmo) - + @@ -75,8 +75,6 @@ add_dependencies(sff sff_lex) make_pic_if_needed(sff) target_include_directories(sff INTERFACE .) - + - - #these files have alternate code (enabled with the SQM flag) for SANDER and SQM. @@ -1234,40 +1234,40 @@ index ec8a7d225b..0a26e6bc6c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -76,9 +76,6 @@ if(BUILD_HOST_TOOLS) #include only the couple of files needed for building the h - + include(AmberBuildSystem2ndInit) - + - # code for using built-in tools - include(byacc) - include(CppVectorGen) include(ExternalPrograms) - + @@ -98,8 +95,8 @@ if(BUILD_HOST_TOOLS) #include only the couple of files needed for building the h set(BUNDLE_SIGNATURE AMHT) include(Packaging) - + - # Tools we need to build: ucpp, byacc, rule_parse, nab2c, and utilMakeHelp - set(AMBER_TOOLS ucpp-1.3 byacc nab leap) + # Tools we need to build: ucpp, rule_parse, nab2c, and utilMakeHelp + set(AMBER_TOOLS ucpp-1.3 nab leap) - + else() #include all configuration segments - + @@ -112,7 +109,6 @@ else() #include all configuration segments - include(AmberBuildSystem2ndInit) - + include(AmberBuildSystem2ndInit) + # code for using built-in tools - include(byacc) include(nab) - + #configuration code @@ -130,7 +126,7 @@ else() #include all configuration segments - + # 3rd party tools # -------------------------------------------------------------------- -- set(REQUIRED_3RDPARTY_TOOLS ucpp byacc netcdf netcdf-fortran xblas zlib) -+ set(REQUIRED_3RDPARTY_TOOLS ucpp netcdf netcdf-fortran xblas zlib) +- set(REQUIRED_3RDPARTY_TOOLS ucpp byacc netcdf netcdf-fortran xblas zlib) ++ set(REQUIRED_3RDPARTY_TOOLS ucpp netcdf netcdf-fortran xblas zlib) if(USE_FFT) list(APPEND REQUIRED_3RDPARTY_TOOLS fftw) endif() @@ -1278,7 +1278,7 @@ index ec8a7d225b..0a26e6bc6c 100644 - set(BUNDLED_3RDPARTY_TOOLS blas lapack arpack byacc ucpp c9x-complex netcdf netcdf-fortran pnetcdf fftw readline xblas mpi4py perlmol) + set(BUNDLED_3RDPARTY_TOOLS blas lapack arpack ucpp c9x-complex netcdf netcdf-fortran pnetcdf fftw readline xblas mpi4py perlmol) include(3rdPartyTools) - + # -------------------------------------------------------------------- diff --git a/cmake/3rdPartyTools.cmake b/cmake/3rdPartyTools.cmake index fd6b060927..5ee0671364 100644 @@ -1287,30 +1287,30 @@ index fd6b060927..5ee0671364 100644 @@ -9,7 +9,6 @@ set(3RDPARTY_TOOLS blas lapack - arpack + arpack -byacc ucpp c9x-complex netcdf @@ -34,7 +33,6 @@ set(3RDPARTY_TOOL_USES - "for fundamental linear algebra calculations" - "for fundamental linear algebra calculations" - "for fundamental linear algebra calculations" --"for compiling Amber's yacc parsers" - "used as a preprocessor for the NAB compiler" - "used as a support library on systems that do not have C99 complex.h support" - "for creating trajectory data files" + "for fundamental linear algebra calculations" + "for fundamental linear algebra calculations" + "for fundamental linear algebra calculations" +-"for compiling Amber's yacc parsers" + "used as a preprocessor for the NAB compiler" + "used as a support library on systems that do not have C99 complex.h support" + "for creating trajectory data files" @@ -161,20 +159,6 @@ if(NEED_ucpp) endif() endif() - + -#------------------------------------------------------------------------------ -# check for byacc -# Amber needs Berkeley YACC. It will NOT build with GNU bison. -#------------------------------------------------------------------------------ -if(NEED_byacc) - find_program(BYACC_LOCATION byacc DOC "Path to a Berkeley YACC. GNU Bison will NOT work.") -- +- - if(${BYACC_LOCATION}) - set_3rdparty(byacc EXTERNAL) - else() @@ -1324,12 +1324,12 @@ index fd6b060927..5ee0671364 100644 @@ -688,15 +672,6 @@ elseif(ucpp_INTERNAL) list(APPEND 3RDPARTY_SUBDIRS ucpp-1.3) endif() - + -#------------------------------------------------------------------------------ -# byacc -#------------------------------------------------------------------------------ -if(byacc_EXTERNAL) -- import_executable(byacc ${UCPP_LOCATION}) +- import_executable(byacc ${UCPP_LOCATION}) -elseif(byacc_INTERNAL) - list(APPEND 3RDPARTY_SUBDIRS byacc) -endif() @@ -1340,95 +1340,124 @@ index fd6b060927..5ee0671364 100644 @@ -793,7 +768,7 @@ elseif(netcdf_INTERNAL) On cray systems you can usually load the system NetCDF with 'module load cray-netcdf' or 'module load netcdf'.") endif() - + - list(APPEND 3RDPARTY_SUBDIRS netcdf-4.3.0) + list(APPEND 3RDPARTY_SUBDIRS netcdf-4.6.1) endif() - + if(netcdf-fortran_EXTERNAL) +diff --git a/cmake/AmberBuildSystemInit.cmake b/cmake/AmberBuildSystemInit.cmake +index ebd71a869b..5f13a68cc8 100644 +--- a/cmake/AmberBuildSystemInit.cmake ++++ b/cmake/AmberBuildSystemInit.cmake +@@ -56,7 +56,7 @@ include(CMakeParseArguments) + include(Utils) + include(Shorthand) + include(ColorMessage) +-include(Policies) ++include(Policies NO_POLICY_SCOPE) + + # get install directories + include(InstallDirs) diff --git a/cmake/CompilerFlags.cmake b/cmake/CompilerFlags.cmake index 914eddbbb7..1a49da16a3 100644 --- a/cmake/CompilerFlags.cmake +++ b/cmake/CompilerFlags.cmake @@ -289,6 +289,11 @@ if("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "Intel") set(CMAKE_Fortran_FLAGS_DEBUG "-g -debug all") - + set(OPT_FFLAGS -ip -O3) -+ ++ + if("${CMAKE_Fortran_COMPILER_VERSION}" VERSION_EQUAL 18) + message(WARNING "Significant test failures were experienced with 2018 versions of Intel compilers! Workarounds for these known problems have been implemented. \ +However, we do not recommend building Amber with icc version 18. Versions 19, 17, and 16 are much more stable.") + endif() - + if(SSE) - + diff --git a/cmake/CudaConfig.cmake b/cmake/CudaConfig.cmake index 6ae0a65eb2..e091f86c2c 100644 --- a/cmake/CudaConfig.cmake +++ b/cmake/CudaConfig.cmake @@ -19,15 +19,10 @@ else() - + set(CUDA_HOST_COMPILER ${CMAKE_CXX_COMPILER}) - + - option(VOLTA "Build the CUDA version of pmemd with special optimizations for the Volta architecture (this will be deprecated as the optimizations become standardized in a later release)" FALSE) - if(VOLTA AND (${CUDA_VERSION} VERSION_LESS 9.0)) - message(FATAL_ERROR "Volta optimizations cannot be built with this CUDA version. Please disable the VOLTA option, or upgrade CUDA.") - endif() -- +- #Note at present we do not include SM3.5 or SM3.7 since they sometimes show performance #regressions over just using SM3.0. #SM7.0 = V100 and Volta Geforce / GTX Ampere? - set(SM70FLAGS -gencode arch=compute_60,code=sm_70) + set(SM70FLAGS -gencode arch=compute_70,code=sm_70) - #SM6.2 = ??? + #SM6.2 = ??? set(SM62FLAGS -gencode arch=compute_62,code=sm_62) #SM6.1 = GP106 = GTX-1070, GP104 = GTX-1080, GP102 = Titan-X[P] @@ -56,21 +51,14 @@ else() - + elseif(${CUDA_VERSION} VERSION_EQUAL 8.0) message(STATUS "Configuring CUDA for SM3.0, SM5.0, SM5.2, SM5.3, SM6.0, SM6.1 and SM6.2") - message(STATUS "BE AWARE: CUDA 8.0 does not support V100, Volta Gefore / GTX Ampere? or other Volta based GPUs.") + message(STATUS "BE AWARE: CUDA 8.0 does not support V100, GV100, Titan-V or later GPUs") list(APPEND CUDA_NVCC_FLAGS ${SM30FLAGS} ${SM50FLAGS} ${SM52FLAGS} ${SM53FLAGS} ${SM60FLAGS} ${SM61FLAGS} -Wno-deprecated-gpu-targets) - + - elseif((${CUDA_VERSION} VERSION_EQUAL 9.0) OR (${CUDA_VERSION} VERSION_EQUAL 9.1)) -- +- - if(VOLTA) - message(STATUS "Configuring for SM7.0 only with special optimizations") - list(APPEND CUDA_NVCC_FLAGS ${SM70FLAGS} -DVOLTAOPT) -- else() +- else() - message(STATUS "Configuring CUDA for SM3.0, SM5.0, SM5.2, SM5.3, SM6.0, SM6.1, and SM7.0") - list(APPEND CUDA_NVCC_FLAGS ${SM30FLAGS} ${SM50FLAGS} ${SM52FLAGS} ${SM53FLAGS} ${SM60FLAGS} ${SM61FLAGS} ${SM70FLAGS} -Wno-deprecated-gpu-targets) - endif() -- +- + elseif(((${CUDA_VERSION} VERSION_EQUAL 9.0) OR (${CUDA_VERSION} VERSION_GREATER 9.0)) AND (${CUDA_VERSION} VERSION_EQUAL 10.2 OR ${CUDA_VERSION} VERSION_LESS 10.2)) + message(STATUS "Configuring for SM3.0, SM3.5, SM3.7, SM5.0, SM5.2, SM5.3, SM6.0, SM6.1 and SM7.0") -+ list(APPEND CUDA_NVCC_FLAGS ${SM30FLAGS} ${SM50FLAGS} ${SM52FLAGS} ${SM53FLAGS} ${SM60FLAGS} ${SM61FLAGS} ${SM70FLAGS} -Wno-deprecated-gpu-targets -Wno-deprecated-declarations) ++ list(APPEND CUDA_NVCC_FLAGS ${SM30FLAGS} ${SM50FLAGS} ${SM52FLAGS} ${SM53FLAGS} ${SM60FLAGS} ${SM61FLAGS} ${SM70FLAGS} -Wno-deprecated-gpu-targets -Wno-deprecated-declarations) else() - message(FATAL_ERROR "Error: Unsupported CUDA version. AMBER requires CUDA version >= 7.5. + message(FATAL_ERROR "Error: Unsupported CUDA version. AMBER requires CUDA version >= 7.5 and <= 10.2. Please upgrade your CUDA installation or disable building with CUDA.") endif() - + @@ -85,6 +73,7 @@ else() import_libraries(cufft LIBRARIES ${CUDA_CUFFT_LIBRARIES}) - + import_library(curand ${CUDA_curand_LIBRARY}) + import_library(cusparse ${CUDA_cusparse_LIBRARY}) - + # Before CMake 3.7, FindCUDA did not automatically link libcudadevrt, as is required for seperable compilation. # Finder code copied from here: https://github.com/Kitware/CMake/commit/891e0ebdcea547b10689eee9fd008a27e4afd3b9 +diff --git a/cmake/ExternalPrograms.cmake b/cmake/ExternalPrograms.cmake +index 5ee53798be..52038903f5 100644 +--- a/cmake/ExternalPrograms.cmake ++++ b/cmake/ExternalPrograms.cmake +@@ -17,6 +17,11 @@ find_program(M4 m4) + #------------------------------------------------------------------------------ + find_package(FLEX REQUIRED) + ++#------------------------------------------------------------------------------ ++# Bison ++#------------------------------------------------------------------------------ ++find_package(BISON REQUIRED) ++ + #------------------------------------------------------------------------------ + # bash, for running shell scripts + #------------------------------------------------------------------------------ diff --git a/cmake/FixCondaShebang/CMakeLists.txt b/cmake/FixCondaShebang/CMakeLists.txt index 32a2a7fbc7..83ff55672c 100644 --- a/cmake/FixCondaShebang/CMakeLists.txt +++ b/cmake/FixCondaShebang/CMakeLists.txt @@ -2,7 +2,7 @@ - + # The Miniconda shebang fixer script neds to run after all other install rules. # Unfortuantely, CMake does not have any way to make a custom install rule be installed after subdirectories. -# So, this is a dummy subdirectory for CMake to process as the last to-level subdirectory. +# So, this is a dummy subdirectory for CMake to process as the last top-level subdirectory. - + # All we have to do is # create an install rule to invoke FixCondaShebang.cmake diff --git a/cmake/PMEMDCompilerFlags.cmake b/cmake/PMEMDCompilerFlags.cmake @@ -1438,12 +1467,25 @@ index 9d9fa81f08..7c24005b79 100644 @@ -40,7 +40,7 @@ set(EMIL_MIC_FLAGS "") # and a new pmemd. executable will be created #------------------------------------------------------------------------------- - + -set(PMEMD_CUDA_PRECISIONS SPFP DPFP SPXP) +set(PMEMD_CUDA_PRECISIONS SPFP DPFP) - + #precision of pmemd which gets installed as pmemd.cuda set(PMEMD_DEFAULT_PRECISION SPFP) +diff --git a/cmake/PythonInterpreterConfig.cmake b/cmake/PythonInterpreterConfig.cmake +index 57843ab1bf..be5c725a27 100644 +--- a/cmake/PythonInterpreterConfig.cmake ++++ b/cmake/PythonInterpreterConfig.cmake +@@ -50,7 +50,7 @@ if(DOWNLOAD_MINICONDA) + unset(ENV{_CONDA_PYTHON2}) + endif() + +- set(MINICONDA_VERSION 4.3.21) ++ set(MINICONDA_VERSION 4.5.11) + option(MINICONDA_USE_PY3 "If true, Amber will download a Python 3 miniconda when DOWNLOAD_MINICONDA is enabled. Otherwise, Python 2.7 Miniconda will get downloaded." FALSE) + + include(UseMiniconda) diff --git a/cmake/Replace.cmake b/cmake/Replace.cmake index 64122f9167..0f52af02e1 100644 --- a/cmake/Replace.cmake @@ -1454,21 +1496,21 @@ index 64122f9167..0f52af02e1 100644 COMMAND ${CMAKE_COMMAND} -DTO_REPLACE=${REPLACE_TO_REPLACE} -DREPLACEMENT=${REPLACE_REPLACEMENT} -DINPUTFILE=${INPUTFILE} -DOUTPUTFILE=${OUTPUTFILE} -P ${CMAKE_SOURCE_DIR}/cmake/Replace-runtime.cmake VERBATIM + COMMENT "Processing ${INPUTFILE} to ${OUTPUTFILE}" DEPENDS ${INPUTFILE}) - - + + diff --git a/cmake/RunnablePrograms.cmake b/cmake/RunnablePrograms.cmake index 6fea4aa610..436494236a 100644 --- a/cmake/RunnablePrograms.cmake +++ b/cmake/RunnablePrograms.cmake @@ -3,7 +3,7 @@ - + # Must be included after MPIConfig - + -set(EXECUTABLES_TO_IMPORT byacc ucpp utilMakeHelp nab2c mpinab2c rule_parse) +set(EXECUTABLES_TO_IMPORT ucpp utilMakeHelp nab2c mpinab2c rule_parse) - - set(EXECUTABLES_TO_IMPORT_REQUIRED TRUE TRUE TRUE TRUE ${MPI} TRUE) # true if the corresponding executable is needed to build Amber - + + set(EXECUTABLES_TO_IMPORT_REQUIRED TRUE TRUE TRUE TRUE ${MPI} TRUE) # true if the corresponding executable is needed to build Amber + diff --git a/cmake/UseMiniconda.cmake b/cmake/UseMiniconda.cmake index 73e9989ff2..fe10b0bec5 100644 --- a/cmake/UseMiniconda.cmake @@ -1476,7 +1518,7 @@ index 73e9989ff2..fe10b0bec5 100644 @@ -154,7 +154,7 @@ function(download_and_use_miniconda) execute_process(COMMAND ${CONDA} install -y nomkl) endif() - + - execute_process(COMMAND ${CONDA} install -y conda-build numpy scipy cython=0.25 ipython notebook pytest RESULT_VARIABLE PACKAGE_INSTALL_RETVAL) + execute_process(COMMAND ${CONDA} install -y -q conda-build numpy scipy cython=0.25 ipython notebook pytest RESULT_VARIABLE PACKAGE_INSTALL_RETVAL) if(NOT ${PACKAGE_INSTALL_RETVAL} EQUAL 0) @@ -1502,7 +1544,7 @@ index 28db4230ca..0000000000 -macro(byacc_target NAME INPUT OUTPUT_DIR) - set(BYACC_TARGET_output_header "") - set(BYACC_TARGET_cmdopt "") -- +- - cmake_parse_arguments( - BYACC_TARGET_ARG - GENERATE_HEADER @@ -1513,24 +1555,24 @@ index 28db4230ca..0000000000 - if(NOT "${BYACC_TARGET_ARG_UNPARSED_ARGUMENTS}" STREQUAL "") - message(SEND_ERROR "Incorrect Usage") - else() -- +- - if(NOT "${BYACC_TARGET_ARG_COMPILE_FLAGS}" STREQUAL "") - list(APPEND BYACC_TARGET_cmdopt ${BYACC_TARGET_ARG_COMPILE_FLAGS}) - endif() -- +- - if("${BYACC_TARGET_ARG_FILE_PREFIX}" STREQUAL "") -- set(BYACC_TARGET_ARG_FILE_PREFIX y) +- set(BYACC_TARGET_ARG_FILE_PREFIX y) - else() - list(APPEND BYACC_TARGET_cmdopt -b ${BYACC_TARGET_ARG_FILE_PREFIX}) - endif() -- +- - set(BYACC_TARGET_outputs ${OUTPUT_DIR}/${BYACC_TARGET_ARG_FILE_PREFIX}.tab.c) -- +- - if(${BYACC_TARGET_ARG_GENERATE_HEADER}) - list(APPEND BYACC_TARGET_cmdopt -d) - list(APPEND BYACC_TARGET_outputs ${OUTPUT_DIR}/${BYACC_TARGET_ARG_FILE_PREFIX}.tab.h) - endif() -- +- - add_custom_command(OUTPUT ${BYACC_TARGET_outputs} - COMMAND ${RUNNABLE_byacc} ${BYACC_TARGET_cmdopt} ${CMAKE_CURRENT_SOURCE_DIR}/${INPUT} - VERBATIM @@ -1549,3 +1591,4 @@ index 28db4230ca..0000000000 - - endif() -endmacro() + From 9253b1de9c8d92564ad7bba83b157efb735e9cb4 Mon Sep 17 00:00:00 2001 From: Jaime RGP Date: Mon, 6 Jan 2020 22:02:55 +0100 Subject: [PATCH 37/52] Try patching manually again --- recipe/build.sh | 8 +++++--- recipe/meta.yaml | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/recipe/build.sh b/recipe/build.sh index 5bcfd1cb..9cfa1d6f 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -1,5 +1,10 @@ set -euxo pipefail +# Patch manually to avoid issues with newlines +sed -i 's/\r$//g' ${RECIPE_DIR}/patches/amber19-fix-cmake.patch \ + ${SRC_DIR}/cmake/*.cmake +patch -p1 --ignore-whitespace -t -i ${RECIPE_DIR}/patches/amber19-fix-cmake.patch || true + # Upgrade AmberTools source to the patch level specified by the MINOR version in $PKG_VERSION for n in {1..5}; do export PATCH_LEVEL=$(echo $PKG_VERSION | cut -d. -f2) @@ -7,9 +12,6 @@ for n in {1..5}; do ./update_amber --update-to=AmberTools.${PATCH_LEVEL} && break done -# Patch manually (errors seem to be unimportant) -# patch -p1 --ignore-whitespace -t -i ${RECIPE_DIR}/patches/amber19-fix-cmake.patch || true - # Build AmberTools with cmake mkdir build cd build diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 906fe95b..15fc61f1 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -10,8 +10,8 @@ package: source: url: https://ambermd.org/downloads/AmberTools19.tar.bz2 sha256: 0c86937904854b64e4831e047851f504ec45b42e593db4ded92c1bee5973e699 - patches: - - patches/amber19-fix-cmake.patch + # patches: + # - patches/amber19-fix-cmake.patch build: number: 1 From 96d6d2d32072b394feb10d912622d336052af54c Mon Sep 17 00:00:00 2001 From: Jaime RGP Date: Mon, 6 Jan 2020 22:16:47 +0100 Subject: [PATCH 38/52] Patch in recipe is read-only; create copy --- recipe/build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipe/build.sh b/recipe/build.sh index 9cfa1d6f..87a24176 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -1,9 +1,9 @@ set -euxo pipefail # Patch manually to avoid issues with newlines -sed -i 's/\r$//g' ${RECIPE_DIR}/patches/amber19-fix-cmake.patch \ - ${SRC_DIR}/cmake/*.cmake -patch -p1 --ignore-whitespace -t -i ${RECIPE_DIR}/patches/amber19-fix-cmake.patch || true +sed 's/\r$//g' ${RECIPE_DIR}/patches/amber19-fix-cmake.patch > amber19-fix-cmake.patch +sed -i 's/\r$//g' ${SRC_DIR}/cmake/*.cmake +patch -p1 --ignore-whitespace -t -i amber19-fix-cmake.patch || true # Upgrade AmberTools source to the patch level specified by the MINOR version in $PKG_VERSION for n in {1..5}; do From 47b028eaed117278c45b22cb5145d6d76ea78bd2 Mon Sep 17 00:00:00 2001 From: Jaime RGP Date: Mon, 6 Jan 2020 23:17:32 +0100 Subject: [PATCH 39/52] Try to fix missing file error --- recipe/build.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipe/build.sh b/recipe/build.sh index 87a24176..be30a2f1 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -31,3 +31,6 @@ cp ${RECIPE_DIR}/activate.sh ${PREFIX}/etc/conda/activate.d/ambertools.sh cp ${RECIPE_DIR}/activate.fish ${PREFIX}/etc/conda/activate.d/ambertools.fish cp ${RECIPE_DIR}/deactivate.sh ${PREFIX}/etc/conda/deactivate.d/ambertools.sh cp ${RECIPE_DIR}/deactivate.fish ${PREFIX}/etc/conda/deactivate.d/ambertools.fish + +# Fix missing file +cp dat/leap/cmd/leaprc.protein.ff12pol ${PREFIX}/dat/leap/cmd/leaprc.protein.ff12pol || true \ No newline at end of file From f57ef15e22dcfbca00e3b125028ab82f2ec52c55 Mon Sep 17 00:00:00 2001 From: Jaime RGP Date: Mon, 6 Jan 2020 23:18:01 +0100 Subject: [PATCH 40/52] Patch use of /opt/conda --- recipe/meta.yaml | 3 ++- .../patches/do_not_use_global_conda_prefix.patch | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 recipe/patches/do_not_use_global_conda_prefix.patch diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 15fc61f1..bb4277f7 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -10,7 +10,8 @@ package: source: url: https://ambermd.org/downloads/AmberTools19.tar.bz2 sha256: 0c86937904854b64e4831e047851f504ec45b42e593db4ded92c1bee5973e699 - # patches: + patches: + - patches/do_not_use_global_conda_prefix.patch # - patches/amber19-fix-cmake.patch build: diff --git a/recipe/patches/do_not_use_global_conda_prefix.patch b/recipe/patches/do_not_use_global_conda_prefix.patch new file mode 100644 index 00000000..473093cd --- /dev/null +++ b/recipe/patches/do_not_use_global_conda_prefix.patch @@ -0,0 +1,15 @@ +diff --git a/cmake/PythonInterpreterConfig.cmake b/cmake/PythonInterpreterConfig.cmake +index 57843ab1..94300e9e 100644 +--- a/cmake/PythonInterpreterConfig.cmake ++++ b/cmake/PythonInterpreterConfig.cmake +@@ -86,8 +86,8 @@ To change the Python interpreter in use to a different one inside Anaconda, set + set(CMAKE_INCLUDE_PATH_NO_ANACONDA ${CMAKE_INCLUDE_PATH}) + set(CMAKE_PROGRAM_PATH_NO_ANACONDA ${CMAKE_PROGRAM_PATH}) + +- list(APPEND CMAKE_LIBRARY_PATH "${ANACONDA_ROOT}/lib") +- list(APPEND CMAKE_INCLUDE_PATH "${ANACONDA_ROOT}/include") ++ # list(APPEND CMAKE_LIBRARY_PATH "${ANACONDA_ROOT}/lib") ++ # list(APPEND CMAKE_INCLUDE_PATH "${ANACONDA_ROOT}/include") + list(APPEND CMAKE_PROGRAM_PATH "${ANACONDA_BIN}") + + set(CMAKE_LIBRARY_PATH_ANACONDA ${CMAKE_LIBRARY_PATH}) From 81503507bfc8cdabf85485d7ef8162996d1f5ae0 Mon Sep 17 00:00:00 2001 From: Jaime RGP Date: Tue, 7 Jan 2020 11:03:43 +0100 Subject: [PATCH 41/52] Patch ff12pol symlink error --- recipe/meta.yaml | 4 +++- .../patches/do_not_symlink_missing_ff12pol.patch | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 recipe/patches/do_not_symlink_missing_ff12pol.patch diff --git a/recipe/meta.yaml b/recipe/meta.yaml index bb4277f7..4d65f398 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -12,7 +12,9 @@ source: sha256: 0c86937904854b64e4831e047851f504ec45b42e593db4ded92c1bee5973e699 patches: - patches/do_not_use_global_conda_prefix.patch - # - patches/amber19-fix-cmake.patch + - patches/do_not_symlink_missing_ff12pol.patch + # this one has to be applied manually in build.sh + # - patches/amber19-fix-cmake.patch build: number: 1 diff --git a/recipe/patches/do_not_symlink_missing_ff12pol.patch b/recipe/patches/do_not_symlink_missing_ff12pol.patch new file mode 100644 index 00000000..bb67eb4c --- /dev/null +++ b/recipe/patches/do_not_symlink_missing_ff12pol.patch @@ -0,0 +1,14 @@ +diff --git a/dat/CMakeLists.txt b/dat/CMakeLists.txt +index ecfc5514..a822db5b 100644 +--- a/dat/CMakeLists.txt ++++ b/dat/CMakeLists.txt +@@ -3,6 +3,6 @@ + + install(DIRECTORY . USE_SOURCE_PERMISSIONS DESTINATION ${DATADIR} COMPONENT Data) + +-if(NOT (HOST_WINDOWS OR TARGET_WINDOWS)) +- installtime_create_symlink(${CMAKE_INSTALL_POSTFIX}dat/leap/cmd/leaprc.protein.ff12polL ${CMAKE_INSTALL_POSTFIX}dat/leap/cmd/leaprc.protein.ff12pol Data) +-endif() ++# if(NOT (HOST_WINDOWS OR TARGET_WINDOWS)) ++# installtime_create_symlink(${CMAKE_INSTALL_POSTFIX}dat/leap/cmd/leaprc.protein.ff12polL ${CMAKE_INSTALL_POSTFIX}dat/leap/cmd/leaprc.protein.ff12pol Data) ++# endif() From 321e67b26e0e06e247d7eeb48fcb5beceb6ebcac Mon Sep 17 00:00:00 2001 From: Jaime RGP Date: Tue, 7 Jan 2020 11:03:54 +0100 Subject: [PATCH 42/52] Patch cmake after AmberTools updates --- recipe/build.sh | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/recipe/build.sh b/recipe/build.sh index be30a2f1..585d74c3 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -1,10 +1,5 @@ set -euxo pipefail -# Patch manually to avoid issues with newlines -sed 's/\r$//g' ${RECIPE_DIR}/patches/amber19-fix-cmake.patch > amber19-fix-cmake.patch -sed -i 's/\r$//g' ${SRC_DIR}/cmake/*.cmake -patch -p1 --ignore-whitespace -t -i amber19-fix-cmake.patch || true - # Upgrade AmberTools source to the patch level specified by the MINOR version in $PKG_VERSION for n in {1..5}; do export PATCH_LEVEL=$(echo $PKG_VERSION | cut -d. -f2) @@ -12,6 +7,11 @@ for n in {1..5}; do ./update_amber --update-to=AmberTools.${PATCH_LEVEL} && break done +# Patch manually to avoid issues with newlines +sed 's/\r$//g' ${RECIPE_DIR}/patches/amber19-fix-cmake.patch > amber19-fix-cmake.patch +sed -i 's/\r$//g' ${SRC_DIR}/cmake/*.cmake +patch -p1 --ignore-whitespace -t -i amber19-fix-cmake.patch || true + # Build AmberTools with cmake mkdir build cd build @@ -31,6 +31,3 @@ cp ${RECIPE_DIR}/activate.sh ${PREFIX}/etc/conda/activate.d/ambertools.sh cp ${RECIPE_DIR}/activate.fish ${PREFIX}/etc/conda/activate.d/ambertools.fish cp ${RECIPE_DIR}/deactivate.sh ${PREFIX}/etc/conda/deactivate.d/ambertools.sh cp ${RECIPE_DIR}/deactivate.fish ${PREFIX}/etc/conda/deactivate.d/ambertools.fish - -# Fix missing file -cp dat/leap/cmd/leaprc.protein.ff12pol ${PREFIX}/dat/leap/cmd/leaprc.protein.ff12pol || true \ No newline at end of file From 56d867b59467113db8bbba782664de3f541c925f Mon Sep 17 00:00:00 2001 From: Jaime RGP Date: Tue, 7 Jan 2020 16:03:15 +0100 Subject: [PATCH 43/52] Use external netcdf/netcdf-fortran and enable xleap --- recipe/build.sh | 2 +- recipe/meta.yaml | 1 + recipe/patches/use_external_netcdf.patch | 13 +++++++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 recipe/patches/use_external_netcdf.patch diff --git a/recipe/build.sh b/recipe/build.sh index 585d74c3..d5b81649 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -20,8 +20,8 @@ cmake ${SRC_DIR} \ -DCOMPILER=MANUAL \ -DPYTHON_EXECUTABLE=${PYTHON} \ -DDOWNLOAD_MINICONDA=FALSE \ + -DBUILD_GUI=TRUE \ -DCHECK_UPDATES=FALSE -# -DFORCE_EXTERNAL_LIBS="netcdf;netcdf-fortran" make && make install diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 4d65f398..0b0a2e67 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -13,6 +13,7 @@ source: patches: - patches/do_not_use_global_conda_prefix.patch - patches/do_not_symlink_missing_ff12pol.patch + - patches/use_external_netcdf.patch # this one has to be applied manually in build.sh # - patches/amber19-fix-cmake.patch diff --git a/recipe/patches/use_external_netcdf.patch b/recipe/patches/use_external_netcdf.patch new file mode 100644 index 00000000..d9b8acc9 --- /dev/null +++ b/recipe/patches/use_external_netcdf.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ec8a7d22..286883fa 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -138,7 +138,7 @@ else() #include all configuration segments + # whether blas and lapack are required + set(LINALG_LIBS_REQUIRED TRUE) + # programs where INTERNAL is a valid status +- set(BUNDLED_3RDPARTY_TOOLS blas lapack arpack byacc ucpp c9x-complex netcdf netcdf-fortran pnetcdf fftw readline xblas mpi4py perlmol) ++ set(BUNDLED_3RDPARTY_TOOLS blas lapack arpack byacc ucpp c9x-complex fftw readline xblas mpi4py perlmol) + include(3rdPartyTools) + + # -------------------------------------------------------------------- From 88f061bb4854613386eff49dc2ae2a28123f675f Mon Sep 17 00:00:00 2001 From: Jaime RGP Date: Tue, 7 Jan 2020 17:13:57 +0100 Subject: [PATCH 44/52] Enable OSX --- recipe/meta.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 0b0a2e67..104a559a 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -14,12 +14,14 @@ source: - patches/do_not_use_global_conda_prefix.patch - patches/do_not_symlink_missing_ff12pol.patch - patches/use_external_netcdf.patch - # this one has to be applied manually in build.sh + # The following patch was downloaded from this GH issue: + # https://github.com/Amber-MD/cmake-buildscripts/issues/131#issuecomment-561280272 + # It needs to be applied manually in build.sh # - patches/amber19-fix-cmake.patch build: number: 1 - skip: True # [win or osx or py2k] + skip: True # [win or py2k] requirements: build: From e431102b9c3ad67e5221555d2da3d1d0092f238d Mon Sep 17 00:00:00 2001 From: Simon Bray Date: Tue, 7 Jan 2020 17:36:07 +0100 Subject: [PATCH 45/52] MNT: Re-rendered with conda-build 3.18.11, conda-smithy 3.6.5, and conda-forge-pinning 2020.01.06 --- .azure-pipelines/azure-pipelines-osx.yml | 18 +++---- .ci_support/osx_python3.6.yaml | 62 ++++++++++++++++++++++++ .ci_support/osx_python3.7.yaml | 62 ++++++++++++++++++++++++ .ci_support/osx_python3.8.yaml | 62 ++++++++++++++++++++++++ README.md | 27 ++++++++--- azure-pipelines.yml | 3 +- 6 files changed, 217 insertions(+), 17 deletions(-) create mode 100644 .ci_support/osx_python3.6.yaml create mode 100644 .ci_support/osx_python3.7.yaml create mode 100644 .ci_support/osx_python3.8.yaml diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml index 91ddbdd6..776c7669 100755 --- a/.azure-pipelines/azure-pipelines-osx.yml +++ b/.azure-pipelines/azure-pipelines-osx.yml @@ -10,17 +10,14 @@ jobs: strategy: maxParallel: 8 matrix: - osx_fortran_compiler_version4python3.6: - CONFIG: osx_fortran_compiler_version4python3.6 + osx_python3.6: + CONFIG: osx_python3.6 UPLOAD_PACKAGES: True - osx_fortran_compiler_version4python3.7: - CONFIG: osx_fortran_compiler_version4python3.7 + osx_python3.7: + CONFIG: osx_python3.7 UPLOAD_PACKAGES: True - osx_fortran_compiler_version7python3.6: - CONFIG: osx_fortran_compiler_version7python3.6 - UPLOAD_PACKAGES: True - osx_fortran_compiler_version7python3.7: - CONFIG: osx_fortran_compiler_version7python3.7 + osx_python3.8: + CONFIG: osx_python3.8 UPLOAD_PACKAGES: True steps: @@ -77,8 +74,9 @@ jobs: - script: | source activate base + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME upload_package ./ ./recipe ./.ci_support/${CONFIG}.yaml - displayName: Upload recipe + displayName: Upload package env: BINSTAR_TOKEN: $(BINSTAR_TOKEN) condition: not(eq(variables['UPLOAD_PACKAGES'], 'False')) \ No newline at end of file diff --git a/.ci_support/osx_python3.6.yaml b/.ci_support/osx_python3.6.yaml new file mode 100644 index 00000000..a244df9c --- /dev/null +++ b/.ci_support/osx_python3.6.yaml @@ -0,0 +1,62 @@ +MACOSX_DEPLOYMENT_TARGET: +- '10.9' +boost_cpp: +- 1.70.0 +bzip2: +- '1' +c_compiler: +- clang +c_compiler_version: +- '9' +channel_sources: +- conda-forge,defaults +channel_targets: +- conda-forge main +cxx_compiler: +- clangxx +cxx_compiler_version: +- '9' +fftw: +- '3' +fortran_compiler: +- gfortran +fortran_compiler_version: +- '7' +liblapack: +- 3.8.0 *netlib +libnetcdf: +- 4.7.3 +macos_machine: +- x86_64-apple-darwin13.4.0 +macos_min_version: +- '10.9' +netcdf_fortran: +- '4.5' +numpy: +- '1.14' +perl: +- 5.26.2 +pin_run_as_build: + boost-cpp: + max_pin: x.x.x + bzip2: + max_pin: x + fftw: + max_pin: x + netcdf-fortran: + max_pin: x.x + perl: + max_pin: x.x.x + python: + min_pin: x.x + max_pin: x.x + readline: + max_pin: x + zlib: + max_pin: x.x +python: +- '3.6' +readline: +- '8.0' +zlib: +- '1.2' diff --git a/.ci_support/osx_python3.7.yaml b/.ci_support/osx_python3.7.yaml new file mode 100644 index 00000000..67b052d4 --- /dev/null +++ b/.ci_support/osx_python3.7.yaml @@ -0,0 +1,62 @@ +MACOSX_DEPLOYMENT_TARGET: +- '10.9' +boost_cpp: +- 1.70.0 +bzip2: +- '1' +c_compiler: +- clang +c_compiler_version: +- '9' +channel_sources: +- conda-forge,defaults +channel_targets: +- conda-forge main +cxx_compiler: +- clangxx +cxx_compiler_version: +- '9' +fftw: +- '3' +fortran_compiler: +- gfortran +fortran_compiler_version: +- '7' +liblapack: +- 3.8.0 *netlib +libnetcdf: +- 4.7.3 +macos_machine: +- x86_64-apple-darwin13.4.0 +macos_min_version: +- '10.9' +netcdf_fortran: +- '4.5' +numpy: +- '1.14' +perl: +- 5.26.2 +pin_run_as_build: + boost-cpp: + max_pin: x.x.x + bzip2: + max_pin: x + fftw: + max_pin: x + netcdf-fortran: + max_pin: x.x + perl: + max_pin: x.x.x + python: + min_pin: x.x + max_pin: x.x + readline: + max_pin: x + zlib: + max_pin: x.x +python: +- '3.7' +readline: +- '8.0' +zlib: +- '1.2' diff --git a/.ci_support/osx_python3.8.yaml b/.ci_support/osx_python3.8.yaml new file mode 100644 index 00000000..25380831 --- /dev/null +++ b/.ci_support/osx_python3.8.yaml @@ -0,0 +1,62 @@ +MACOSX_DEPLOYMENT_TARGET: +- '10.9' +boost_cpp: +- 1.70.0 +bzip2: +- '1' +c_compiler: +- clang +c_compiler_version: +- '9' +channel_sources: +- conda-forge,defaults +channel_targets: +- conda-forge main +cxx_compiler: +- clangxx +cxx_compiler_version: +- '9' +fftw: +- '3' +fortran_compiler: +- gfortran +fortran_compiler_version: +- '7' +liblapack: +- 3.8.0 *netlib +libnetcdf: +- 4.7.3 +macos_machine: +- x86_64-apple-darwin13.4.0 +macos_min_version: +- '10.9' +netcdf_fortran: +- '4.5' +numpy: +- '1.14' +perl: +- 5.26.2 +pin_run_as_build: + boost-cpp: + max_pin: x.x.x + bzip2: + max_pin: x + fftw: + max_pin: x + netcdf-fortran: + max_pin: x.x + perl: + max_pin: x.x.x + python: + min_pin: x.x + max_pin: x.x + readline: + max_pin: x + zlib: + max_pin: x.x +python: +- '3.8' +readline: +- '8.0' +zlib: +- '1.2' diff --git a/README.md b/README.md index cfa819bf..866e3fba 100644 --- a/README.md +++ b/README.md @@ -82,18 +82,33 @@ Current build status variant + + osx_python3.6 + + + variant + + + + osx_python3.7 + + + variant + + + + osx_python3.8 + + + variant + + - - OSX - - OSX disabled - - Windows diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ad85a2cc..33a441c1 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -3,4 +3,5 @@ # -*- mode: yaml -*- jobs: - - template: ./.azure-pipelines/azure-pipelines-linux.yml \ No newline at end of file + - template: ./.azure-pipelines/azure-pipelines-linux.yml + - template: ./.azure-pipelines/azure-pipelines-osx.yml \ No newline at end of file From 327a09a34fffc2847098fd172f6373a9e8032af7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20Rodr=C3=ADguez-Guerra?= Date: Tue, 7 Jan 2020 18:37:50 +0100 Subject: [PATCH 46/52] Fix sed for macos --- recipe/build.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/recipe/build.sh b/recipe/build.sh index d5b81649..02f17335 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -8,8 +8,15 @@ for n in {1..5}; do done # Patch manually to avoid issues with newlines -sed 's/\r$//g' ${RECIPE_DIR}/patches/amber19-fix-cmake.patch > amber19-fix-cmake.patch -sed -i 's/\r$//g' ${SRC_DIR}/cmake/*.cmake +if [[ $target_plaform == linux* ]]; then + sed 's/\r$//g' ${RECIPE_DIR}/patches/amber19-fix-cmake.patch > amber19-fix-cmake.patch + sed -i 's/\r$//g' ${SRC_DIR}/cmake/*.cmake +fi +if [[ $target_plaform == osx* ]]; then + sed -i.bak $'s/\r//' ${RECIPE_DIR}/patches/amber19-fix-cmake.patch > amber19-fix-cmake.patch + + sed -i.bak $'s/\r//' ${SRC_DIR}/cmake/*.cmake +fi patch -p1 --ignore-whitespace -t -i amber19-fix-cmake.patch || true # Build AmberTools with cmake From 46b7fe7abd1ff8fbec4bf57365c4282f734ee2be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20Rodr=C3=ADguez-Guerra?= Date: Tue, 7 Jan 2020 19:07:46 +0100 Subject: [PATCH 47/52] Fix typo in build.sh --- recipe/build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipe/build.sh b/recipe/build.sh index 02f17335..3380e6f2 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -8,11 +8,11 @@ for n in {1..5}; do done # Patch manually to avoid issues with newlines -if [[ $target_plaform == linux* ]]; then +if [[ $target_platform == linux* ]]; then sed 's/\r$//g' ${RECIPE_DIR}/patches/amber19-fix-cmake.patch > amber19-fix-cmake.patch sed -i 's/\r$//g' ${SRC_DIR}/cmake/*.cmake fi -if [[ $target_plaform == osx* ]]; then +if [[ $target_platform == osx* ]]; then sed -i.bak $'s/\r//' ${RECIPE_DIR}/patches/amber19-fix-cmake.patch > amber19-fix-cmake.patch sed -i.bak $'s/\r//' ${SRC_DIR}/cmake/*.cmake From aa981eb0b01b3e81abb5377cb2ca6252a1700a10 Mon Sep 17 00:00:00 2001 From: Jaime RGP Date: Wed, 8 Jan 2020 10:15:49 +0100 Subject: [PATCH 48/52] User perl as dos2unix replacement since it's multiplatform and it's already a build requirement --- recipe/build.sh | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/recipe/build.sh b/recipe/build.sh index 3380e6f2..ae208f6a 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -8,15 +8,8 @@ for n in {1..5}; do done # Patch manually to avoid issues with newlines -if [[ $target_platform == linux* ]]; then - sed 's/\r$//g' ${RECIPE_DIR}/patches/amber19-fix-cmake.patch > amber19-fix-cmake.patch - sed -i 's/\r$//g' ${SRC_DIR}/cmake/*.cmake -fi -if [[ $target_platform == osx* ]]; then - sed -i.bak $'s/\r//' ${RECIPE_DIR}/patches/amber19-fix-cmake.patch > amber19-fix-cmake.patch - - sed -i.bak $'s/\r//' ${SRC_DIR}/cmake/*.cmake -fi +perl -p -e 's/\r$//g' ${RECIPE_DIR}/patches/amber19-fix-cmake.patch > amber19-fix-cmake.patch +perl -pi -e 's/\r$//g' ${SRC_DIR}/cmake/*.cmake patch -p1 --ignore-whitespace -t -i amber19-fix-cmake.patch || true # Build AmberTools with cmake From 576d6ed009db5bc33d7406ae076d4bd07c6c7359 Mon Sep 17 00:00:00 2001 From: Jaime RGP Date: Wed, 8 Jan 2020 10:49:56 +0100 Subject: [PATCH 49/52] Pin ld in MacOS --- recipe/meta.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 104a559a..9bd9f3ec 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -28,6 +28,7 @@ requirements: - {{ compiler('fortran') }} - {{ compiler('c') }} - {{ compiler('cxx') }} + - ld64 409.12 h3c32e8a_4 # [osx] - bc - flex - patch From 00932a38b981ba1856324610b87150b2a989c985 Mon Sep 17 00:00:00 2001 From: Jaime RGP Date: Wed, 8 Jan 2020 20:20:36 +0100 Subject: [PATCH 50/52] Try to set OSX sysroot manually --- recipe/build.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/recipe/build.sh b/recipe/build.sh index ae208f6a..2a2c8be1 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -12,10 +12,16 @@ perl -p -e 's/\r$//g' ${RECIPE_DIR}/patches/amber19-fix-cmake.patch > amber19-f perl -pi -e 's/\r$//g' ${SRC_DIR}/cmake/*.cmake patch -p1 --ignore-whitespace -t -i amber19-fix-cmake.patch || true +if [[ "$target_platform" == osx* ]]; then + CMAKE_FLAGS+=" -DCMAKE_OSX_SYSROOT=${CONDA_BUILD_SYSROOT}" + CMAKE_FLAGS+=" -DCMAKE_OSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET}" + export FFLAGS="-isysroot ${CONDA_BUILD_SYSROOT} ${FFLAGS}" +fi + # Build AmberTools with cmake -mkdir build +mkdir -p build cd build -cmake ${SRC_DIR} \ +cmake ${SRC_DIR} ${CMAKE_FLAGS} \ -DCMAKE_INSTALL_PREFIX=${PREFIX} \ -DCOMPILER=MANUAL \ -DPYTHON_EXECUTABLE=${PYTHON} \ From e565a3ad08c2e5c0fee72869d346a71f473d8d7f Mon Sep 17 00:00:00 2001 From: Jaime RGP Date: Wed, 8 Jan 2020 20:34:19 +0100 Subject: [PATCH 51/52] Initialize empty CMAKE_FLAGS --- recipe/build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/recipe/build.sh b/recipe/build.sh index 2a2c8be1..8bc58741 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -12,6 +12,7 @@ perl -p -e 's/\r$//g' ${RECIPE_DIR}/patches/amber19-fix-cmake.patch > amber19-f perl -pi -e 's/\r$//g' ${SRC_DIR}/cmake/*.cmake patch -p1 --ignore-whitespace -t -i amber19-fix-cmake.patch || true +CMAKE_FLAGS="" if [[ "$target_platform" == osx* ]]; then CMAKE_FLAGS+=" -DCMAKE_OSX_SYSROOT=${CONDA_BUILD_SYSROOT}" CMAKE_FLAGS+=" -DCMAKE_OSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET}" From 6ecbc399387a923468921a7b64a6c9b523e22ac9 Mon Sep 17 00:00:00 2001 From: Jaime RGP Date: Thu, 9 Jan 2020 13:24:19 +0100 Subject: [PATCH 52/52] Disable OSX and rerender with conda smithy --- .ci_support/osx_python3.6.yaml | 62 ---------------------------------- .ci_support/osx_python3.7.yaml | 62 ---------------------------------- .ci_support/osx_python3.8.yaml | 62 ---------------------------------- README.md | 27 ++++----------- azure-pipelines.yml | 3 +- recipe/meta.yaml | 2 +- 6 files changed, 8 insertions(+), 210 deletions(-) delete mode 100644 .ci_support/osx_python3.6.yaml delete mode 100644 .ci_support/osx_python3.7.yaml delete mode 100644 .ci_support/osx_python3.8.yaml diff --git a/.ci_support/osx_python3.6.yaml b/.ci_support/osx_python3.6.yaml deleted file mode 100644 index a244df9c..00000000 --- a/.ci_support/osx_python3.6.yaml +++ /dev/null @@ -1,62 +0,0 @@ -MACOSX_DEPLOYMENT_TARGET: -- '10.9' -boost_cpp: -- 1.70.0 -bzip2: -- '1' -c_compiler: -- clang -c_compiler_version: -- '9' -channel_sources: -- conda-forge,defaults -channel_targets: -- conda-forge main -cxx_compiler: -- clangxx -cxx_compiler_version: -- '9' -fftw: -- '3' -fortran_compiler: -- gfortran -fortran_compiler_version: -- '7' -liblapack: -- 3.8.0 *netlib -libnetcdf: -- 4.7.3 -macos_machine: -- x86_64-apple-darwin13.4.0 -macos_min_version: -- '10.9' -netcdf_fortran: -- '4.5' -numpy: -- '1.14' -perl: -- 5.26.2 -pin_run_as_build: - boost-cpp: - max_pin: x.x.x - bzip2: - max_pin: x - fftw: - max_pin: x - netcdf-fortran: - max_pin: x.x - perl: - max_pin: x.x.x - python: - min_pin: x.x - max_pin: x.x - readline: - max_pin: x - zlib: - max_pin: x.x -python: -- '3.6' -readline: -- '8.0' -zlib: -- '1.2' diff --git a/.ci_support/osx_python3.7.yaml b/.ci_support/osx_python3.7.yaml deleted file mode 100644 index 67b052d4..00000000 --- a/.ci_support/osx_python3.7.yaml +++ /dev/null @@ -1,62 +0,0 @@ -MACOSX_DEPLOYMENT_TARGET: -- '10.9' -boost_cpp: -- 1.70.0 -bzip2: -- '1' -c_compiler: -- clang -c_compiler_version: -- '9' -channel_sources: -- conda-forge,defaults -channel_targets: -- conda-forge main -cxx_compiler: -- clangxx -cxx_compiler_version: -- '9' -fftw: -- '3' -fortran_compiler: -- gfortran -fortran_compiler_version: -- '7' -liblapack: -- 3.8.0 *netlib -libnetcdf: -- 4.7.3 -macos_machine: -- x86_64-apple-darwin13.4.0 -macos_min_version: -- '10.9' -netcdf_fortran: -- '4.5' -numpy: -- '1.14' -perl: -- 5.26.2 -pin_run_as_build: - boost-cpp: - max_pin: x.x.x - bzip2: - max_pin: x - fftw: - max_pin: x - netcdf-fortran: - max_pin: x.x - perl: - max_pin: x.x.x - python: - min_pin: x.x - max_pin: x.x - readline: - max_pin: x - zlib: - max_pin: x.x -python: -- '3.7' -readline: -- '8.0' -zlib: -- '1.2' diff --git a/.ci_support/osx_python3.8.yaml b/.ci_support/osx_python3.8.yaml deleted file mode 100644 index 25380831..00000000 --- a/.ci_support/osx_python3.8.yaml +++ /dev/null @@ -1,62 +0,0 @@ -MACOSX_DEPLOYMENT_TARGET: -- '10.9' -boost_cpp: -- 1.70.0 -bzip2: -- '1' -c_compiler: -- clang -c_compiler_version: -- '9' -channel_sources: -- conda-forge,defaults -channel_targets: -- conda-forge main -cxx_compiler: -- clangxx -cxx_compiler_version: -- '9' -fftw: -- '3' -fortran_compiler: -- gfortran -fortran_compiler_version: -- '7' -liblapack: -- 3.8.0 *netlib -libnetcdf: -- 4.7.3 -macos_machine: -- x86_64-apple-darwin13.4.0 -macos_min_version: -- '10.9' -netcdf_fortran: -- '4.5' -numpy: -- '1.14' -perl: -- 5.26.2 -pin_run_as_build: - boost-cpp: - max_pin: x.x.x - bzip2: - max_pin: x - fftw: - max_pin: x - netcdf-fortran: - max_pin: x.x - perl: - max_pin: x.x.x - python: - min_pin: x.x - max_pin: x.x - readline: - max_pin: x - zlib: - max_pin: x.x -python: -- '3.8' -readline: -- '8.0' -zlib: -- '1.2' diff --git a/README.md b/README.md index 866e3fba..cfa819bf 100644 --- a/README.md +++ b/README.md @@ -82,33 +82,18 @@ Current build status variant - - osx_python3.6 - - - variant - - - - osx_python3.7 - - - variant - - - - osx_python3.8 - - - variant - - + + OSX + + OSX disabled + + Windows diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 33a441c1..ad85a2cc 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -3,5 +3,4 @@ # -*- mode: yaml -*- jobs: - - template: ./.azure-pipelines/azure-pipelines-linux.yml - - template: ./.azure-pipelines/azure-pipelines-osx.yml \ No newline at end of file + - template: ./.azure-pipelines/azure-pipelines-linux.yml \ No newline at end of file diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 9bd9f3ec..b5ac5a9d 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -21,7 +21,7 @@ source: build: number: 1 - skip: True # [win or py2k] + skip: True # [win or py2k or osx] requirements: build: