Skip to content

Commit

Permalink
add Makefiles folder
Browse files Browse the repository at this point in the history
  • Loading branch information
tduretz committed Jun 11, 2024
1 parent 149a0b5 commit 76e4a39
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 0 deletions.
23 changes: 23 additions & 0 deletions MDLIB/Makefiles/makefile_Physix
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
run-tests:
cd cmake-build && ctest --extra-verbose --output-on-failure

run:
cd cmake-exec/$(SET) && ./$(SET) $(TXT)

run-vis:
cd visualtests-out && ./visualtests

build-dev:
cmake -B ./cmake-build -DOPT=$(OPT) -DOMP=$(OMP) -DVIS=$(VIS) -DSET=$(SET) -DTXT=$(TXT) -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ && cmake --build ./cmake-build

build:
cmake -DOPT=ON -DOMP=ON -B ./cmake-build -DSET=$(SET) -DTXT=$(TXT) && cmake --build ./cmake-build

clean:
rm -rf *build*/ && rm -rf *exec*/

deps:
rm -rf deps && git clone https://github.com/kulakovri/MDOODZ-dependencies deps && cd deps && make install-hdf5 && make install-suitesparse

install-suitesparse:
rm -rf deps && git clone https://github.com/kulakovri/MDOODZ-dependencies deps && cd deps && make install-suitesparse
58 changes: 58 additions & 0 deletions MDLIB/Makefiles/makefile_Tib_M2
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# MDOODZ 7.0 makefile
SHELL := /bin/bash

# Compiler
CC = gcc-13

# Path to setup file folder
SET_PATH = ../SETS

#---------------------------------------------------#
# C flags
CFLAGS = -std=c99 -D _UMFPACK_ -I ./include/ -I ./

ifeq ($(OPT),yes)
CFLAGS += -O3 -ftree-vectorize -funroll-loops -finline -fomit-frame-pointer -march=native
else
CFLAGS += -g -Wall -O0 -fno-inline -fno-omit-frame-pointer
endif

ifeq ($(OMP),yes)
CFLAGS += -fopenmp -D _OMP_
else
CFLAGS += -Wno-unknown-pragmas
endif

ifeq ($(VG),yes)
CFLAGS += -D _VG_ -Wno-format-zero-length
endif

ifeq ($(NEW_INPUT),yes)
CFLAGS += -D _NEW_INPUT_
endif

CFLAGS += -Wno-unused-variable -Wno-comment
#---------------------------------------------------#
# Libraries
LIBS = -lz -lhdf5

# Related to SuiteSparse
LIBS += -L /usr/lib/ -llapack -lcxsparse -lumfpack -lcblas -lamd -lcholmod -lcolamd -lbtf -lsuitesparseconfig -lblas

# Link to openmp
ifeq ($(OMP),yes)
LIBS += -lgomp
endif

#---------------------------------------------------#
# Rules
FILES = MeltingRoutines.o AnisotropyRoutines.o Main_DOODZ.o FD_Jacobian.o RheologyParticles.o ChemicalRoutines.o ParticleReseeding.o Solvers.o StokesRoutines.o StokesAssemblyDecoupled.o AdvectionRoutines.o RheologyDensity.o HDF5Output.o SparseTools.o ThermalRoutines.o ThermalSolver.o ParticleRoutines.o FreeSurface.o FlowLaws.o MemoryAllocFree.o InputOutput.o MiscFunctions.o GridRoutines.o Setup.o $(SET_PATH)/$(SET).o


all: Doodzi_$(SET)
Doodzi_$(SET): ${FILES}
$(CC) ${FILES} -o $(SET) ${LIBS}

clean:
cp $(SET_PATH)/$(SET).txt .
rm -rf *o ./$(SET_PATH)/*.o $(SET)

0 comments on commit 76e4a39

Please sign in to comment.