Skip to content

Commit

Permalink
Revert Makefile to older state
Browse files Browse the repository at this point in the history
  • Loading branch information
IshaanDesai committed Aug 7, 2024
1 parent 0c32ca5 commit cef5846
Showing 1 changed file with 13 additions and 24 deletions.
37 changes: 13 additions & 24 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,19 @@
# https://precice.org/adapter-calculix-get-calculix.html
# Set the following variables before building:
# Path to original CalculiX source (e.g. $(HOME)/ccx_2.xx/src )
CCX_VERSION = 2.20
CCX_VERSION = 2.20
CCX = $(HOME)/CalculiX/ccx_$(CCX_VERSION)/src
CCX_FLAGS = -DPARDISO -DMATRIXSTORAGE -DUSE_MT

### Change these if you built SPOOLES, ARPACK, or yaml-cpp from source ###
# SPOOLES include flags (e.g. -I$(HOME)/SPOOLES.2.2 )
# SPOOLES library flags (e.g. $(HOME)/SPOOLES.2.2/spooles.a)
SPOOLES_INCLUDE = -I/usr/include/spooles/
# SPOOLES library flags (e.g. $(HOME)/SPOOLES.2.2/spooles.a)
SPOOLES_LIBS = -lspooles
CCX_FLAGS += -DSPOOLES

#
# ARPACK include flags (e.g. -I$(HOME)/ARPACK)
# ARPACK library flags (e.g. $(HOME)/ARPACK/libarpack_INTEL.a)
ARPACK_INCLUDE =
# ARPACK library flags (e.g. $(HOME)/ARPACK/libarpack_INTEL.a)
ARPACK_LIBS = -larpack -llapack -lblas
CCX_FLAGS += -DARPACK

# PARDISO (MKL) include flags (e.g. -I/opt/intel/mkl/include)
# PARDISO (MKL) library flags (e.g. -L/opt/intel/mkl/lib/intel64 -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl)
PARDISO_INCLUDE = -I/opt/intel/oneapi/mkl/2023.1.0/include
PARDISO_LIBS = -L/opt/intel/oneapi/mkl/2023.1.0/lib/intel64 -Wl,--no-as-needed -lmkl_gf_lp64 -lmkl_gnu_thread -lmkl_core -lmkl_blacs_intelmpi_lp64 -lgomp -lpthread -lm -ldl
CCX_FLAGS += -DPARDISO

#
# yaml-cpp include flags (e.g. -I$(HOME)/yaml-cpp/include)
YAML_INCLUDE = -I/usr/include/
Expand All @@ -47,7 +37,6 @@ INCLUDES = \
-I$(CCX) \
$(SPOOLES_INCLUDE) \
$(PKGCONF_CFLAGS) \
$(PARDISO_INCLUDE) \
$(ARPACK_INCLUDE) \
$(YAML_INCLUDE)

Expand All @@ -57,14 +46,13 @@ LIBS = \
-lstdc++ \
$(YAML_LIBS) \
$(ARPACK_LIBS) \
$(PARDISO_LIBS) \
-lpthread -lm -lc

# Compilers and flags
#CFLAGS = -g -Wall -std=c++11 -O0 -fopenmp $(INCLUDES) -DARCH="Linux" -DSPOOLES -DARPACK -DMATRIXSTORAGE
#FFLAGS = -g -Wall -O0 -fopenmp $(INCLUDES)

CFLAGS = -Wall -O0 -fopenmp $(INCLUDES) -DARCH="Linux" $(CCX_FLAGS)
CFLAGS = -Wall -O3 -fopenmp $(INCLUDES) -DARCH="Linux" -DSPOOLES -DARPACK -DMATRIXSTORAGE -DUSE_MT

# OS-specific options
UNAME_S := $(shell uname -s)
Expand All @@ -74,20 +62,21 @@ else
CC = mpicc
endif

FFLAGS = -Wall -O0 -fopenmp -fallow-argument-mismatch $(INCLUDES) ${ADDITIONAL_FFLAGS}
FFLAGS = -Wall -O3 -fopenmp $(INCLUDES) ${ADDITIONAL_FFLAGS}
# Note for GCC 10 or newer: add -fallow-argument-mismatch in the above flags
# FC = mpifort
FC = mpifort
# FC = mpif90
FC = gfortran
# FC = gfortran

# Include a list of all the source files
include $(CCX)/Makefile.inc
SCCXMAIN = ccx_$(CCX_VERSION).c

# Append additional sources
SCCXC += nonlingeo_precice.c linstatic_precice.c dyna_precice.c CCXHelpers.c PreciceInterface.c
# SCCXC += linstatic_precice.c CCXHelpers.c PreciceInterface.c
SCCXF += getflux.f getkdeltatemp.f multiscale_routines.f
SCCXC += nonlingeo_precice.c dyna_precice.c CCXHelpers.c PreciceInterface.c
SCCXF += getflux.f getkdeltatemp.f



# Source files in this folder and in the adapter directory
$(OBJDIR)/%.o : %.c
Expand Down Expand Up @@ -115,7 +104,7 @@ OCCXC += $(OBJDIR)/ConfigReader.o $(OBJDIR)/2D3DCoupling.o $(OBJDIR)/OutputBuffe


$(OBJDIR)/ccx_preCICE: $(OBJDIR) $(OCCXMAIN) $(OBJDIR)/ccx_$(CCX_VERSION).a
$(FC) -fopenmp -Wall -O0 -o $@ $(OCCXMAIN) $(OBJDIR)/ccx_$(CCX_VERSION).a $(LIBS)
$(FC) -fopenmp -Wall -O3 -o $@ $(OCCXMAIN) $(OBJDIR)/ccx_$(CCX_VERSION).a $(LIBS)

$(OBJDIR)/ccx_$(CCX_VERSION).a: $(OCCXF) $(OCCXC)
ar vr $@ $?
Expand Down

0 comments on commit cef5846

Please sign in to comment.