# There are a number of code options that need to be switched on/off # on compile-time. # # From the following list, please select the desired options: #OPT1 = -DPERIODIC # enables periodic boundaries conditions OPT2 = -DCOOLING # radiative heating and cooling OPT3 = -DDIAG # outputs performance diagnostic for tree walks OPT4 = -DENERGYSTATS # outputs energy.txt file OPT5 = -DOUTPUTPOT # outputs the potential energy into the snapshot #OPT6 = -DINFOSTATS # outputs info.txt file #OPT7 = -DINLINE # compiler accepts the `inline' statement #OPT8 = -DT3E # needed on the T3E #OPT9 = -DRECTREECONS # switches on recursive computation of multipole moments OPT10 = -DBMAX # enables very conservative node-opening #OPT11 = -DVELDISP # selects computation of velocity dispersion/density for dark matter OPT12 = -DMOREPARAMS # enables additional parameters in parameterfile for star formation #OPT13 = -DSFR # switches on star formation #OPT14 = -DDIVCHECK # switches on criteria of convergence for star formation #OPT15 = -DCLOUDS # switches on multi-phase model for star formation #OPT16 = -DSTELLARAGE # Switches on computation of mean time of stellar formation redshift/age #OPT17 = -DSTOCHASTICSFR # switches on stochastic star formation events as opposed to continuous treatment in standard scheme OPT18 = -DENTROPY # selects conservative entropy integration #OPT19 = -DTURBULENT # selects turbulent model of feedback #OPT20 = -DALTTAU # selects other tau's when doing feedback timescale #OPT21 = -DSFRHIST # write patrik's SFRHIST file #OPT22 = -DISOTHERMALGAS # sets gas to be isothermal at temperature read in from IC file CC = pgcc # sets the C-compiler (on NERSC=mpcc, UpsAnd=pgcc on linux=mpicc) OPTIMIZE = -O2 # -qMAXMEM=32768 -qflttrap=overflow:underflow:zerodivide:invalid:inexact:enable:imprecise OPTIONS = $(OPTIMIZE) $(OPT1) $(OPT2) $(OPT3) $(OPT4) $(OPT5) $(OPT6)\ $(OPT7) $(OPT8) $(OPT9) $(OPT10) $(OPT11) $(OPT12) $(OPT13)\ $(OPT14) $(OPT15) $(OPT16) $(OPT17) $(OPT18) $(OPT19) $(OPT20)\ $(OPT21) $(OPT22) EXEC = P-Gadget-nosf OBJS = main.o run.o predict.o begrun.o endrun.o global.o \ timestep.o init.o restart.o io.o sfr.o \ accel.o read_ic.o cooling.o dissolvegas.o \ system.o allocate.o density.o \ gravtree.o timeline.o hydra.o veldisp.o \ domain.o allvars.o potential.o \ forcetree.o ewald.o read_ic_cluster.o INCL = allvars.h proto.h forcetree.h tags.h cooling.h domain.h CFLAGS = $(OPTIONS) -I/opt/scali/include LIBS = -lm -L/opt/scali/lib -lmpi # order is important here $(EXEC): $(OBJS) $(CC) $(OBJS) $(LIBS) -o $(EXEC) $(OBJS): $(INCL) .PHONY : clean clean: rm -f $(OBJS) $(EXEC)