Skip to content
Snippets Groups Projects
Commit 3da2a6eb authored by Sandipan Mohanty's avatar Sandipan Mohanty
Browse files

AMBER-22: add patches used in easyconfig to the repo

parent 249eb869
No related branches found
No related tags found
No related merge requests found
make CMake scripts that picks BLAS/LAPACK library aware of FlexiBLAS
author: Kenneth Hoste (HPC-UGent)
--- cmake/patched-cmake-modules/FindBLASFixed.cmake.orig 2022-05-04 18:53:42.410384491 +0200
+++ cmake/patched-cmake-modules/FindBLASFixed.cmake 2022-05-04 18:54:39.034612008 +0200
@@ -36,7 +36,7 @@
# BLA_F95 if set on tries to find the f95 interfaces for BLAS/LAPACK
#
# ######### ## List of vendors (BLA_VENDOR) valid in this module #
-# Goto,OpenBLAS,ATLAS PhiPACK,CXML,DXML,SunPerf,SCSL,SGIMATH,IBMESSL,
+# Goto,OpenBLAS,FlexiBLAS ATLAS PhiPACK,CXML,DXML,SunPerf,SCSL,SGIMATH,IBMESSL,
# ACML,ACML_MP,ACML_GPU,Apple, NAS, Generic
include(CMakePushCheckState)
@@ -49,8 +49,8 @@
set(BLA_VENDOR_DEFAULT "All")
endif ()
-set(BLA_VENDOR ${BLA_VENDOR_DEFAULT} CACHE STRING "BLAS vendor to use for BLAS and Lapack. Valid values: All, Goto, OpenBLAS, ATLAS, PhiPACK, CXML, DXML, SunPerf, SCSL, SGIMATH, IBMESSL, ACML, ACML_MP, ACML_GPU, Apple, NAS, Generic")
-validate_configuration_enum(BLA_VENDOR All Goto OpenBLAS ATLAS PhiPACK CXML DXML SunPerf SCSL SGIMATH IBMESSL ACML ACML_MP ACML_GPU Apple NAS Generic)
+set(BLA_VENDOR ${BLA_VENDOR_DEFAULT} CACHE STRING "BLAS vendor to use for BLAS and Lapack. Valid values: All, Goto, OpenBLAS, FlexiBLAS, ATLAS, PhiPACK, CXML, DXML, SunPerf, SCSL, SGIMATH, IBMESSL, ACML, ACML_MP, ACML_GPU, Apple, NAS, Generic")
+validate_configuration_enum(BLA_VENDOR All Goto OpenBLAS FlexiBLAS ATLAS PhiPACK CXML DXML SunPerf SCSL SGIMATH IBMESSL ACML ACML_MP ACML_GPU Apple NAS Generic)
if(DEFINED BLAS_FIND_QUIETLY)
set(CMAKE_REQUIRED_QUIET ${BLAS_FIND_QUIETLY})
@@ -159,6 +159,20 @@
endif()
endif ()
+if (BLA_VENDOR STREQUAL "FlexiBLAS" OR BLA_VENDOR STREQUAL "All")
+ if(NOT BLAS_LIBRARIES)
+ # FlexiBLAS (https://github.com/mpimd-csc/flexiblas)
+ check_fortran_libraries(
+ BLAS_LIBRARIES
+ BLAS
+ sgemm
+ ""
+ "flexiblas"
+ ""
+ )
+ endif()
+endif ()
+
if (BLA_VENDOR STREQUAL "OpenBLAS" OR BLA_VENDOR STREQUAL "All")
if(NOT BLAS_LIBRARIES)
# OpenBLAS (http://www.openblas.net)
@@ -524,4 +538,4 @@
endif()
cmake_pop_check_state()
-set(CMAKE_FIND_LIBRARY_SUFFIXES ${_blas_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
\ No newline at end of file
+set(CMAKE_FIND_LIBRARY_SUFFIXES ${_blas_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
--- cmake/patched-cmake-modules/FindLAPACKFixed.cmake.orig 2022-05-04 18:56:14.315407989 +0200
+++ cmake/patched-cmake-modules/FindLAPACKFixed.cmake 2022-05-04 18:56:39.930772703 +0200
@@ -36,7 +36,7 @@
# BLA_F95 if set on tries to find the f95 interfaces for BLAS/LAPACK
#
# ## List of vendors (BLA_VENDOR) valid in this module:
-# OpenBLAS, ACML,Apple, NAS, Generic
+# OpenBLAS, FlexiBLAS, ACML,Apple, NAS, Generic
set(_lapack_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
@@ -173,6 +173,20 @@
endif()
endif ()
+ if(BLA_VENDOR STREQUAL "FlexiBLAS" OR BLA_VENDOR STREQUAL "All")
+ if(NOT LAPACK_LIBRARIES)
+ check_lapack_libraries(
+ LAPACK_LIBRARIES
+ LAPACK
+ cheev
+ ""
+ "flexiblas"
+ "${BLAS_LIBRARIES}"
+ ""
+ )
+ endif()
+ endif()
+
if(BLA_VENDOR STREQUAL "OpenBLAS" OR BLA_VENDOR STREQUAL "All")
if(NOT LAPACK_LIBRARIES)
check_lapack_libraries(
@@ -289,4 +303,4 @@
endif()
cmake_pop_check_state()
-set(CMAKE_FIND_LIBRARY_SUFFIXES ${_lapack_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
\ No newline at end of file
+set(CMAKE_FIND_LIBRARY_SUFFIXES ${_lapack_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
diff -ruN amber22_src/src/pmemd/src/xray/src/xray_non_bulk_impl_cpu.F90 amber22_src1/src/pmemd/src/xray/src/xray_non_bulk_impl_cpu.F90
--- amber22_src/src/pmemd/src/xray/src/xray_non_bulk_impl_cpu.F90 2022-04-09 03:11:46.000000000 +0200
+++ amber22_src1/src/pmemd/src/xray/src/xray_non_bulk_impl_cpu.F90 2023-08-25 20:30:12.828529000 +0200
@@ -90,7 +90,7 @@
call check_precondition(size(frac, 2) == size(scatter_type_index))
call check_precondition(size(hkl, 2) == size(atomic_scatter_factor, 1))
- !$omp parallel do private(ihkl,i,f,angle)
+ !$omp parallel do private(ihkl,f,angle)
do ihkl = 1, size(hkl, 2)
! Fhkl = SUM( fj * exp(2 * M_PI * i * (h * xj + k * yj + l * zj)) ),
@@ -127,4 +127,4 @@
end subroutine calc_f_non_bulk
-end module xray_non_bulk_impl_cpu_module
\ No newline at end of file
+end module xray_non_bulk_impl_cpu_module
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment