Skip to content

Commit

Permalink
Merge pull request #14028 from boegel/20210917202853_new_pr_AmberTools20
Browse files Browse the repository at this point in the history
fix AmberTools v20 easyconfig using intel/2020a toolchain
  • Loading branch information
akesandgren authored Oct 21, 2021
2 parents 43052c0 + d0842d5 commit e182c0f
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,41 @@ sources = [{
'download_filename': local_download_credentials,
'filename': SOURCE_TAR_BZ2,
}]
patches = ['Amber-20_fix-hardcoding.patch']
patches = [
'AmberTools-20_fix_missing_MPI_LIBRARY_error.patch',
'AmberTools-20_cmake-locate-netcdf.patch',
'AmberTools-20_fix_xblas_missing_make_dependency.patch',
]
checksums = [
'b1e1f8f277c54e88abc9f590e788bbb2f7a49bcff5e8d8a6eacfaf332a4890f9', # AmberTools-20.tar.bz2
'a71f1bd70bac8d5e25386d6db90e95874ad300b956ed5b5afbc8848b7c1e00dc', # Amber-20_fix-hardcoding.patch
# AmberTools-20_fix_missing_MPI_LIBRARY_error.patch'
'0b89a0624167bc23876bcdefcb1055f591e38e3bd559a71d5749e342bd311acc',
'473e07c53b6f641d96d333974a6af2e03413fecef79f879d3fdecf7fecaab4d0', # AmberTools-20_cmake-locate-netcdf.patch
# AmberTools-20_fix_xblas_missing_make_dependency.patch
'ff25e91fdc72347a778c3837b581e174d6a8c71efa5b46e11391b18bca84fd65'
]

builddependencies = [
('Bison', '3.5.3'),
('pkg-config', '0.29.2'),
('CMake', '3.16.4'),
('flex', '2.6.4'),
('make', '4.3'),
]
dependencies = [
('Python', '3.8.2'),
('SciPy-bundle', '2020.03', versionsuffix),
('matplotlib', '3.2.1', versionsuffix),
('netCDF', '4.7.4'),
('netCDF-Fortran', '4.5.2'),
('FFTW', '3.3.8'),
]

# fix linking to netCDF library: also requires linking to HDF5 & cURL libs, which in turns require others,
# all of which are indirect dependencies via netCDF
local_netcdf_libs = "-lnetcdf -lhdf5 -lsz -ldl -liomp5 -lcurl -lssl -lcrypto -lz -lm -lpthread"
preconfigopts = "sed -i'' 's/-lnetcdf/%s/g' AmberTools/src/cpptraj/configure && " % local_netcdf_libs
configopts = "-nosanderapi"
# pysander should link with icc and not gcc
prebuildopts = """sed -i 's/import sys/import sys; os.environ["LDSHARED"] = "icc -shared "/g' """
prebuildopts += "%(builddir)s/AmberTools/src/pysander/setup.py && "

# Tests use pmemd which is not part of AmberTools
runtest = False

moduleclass = 'chem'
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Ensure that CMake recurses available paths if the Fortran libs aren't available in the netCDF module

James Carpenter 2021-01-23
--- amber20_src/cmake/jedbrown/FindNetCDF.cmake.orig 2020-04-28 02:19:51.000000000 +0100
+++ amber20_src/cmake/jedbrown/FindNetCDF.cmake 2021-01-25 11:41:47.005657000 +0000
@@ -52,6 +52,7 @@

macro (NetCDF_check_interface lang header libs)
find_path (NetCDF_INCLUDES_${lang} NAMES ${header} HINTS "${NetCDF_INCLUDES}" NO_DEFAULT_PATH)
+ find_path (NetCDF_INCLUDES_${lang} NAMES ${header} HINTS "${NetCDF_INCLUDES}")

find_library (NetCDF_LIBRARIES_${lang} NAMES ${libs} HINTS "${NetCDF_lib_dirs}")

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
When using "usempi" there will be no MPI_xxx_LIBRARIES set and that causes
import_libraries to error out. We know it is correct so comment out that
FATAL_ERROR.

Åke Sandgren, 2021-06-16
diff -ru AmberTools.orig/cmake/LibraryTracking.cmake AmberTools/cmake/LibraryTracking.cmake
--- AmberTools.orig/cmake/LibraryTracking.cmake 2021-04-25 02:51:44.000000000 +0200
+++ AmberTools/cmake/LibraryTracking.cmake 2021-06-16 13:30:26.568317368 +0200
@@ -170,9 +170,9 @@

cmake_parse_arguments(IMP_LIBS "" "" "LIBRARIES;INCLUDES" ${ARGN})

- if("${IMP_LIBS_LIBRARIES}" STREQUAL "")
- message(FATAL_ERROR "Incorrect usage. At least one LIBRARY should be provided.")
- endif()
+ #if("${IMP_LIBS_LIBRARIES}" STREQUAL "")
+ # message(FATAL_ERROR "Incorrect usage. At least one LIBRARY should be provided.")
+ #endif()

if(NOT "${IMP_LIBS_UNPARSED_ARGUMENTS}" STREQUAL "")
message(FATAL_ERROR "Incorrect usage. Extra arguments provided.")
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Fix a missing dependency in xblas causing problems when building with large -j

Åke Sandgren, 2021-07-01
diff -ru amber20_src.orig/AmberTools/src/xblas/Makefile amber20_src/AmberTools/src/xblas/Makefile
--- amber20_src.orig/AmberTools/src/xblas/Makefile 2020-01-02 18:26:09.000000000 +0100
+++ amber20_src/AmberTools/src/xblas/Makefile 2021-07-01 11:34:05.281580939 +0200
@@ -97,10 +97,10 @@
grep 'FAIL/TOTAL' testall.result >testall.summary
cat testall.summary

-common-lib:
+common-lib: header
cd $(SRC_DIR)/common && $(MAKE)

-common-test-lib:
+common-test-lib: header
cd $(TEST_DIR)/common && $(MAKE)


0 comments on commit e182c0f

Please sign in to comment.