Skip to content

Commit

Permalink
Simplified selecting library flavor. Account for revised ELPA-recipe.
Browse files Browse the repository at this point in the history
  • Loading branch information
hfp committed Oct 21, 2024
1 parent 8a68e96 commit fe07b9e
Showing 1 changed file with 42 additions and 98 deletions.
140 changes: 42 additions & 98 deletions config/cp2k/Linux-x86-64-intelx.arch
Original file line number Diff line number Diff line change
Expand Up @@ -675,22 +675,12 @@ ifneq (0,$(LIBINT)) # incl. undefined
LIBINTROOT ?= $(abspath $(CP2KHOME)/../libint/$(XCFG))
else ifneq (,$(wildcard $(HOME)/libint/$(XCFG)))
LIBINTROOT ?= $(abspath $(HOME)/libint/$(XCFG))
else ifneq (0,$(GNU))
ifneq (,$(wildcard $(LIBINT_BASEDIR)/gnu))
LIBINTROOT ?= $(abspath $(LIBINT_BASEDIR)/gnu)
else ifneq (,$(wildcard $(CP2KHOME)/../libint/gnu))
LIBINTROOT ?= $(abspath $(CP2KHOME)/../libint/gnu)
else ifneq (,$(wildcard $(HOME)/libint/gnu))
LIBINTROOT ?= $(abspath $(HOME)/libint/gnu)
endif
else ifneq (0,$(INTEL))
ifneq (,$(wildcard $(LIBINT_BASEDIR)/intel))
LIBINTROOT ?= $(abspath $(LIBINT_BASEDIR)/intel)
else ifneq (,$(wildcard $(CP2KHOME)/../libint/intel))
LIBINTROOT ?= $(abspath $(CP2KHOME)/../libint/intel)
else ifneq (,$(wildcard $(HOME)/libint/intel))
LIBINTROOT ?= $(abspath $(HOME)/libint/intel)
endif
else ifneq (,$(wildcard $(LIBINT_BASEDIR)/$(CFG)))
LIBINTROOT ?= $(abspath $(LIBINT_BASEDIR)/$(CFG))
else ifneq (,$(wildcard $(CP2KHOME)/../libint/$(CFG)))
LIBINTROOT ?= $(abspath $(CP2KHOME)/../libint/$(CFG))
else ifneq (,$(wildcard $(HOME)/libint/$(CFG)))
LIBINTROOT ?= $(abspath $(HOME)/libint/$(CFG))
endif
ifeq (/,$(LIBINTROOT))
LIBINTROOT := $(NULL)
Expand All @@ -706,22 +696,12 @@ ifneq (0,$(PLUMED)) # incl. undefined
PLUMEDROOT ?= $(abspath $(CP2KHOME)/../plumed/$(XCFG))
else ifneq (,$(wildcard $(HOME)/plumed/$(XCFG)))
PLUMEDROOT ?= $(abspath $(HOME)/plumed/$(XCFG))
else ifneq (0,$(GNU))
ifneq (,$(wildcard $(PLUMED_BASEDIR)/gnu))
PLUMEDROOT ?= $(abspath $(PLUMED_BASEDIR)/gnu)
else ifneq (,$(wildcard $(CP2KHOME)/../plumed/gnu))
PLUMEDROOT ?= $(abspath $(CP2KHOME)/../plumed/gnu)
else ifneq (,$(wildcard $(HOME)/plumed/gnu))
PLUMEDROOT ?= $(abspath $(HOME)/plumed/gnu)
endif
else ifneq (0,$(INTEL))
ifneq (,$(wildcard $(PLUMED_BASEDIR)/intel))
PLUMEDROOT ?= $(abspath $(PLUMED_BASEDIR)/intel)
else ifneq (,$(wildcard $(CP2KHOME)/../plumed/intel))
PLUMEDROOT ?= $(abspath $(CP2KHOME)/../plumed/intel)
else ifneq (,$(wildcard $(HOME)/plumed/intel))
PLUMEDROOT ?= $(abspath $(HOME)/plumed/intel)
endif
else ifneq (,$(wildcard $(PLUMED_BASEDIR)/$(CFG)))
PLUMEDROOT ?= $(abspath $(PLUMED_BASEDIR)/$(CFG))
else ifneq (,$(wildcard $(CP2KHOME)/../plumed/$(CFG)))
PLUMEDROOT ?= $(abspath $(CP2KHOME)/../plumed/$(CFG))
else ifneq (,$(wildcard $(HOME)/plumed/$(CFG)))
PLUMEDROOT ?= $(abspath $(HOME)/plumed/$(CFG))
endif
ifeq (/,$(PLUMEDROOT))
PLUMEDROOT := $(NULL)
Expand All @@ -737,22 +717,12 @@ ifneq (0,$(LIBXC)) # incl. undefined
LIBXCROOT ?= $(abspath $(CP2KHOME)/../libxc/$(XCFG))
else ifneq (,$(wildcard $(HOME)/libxc/$(XCFG)))
LIBXCROOT ?= $(abspath $(HOME)/libxc/$(XCFG))
else ifneq (0,$(GNU))
ifneq (,$(wildcard $(LIBXC_BASEDIR)/gnu))
LIBXCROOT ?= $(abspath $(LIBXC_BASEDIR)/gnu)
else ifneq (,$(wildcard $(CP2KHOME)/../libxc/gnu))
LIBXCROOT ?= $(abspath $(CP2KHOME)/../libxc/gnu)
else ifneq (,$(wildcard $(HOME)/libxc/gnu))
LIBXCROOT ?= $(abspath $(HOME)/libxc/gnu)
endif
else ifneq (0,$(INTEL))
ifneq (,$(wildcard $(LIBXC_BASEDIR)/intel))
LIBXCROOT ?= $(abspath $(LIBXC_BASEDIR)/intel)
else ifneq (,$(wildcard $(CP2KHOME)/../libxc/intel))
LIBXCROOT ?= $(abspath $(CP2KHOME)/../libxc/intel)
else ifneq (,$(wildcard $(HOME)/libxc/intel))
LIBXCROOT ?= $(abspath $(HOME)/libxc/intel)
endif
else ifneq (,$(wildcard $(LIBXC_BASEDIR)/$(CFG)))
LIBXCROOT ?= $(abspath $(LIBXC_BASEDIR)/$(CFG))
else ifneq (,$(wildcard $(CP2KHOME)/../libxc/$(CFG)))
LIBXCROOT ?= $(abspath $(CP2KHOME)/../libxc/$(CFG))
else ifneq (,$(wildcard $(HOME)/libxc/$(CFG)))
LIBXCROOT ?= $(abspath $(HOME)/libxc/$(CFG))
endif
ifeq (/,$(LIBXCROOT))
LIBXCROOT := $(NULL)
Expand All @@ -768,40 +738,24 @@ ifneq (0,$(ELPA)) # incl. undefined
ELPAROOT ?= $(abspath $(CP2KHOME)/../elpa/$(XCFGOMP))
else ifneq (,$(wildcard $(HOME)/elpa/$(XCFGOMP)))
ELPAROOT ?= $(abspath $(HOME)/elpa/$(XCFGOMP))
else ifneq (0,$(OMP))
ifneq (0,$(GNU))
ifneq (,$(wildcard $(ELPA_BASEDIR)/gnu-omp))
ELPAROOT ?= $(abspath $(ELPA_BASEDIR)/gnu-omp)
else ifneq (,$(wildcard $(CP2KHOME)/../elpa/gnu-omp))
ELPAROOT ?= $(abspath $(CP2KHOME)/../elpa/gnu-omp)
else ifneq (,$(wildcard $(HOME)/elpa/gnu-omp))
ELPAROOT ?= $(abspath $(HOME)/elpa/gnu-omp)
endif
else ifneq (0,$(INTEL))
ifneq (,$(wildcard $(ELPA_BASEDIR)/intel-omp))
ELPAROOT ?= $(abspath $(ELPA_BASEDIR)/intel-omp)
else ifneq (,$(wildcard $(CP2KHOME)/../elpa/intel-omp))
ELPAROOT ?= $(abspath $(CP2KHOME)/../elpa/intel-omp)
else ifneq (,$(wildcard $(HOME)/elpa/intel-omp))
ELPAROOT ?= $(abspath $(HOME)/elpa/intel-omp)
endif
endif
else ifneq (0,$(GNU))
ifneq (,$(wildcard $(ELPA_BASEDIR)/gnu))
ELPAROOT ?= $(abspath $(ELPA_BASEDIR)/gnu)
else ifneq (,$(wildcard $(CP2KHOME)/../elpa/gnu))
ELPAROOT ?= $(abspath $(CP2KHOME)/../elpa/gnu)
else ifneq (,$(wildcard $(HOME)/elpa/gnu))
ELPAROOT ?= $(abspath $(HOME)/elpa/gnu)
endif
else ifneq (0,$(INTEL))
ifneq (,$(wildcard $(ELPA_BASEDIR)/intel))
ELPAROOT ?= $(abspath $(ELPA_BASEDIR)/intel)
else ifneq (,$(wildcard $(CP2KHOME)/../elpa/intel))
ELPAROOT ?= $(abspath $(CP2KHOME)/../elpa/intel)
else ifneq (,$(wildcard $(HOME)/elpa/intel))
ELPAROOT ?= $(abspath $(HOME)/elpa/intel)
endif
else ifneq (,$(wildcard $(ELPA_BASEDIR)/$(XCFG)))
ELPAROOT ?= $(abspath $(ELPA_BASEDIR)/$(XCFG))
else ifneq (,$(wildcard $(CP2KHOME)/../elpa/$(XCFG)))
ELPAROOT ?= $(abspath $(CP2KHOME)/../elpa/$(XCFG))
else ifneq (,$(wildcard $(HOME)/elpa/$(XCFG)))
ELPAROOT ?= $(abspath $(HOME)/elpa/$(XCFG))
else ifneq (,$(wildcard $(ELPA_BASEDIR)/$(CFG)-omp))
ELPAROOT ?= $(abspath $(ELPA_BASEDIR)/$(CFG)-omp)
else ifneq (,$(wildcard $(CP2KHOME)/../elpa/$(CFG)-omp))
ELPAROOT ?= $(abspath $(CP2KHOME)/../elpa/$(CFG)-omp)
else ifneq (,$(wildcard $(HOME)/elpa/$(CFG)-omp))
ELPAROOT ?= $(abspath $(HOME)/elpa/$(CFG)-omp)
else ifneq (,$(wildcard $(ELPA_BASEDIR)/$(CFG)))
ELPAROOT ?= $(abspath $(ELPA_BASEDIR)/$(CFG))
else ifneq (,$(wildcard $(CP2KHOME)/../elpa/$(CFG)))
ELPAROOT ?= $(abspath $(CP2KHOME)/../elpa/$(CFG))
else ifneq (,$(wildcard $(HOME)/elpa/$(CFG)))
ELPAROOT ?= $(abspath $(HOME)/elpa/$(CFG))
endif
ifneq (,$(ELPAROOT))
$(info ELPAROOT=$(ELPAROOT))
Expand All @@ -814,22 +768,12 @@ ifneq (0,$(LIBGRPP)) # incl. undefined
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
else ifneq (,$(wildcard $(LIBGRPP_BASEDIR)/$(CFG)))
LIBGRPPROOT ?= $(abspath $(LIBGRPP_BASEDIR)/$(CFG))
else ifneq (,$(wildcard $(CP2KHOME)/../libgrpp/$(CFG)))
LIBGRPPROOT ?= $(abspath $(CP2KHOME)/../libgrpp/$(CFG))
else ifneq (,$(wildcard $(HOME)/libgrpp/$(CFG)))
LIBGRPPROOT ?= $(abspath $(HOME)/libgrpp/$(CFG))
endif
ifeq (/,$(LIBGRPPROOT))
LIBGRPPROOT := $(NULL)
Expand Down

0 comments on commit fe07b9e

Please sign in to comment.