-
Notifications
You must be signed in to change notification settings - Fork 363
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fix docker recipe for cmake - add nvhpc support (module provided by nvidia) - fix a spelling mistake in FindPlumed.cmake - added an interface target for libraries that are common to all modules. - use lists of target whenever cmake functions supports them otherwise use for loops for properties common to all targets - use CMAKE_HIP_ARCHITECTURES and CMAKE_CUDA_ARCHITECTURES instead of custom variables - update the full source file list. - removed the all CMakeLists.txt except the file in the root and in src.
- Loading branch information
1 parent
764ce72
commit f24923d
Showing
13 changed files
with
1,746 additions
and
347 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
#!-------------------------------------------------------------------------------------------------! | ||
#! CP2K: A general program to perform molecular dynamics simulations ! | ||
#! Copyright 2000-2023 CP2K developers group <https://cp2k.org> ! | ||
#! ! | ||
#! SPDX-License-Identifier: GPL-2.0-or-later ! | ||
#!-------------------------------------------------------------------------------------------------! | ||
|
||
# Copyright (c) 2022- ETH Zurich | ||
# | ||
# authors : Mathieu Taillefumier | ||
|
||
include(FindPackageHandleStandardArgs) | ||
include(cp2k_utils) | ||
|
||
cp2k_set_default_paths(CP2K_NVHPC "NVHPC") | ||
|
||
find_library( | ||
CP2K_NVHPC_BLAS_LP64 | ||
NAMES blas_lp64 | ||
PATHS "${CP2K_NVHPC_ROOT}" | ||
PATH_SUFFIXES "lib" "lib64") | ||
|
||
find_library( | ||
CP2K_NVHPC_BLAS_ILP64 | ||
NAMES blas_ilp64 | ||
PATHS "${CP2K_NVHPC_ROOT}" | ||
PATH_SUFFIXES "lib" "lib64") | ||
|
||
find_library( | ||
CP2K_NVHPC_LAPACK_LP64 | ||
NAMES lapack_lp64 | ||
PATHS "${CP2K_NVHPC_ROOT}" | ||
PATH_SUFFIXES "lib" "lib64") | ||
|
||
find_library( | ||
CP2K_NVHPC_LAPACK_ILP64 | ||
NAMES lapack_ilp64 | ||
PATHS "${CP2K_NVHPC_ROOT}" | ||
PATH_SUFFIXES "lib" "lib64") | ||
|
||
find_path( | ||
CP2K_NVHPC_BLAS_INCLUDE_DIRS_lp64 | ||
NAMES cblas.h | ||
PATHS "${CP2K_NVHPC_ROOT}" | ||
HINTS "${CP2K_NVHPC_ROOT}" | ||
PATH_SUFFIXES "include" "include/lp64" "lp64") | ||
|
||
find_path( | ||
CP2K_NVHPC_BLAS_INCLUDE_DIRS_ilp64 | ||
NAMES cblas.h | ||
PATHS "${CP2K_NVHPC_ROOT}" | ||
HINTS "${CP2K_NVHPC_ROOT}" | ||
PATH_SUFFIXES "include" "include/ilp64" "ilp64") | ||
|
||
find_package_handle_standard_args( | ||
NVHPCBlas | ||
DEFAULT_MSG | ||
CP2K_NVHPC_INCLUDE_DIRS_ipl64 | ||
CP2K_NVHPC_BLAS_INCLUDE_DIRS_lp64 | ||
CP2K_NVHPC_BLAS_ILP64 | ||
CP2K_NVHPC_BLAS_LP64 | ||
CP2K_NVHPC_LAPACK_ILP64 | ||
CP2K_NVHPC_LAPACK_LP64) | ||
|
||
set(CP2K_BLAS_VENDOR "NVHPCBlas") | ||
set(CP2K_NVHPCBLAS_FOUND "ON") | ||
|
||
if(NOT TARGET CP2K::BLAS::NVHPCBlas::nvhpcblas) | ||
add_library(CP2K::BLAS::NVHPCBlas::nvhpcblas INTERFACE IMPORTED) | ||
add_library(CP2K::BLAS::NVHPCBlas::blas ALIAS | ||
CP2K::BLAS::NVHPCBlas::nvhpcblas) | ||
endif() | ||
|
||
if(CP2K_BLAS_INTERFACE MATCHES "64bits") | ||
set(CP2K_NVHPC_BLAS_LINK_LIBRARIES | ||
"${CP2K_NVHPC_LAPACK_ILP64} ${CP2K_NVHPC_BLAS_ILP64}) | ||
set(CP2K_NVHPC_BLAS_INCLUDE_DIRS "${CP2K_NVHPC_INCLUDE_DIRS_ipl64}") | ||
else() | ||
set(CP2K_NVHPC_BLAS_LINK_LIBRARIES "${CP2K_NVHPC_LAPACK_LP64} | ||
${CP2K_NVHPC_BLAS_LP64}") | ||
set(CP2K_NVHPC_BLAS_INCLUDE_DIRS "${CP2K_NVHPC_INCLUDE_DIRS_pl64}") | ||
endif() | ||
set_target_properties( | ||
CP2K::BLAS::NVHPCBlas::nvhpcblas | ||
PROPERTIES INTERFACE_LINK_LIBRARIES "${CP2K_NVHPC_BLAS_LINK_LIBRARIES}" | ||
INTERFACE_INCLUDE_DIRECTORIES "${CP2K_NVHPC_BLAS_INCLUDE_DIRS} | ||
") | ||
endif() | ||
mark_as_advanced(CP2K_NVHPCBLAS_FOUND CP2K_NVHPC_BLAS_INCLUDE_DIRS | ||
CP2K_NVHPC_BLAS_LINK_LIBRARIES CP2K_BLAS_VENDOR) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.