From 4d5cda19ac337f2466d861ed612655b1a6ef6278 Mon Sep 17 00:00:00 2001 From: tradke Date: Fri, 29 Aug 2003 15:21:39 +0000 Subject: Removed all the configure stuff which checked for PETSC_DIR and PETSC_ARCH at compile time. This is now done only once at configure time by saying 'PETSC=yes [PETSC_DIR=...] [PETSC_ARCH=...]'. You need to update Cactus/lib/make/extras/ also. This closes PR CactusElliptic/1142: EllPETSc solver doesn't link and PR CactusElliptic/868: EllPETSc needs environment variables. git-svn-id: http://svn.cactuscode.org/arrangements/CactusElliptic/EllPETSc/trunk@79 1d96b42b-98df-4a6a-9d84-1b24288d4588 --- src/make.code.defn | 7 ----- src/make.configuration.defn | 74 +++++---------------------------------------- 2 files changed, 8 insertions(+), 73 deletions(-) diff --git a/src/make.code.defn b/src/make.code.defn index fcfda6d..aabfe3a 100644 --- a/src/make.code.defn +++ b/src/make.code.defn @@ -3,10 +3,3 @@ # Source files in this directory SRCS = Startup.c petsc_wrapper.c petsc_confmetric_solver.c petsc_flat_solver.c - - -# Add PETSc include dirs to the Cactus makefile variables -SYS_INC_DIRS += $(PETSC_DIR)/include $(PETSC_DIR)/bmake/$(PETSC_ARCH) - -# Define this to enable PETSC's error-checking macros -CFLAGS += -DUSE_PETSC_DEBUG diff --git a/src/make.configuration.defn b/src/make.configuration.defn index 5130245..a954d1e 100644 --- a/src/make.configuration.defn +++ b/src/make.configuration.defn @@ -2,72 +2,14 @@ # $Header$ -# on all systems: PETSc may have been build with X11 support, which -# needs to included here. +# check if this was configured with PETSc, bail out if not +have_petsc := $(shell grep -s '\#define CCTK_PETSC 1' $(CONFIG)/cctk_Extradefs.h) -# on linux system: the lapack libs (in rpms) are compiled with f2c/g77 -# and need the -lg2c or -lf2c to be linked -# keep them at the end of lapack - - -### check if this was configured with MPI, bail out if not -have_mpi := $(shell grep -s '\#define CCTK_MPI' $(CONFIG)/cctk_Extradefs.h) - -ifeq ($(strip $(have_mpi)), ) -$(NAME): MissingMPI -.pseudo: MissingMPI -MissingMPI: - @echo "PETSc: requires MPI" - @echo "PETSc: Please configure with MPI or remove EllPETSc from ThornList !" - exit 2 -endif - -### check if PETSC_DIR/PETSC_ARCH are set, bail out if not -ifeq ($(strip $(PETSC_DIR)), ) -$(NAME): MissingPETSC_DIR -.pseudo: MissingPETSC_DIR -MissingPETSC_DIR: - @echo "PETSc: need environment variable PETSC_DIR for compiling EllPETSc" - @echo "PETSc: set PETSC_DIR or remove EllPETSc from ThornList" +ifeq ($(strip $(have_petsc)), ) +$(NAME): MissingPETSC +.pseudo: MissingPETSC +MissingPETSC: + @echo "This configuration wasn't configured to use PETSC" + @echo "Please reconfigure with 'PETSC=yes' or remove EllPETSc from your ThornList !" exit 2 endif - -ifeq ($(strip $(PETSC_ARCH)), ) -$(NAME): MissingPETSC_ARCH -.pseudo: MissingPETSC_ARCH -MissingPETSC_ARCH: - @echo "PETSc: need environment variable PETSC_ARCH for compiling EllPETSc" - @echo "PETSc: set PETSC_ARCH or remove EllPETSc from ThornList" - exit 2 -endif - -PETSC_LIB_DIR = $(PETSC_DIR)/lib/libO/$(PETSC_ARCH) -PETSC_LIBS = petscts petscsnes petscsles petscdm petscmat petscvec petsc - -PLATFORM_LIBS = - -### PETSC on the Origin -ifeq ($(PETSC_ARCH),IRIX64) - PLATFORM_LIBS = fpe blas complib.sgimath -endif - -### PETSC on linux -ifeq ($(PETSC_ARCH),linux) - PLATFORM_LIBS = flapack fblas g2c mpich -endif - -### PETSC on linux_intel -ifeq ($(PETSC_ARCH),linux_intel) - PLATFORM_LIBS = mkl_lapack mkl_def guide -endif - -### Otherwise -ifndef PLATFORM_LIBS -UnknownArch: - @echo "No Cactus/PETSc support for PETSC_ARCH=$(PETSC_ARCH)" - exit 2 -endif - -# Add PETSc libdirs and libs to the Cactus makefile variables -LIBDIRS += $(PETSC_LIB_DIR) $(X_LIB_DIR) -LIBS += $(PETSC_LIBS) $(PLATFORM_LIBS) X11 $(MPI_LIBS) -- cgit v1.2.3