amun-code/src/makefile
Grzegorz Kowal 3c74c9a8ea More work on the block refinement.
The initial block mesh refinement seems to be optimized now. However,
more work in the MPI version is required, e.g. refine blocks on all CPUs
until the number of blocks exceeds some number dependent on the number
of CPUs. From that point refine independently on each CPU.

The initial work on the mesh update has been done too, but the processes
do not exchange block information.
2009-05-18 22:46:19 +02:00

125 lines
3.3 KiB
Makefile

#-------------------------------------------------------------------------------
#
# include configuration
#
ifeq ($(wildcard make.config),make.config)
$(info )
$(info Using customized "$(wildcard make.config)" file.)
$(info )
include make.config
else
$(info )
$(info Could not find the customized "make.config" file!)
$(info )
$(info Copy "make.default" to "make.config" and customize it, if you do not want the default configuration.)
$(info )
$(shell sleep 5)
include make.default
endif
#-------------------------------------------------------------------------------
#
# host variables
#
HOST := $(shell hostname -f)
OS := $(shell uname)
DATE := $(shell date +%Y%m%d%H%M)
include hosts/default
ifeq ($(wildcard hosts/$(HOST)),hosts/$(HOST))
$(info Using compiler setup from "hosts/$(HOST)" file.)
$(info )
include hosts/$(HOST)
endif
#-------------------------------------------------------------------------------
#
# pass additional flags to the compiler
#
# number of dimensions
#
FFLAGS += -DNDIMS=${NDIMS}
ifeq ($(SHAPE),Y)
FFLAGS += -DSHAPE
endif
# output data format
#
FFLAGS += -D${OUTPUT}
# precision
#
FFLAGS += -DPREC=${PREC}
# time integration method
#
FFLAGS += -D${TIME}
# set of equations
#
FFLAGS += -D${EQS}
# equation of state
#
FFLAGS += -D${EOS}
# flux approximation method
#
FFLAGS += -D${FLUX}
#-------------------------------------------------------------------------------
.SUFFIXES:
.SUFFIXES: .F90 .o
.F90.o:
$(FC) -c $(FFLAGS) $*.F90
#-------------------------------------------------------------------------------
name = godunov-amr
default: $(name).x
sources = blocks.F90 boundaries.F90 config.F90 driver.F90 error.F90 \
evolution.F90 interpolation.F90 io.F90 mesh.F90 mpitools.F90 \
problem.F90 scheme.F90 timer.F90
objects = blocks.o boundaries.o config.o driver.o error.o \
evolution.o interpolation.o io.o mesh.o mpitools.o \
problem.o scheme.o timer.o
files = $(sources) makefile make.default config.in license.txt hosts
$(name).x: $(objects)
$(LD) $(LDFLAGS) $(objects) $(LIBS) -o $(name).x
arch: $(files)
tar czvf $(name)-$(DATE).tar.gz $(files)
clean:
rm -rf *.x *.o *.mod *.il
clean-all:
rm -rf *.x *.o *.mod *.il *.out *.dat *.bin *.h5 *.hdf *~ gprof.txt
#-------------------------------------------------------------------------------
blocks.o : blocks.F90 config.o error.o mpitools.o
boundaries.o : boundaries.F90 blocks.o config.o error.o interpolation.o \
mpitools.o
config.o : config.F90 error.o
driver.o : driver.F90 config.o evolution.o io.o mesh.o mpitools.o \
timer.o
error.o : error.F90
evolution.o : evolution.F90 blocks.o boundaries.o config.o mesh.o \
mpitools.o problem.o scheme.o timer.o
interpolation.o : interpolation.F90
io.o : io.F90 blocks.o error.o mesh.o mpitools.o scheme.o
mesh.o : mesh.F90 blocks.o config.o error.o interpolation.o \
mpitools.o problem.o
mpitools.o : mpitools.F90
problem.o : problem.F90 blocks.o
scheme.o : scheme.F90 blocks.o config.o interpolation.o
timer.o : timer.F90
#-------------------------------------------------------------------------------