From 528a863db792b4d1b6ca36ab0ad79a453c3163ef Mon Sep 17 00:00:00 2001 From: Hans Pabst Date: Tue, 30 Jul 2024 11:31:21 +0200 Subject: [PATCH] Initial support for libgrpp (CP2K). --- config/cp2k/Linux-x86-64-intelx.arch | 40 ++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/config/cp2k/Linux-x86-64-intelx.arch b/config/cp2k/Linux-x86-64-intelx.arch index b618cdd..8a8c28c 100644 --- a/config/cp2k/Linux-x86-64-intelx.arch +++ b/config/cp2k/Linux-x86-64-intelx.arch @@ -789,6 +789,38 @@ ifneq (0,$(ELPA)) # incl. undefined $(info ELPAROOT=$(ELPAROOT)) endif endif +ifneq (0,$(LIBGRPP)) # incl. undefined + ifneq (,$(wildcard $(LIBGRPP_BASEDIR)/$(XCFG))) + LIBGRPPROOT ?= $(abspath $(LIBGRPP_BASEDIR)/$(XCFG)) + else ifneq (,$(wildcard $(CP2KHOME)/../libgrpp/$(XCFG))) + LIBGRPPROOT ?= $(abspath $(CP2KHOME)/../libgrpp/$(XCFG)) + else ifneq (,$(wildcard $(HOME)/libgrpp/$(XCFG))) + LIBGRPPROOT ?= $(abspath $(HOME)/libgrpp/$(XCFG)) + else ifneq (0,$(GNU)) + ifneq (,$(wildcard $(LIBGRPP_BASEDIR)/gnu)) + LIBGRPPROOT ?= $(abspath $(LIBGRPP_BASEDIR)/gnu) + else ifneq (,$(wildcard $(CP2KHOME)/../libgrpp/gnu)) + LIBGRPPROOT ?= $(abspath $(CP2KHOME)/../libgrpp/gnu) + else ifneq (,$(wildcard $(HOME)/libgrpp/gnu)) + LIBGRPPROOT ?= $(abspath $(HOME)/libgrpp/gnu) + endif + else ifneq (0,$(INTEL)) + ifneq (,$(wildcard $(LIBGRPP_BASEDIR)/intel)) + LIBGRPPROOT ?= $(abspath $(LIBGRPP_BASEDIR)/intel) + else ifneq (,$(wildcard $(CP2KHOME)/../libgrpp/intel)) + LIBGRPPROOT ?= $(abspath $(CP2KHOME)/../libgrpp/intel) + else ifneq (,$(wildcard $(HOME)/libgrpp/intel)) + LIBGRPPROOT ?= $(abspath $(HOME)/libgrpp/intel) + endif + endif + ifeq (/,$(LIBGRPPROOT)) + LIBGRPPROOT := $(NULL) + endif + ifneq (,$(LIBGRPPROOT)) + $(info LIBGRPPROOT=$(LIBGRPPROOT)) + endif +endif +# ifneq (0,$(COSMA)) # incl. undefined ifneq (,$(COSMAROOT)) $(info COSMAROOT=$(COSMAROOT)) @@ -824,6 +856,14 @@ ifneq (,$(LIBXCROOT)) endif endif +ifneq (,$(LIBGRPPROOT)) + ifneq (,$(wildcard $(LIBGRPPROOT)/lib/liblibgrpp.a)) + LIBS += $(LIBGRPPROOT)/lib/liblibgrpp.a + IFLAGS += $(LIBGRPPROOT)/include + DFLAGS += __LIBGRPP + endif +endif + ifneq (,$(PLUMEDROOT)) DFLAGS += __PLUMED2 # avoid duplicated libraries (-ldl -lstdc++)