Skip to content
Snippets Groups Projects
Commit d0999769 authored by Peter W. Draper's avatar Peter W. Draper Committed by Matthieu Schaller
Browse files

Move executable out of examples

parent 541deae3
Branches
Tags
14 merge requests!1693More threapool plotting tweaks,!1668before Mag.Egy in all the flavors,!1663Initial sync to work again,!1662Initial sync from previous months,!1642When searching for more particles in a ghost task we walk up the cell tree,...,!1633When searching for more particles in a ghost task we walk up the cell tree,...,!1631Solving issues with different Hydro Schemes,!1620Mhd canvas,!1619Mhd canvas,!1617Update to from main branch to Canvas to MHD_FS,!1616Mhd canvas into MHD_FS,!1597Mhd canvas,!1596Master,!1531Move executable out of examples
Showing
with 90 additions and 22 deletions
...@@ -30,5 +30,74 @@ SUBDIRS += examples/Cooling/CoolingRates ...@@ -30,5 +30,74 @@ SUBDIRS += examples/Cooling/CoolingRates
endif endif
DIST_SUBDIRS = $(SUBDIRS) examples/Cooling/CoolingRates DIST_SUBDIRS = $(SUBDIRS) examples/Cooling/CoolingRates
# Common flags
MYFLAGS =
# Add the source directory and the non-standard paths to the included library headers to CFLAGS
AM_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/argparse $(HDF5_CPPFLAGS) \
$(GSL_INCS) $(FFTW_INCS) $(NUMA_INCS) $(GRACKLE_INCS) $(OPENMP_CFLAGS) \
$(CHEALPIX_CFLAGS)
AM_LDFLAGS = $(HDF5_LDFLAGS)
# Extra libraries.
EXTRA_LIBS = $(GSL_LIBS) $(HDF5_LIBS) $(FFTW_LIBS) $(NUMA_LIBS) $(PROFILER_LIBS) \
$(TCMALLOC_LIBS) $(JEMALLOC_LIBS) $(TBBMALLOC_LIBS) $(GRACKLE_LIBS) \
$(CHEALPIX_LIBS)
# MPI libraries.
MPI_LIBS = $(PARMETIS_LIBS) $(METIS_LIBS) $(MPI_THREAD_LIBS) $(FFTW_MPI_LIBS)
MPI_FLAGS = -DWITH_MPI $(PARMETIS_INCS) $(METIS_INCS) $(FFTW_MPI_INCS)
# Programs.
bin_PROGRAMS = swift
# Also build the FOF tool?
if HAVESTANDALONEFOF
bin_PROGRAMS += fof
endif
# Do we have the CSDS?
if HAVECSDS
LD_CSDS = csds/src/.libs/libcsds_writer.a
else
LD_CSDS =
endif
# Build MPI versions as well?
if HAVEMPI
bin_PROGRAMS += swift_mpi
if HAVESTANDALONEFOF
bin_PROGRAMS += fof_mpi
endif
endif
# engine_policy_setaffinity is available?
if HAVESETAFFINITY
ENGINE_POLICY_SETAFFINITY=| engine_policy_setaffinity
else
ENGINE_POLICY_SETAFFINITY=
endif
# Sources for swift
swift_SOURCES = swift.c
swift_CFLAGS = $(MYFLAGS) $(AM_CFLAGS) -DENGINE_POLICY="engine_policy_keep $(ENGINE_POLICY_SETAFFINITY)"
swift_LDADD = src/libswiftsim.la argparse/libargparse.la $(VELOCIRAPTOR_LIBS) $(EXTRA_LIBS) $(LD_CSDS)
# Sources for swift_mpi, do we need an affinity policy for MPI?
swift_mpi_SOURCES = swift.c
swift_mpi_CFLAGS = $(MYFLAGS) $(AM_CFLAGS) $(MPI_FLAGS) -DENGINE_POLICY="engine_policy_keep $(ENGINE_POLICY_SETAFFINITY)"
swift_mpi_LDADD = src/libswiftsim_mpi.la argparse/libargparse.la $(MPI_LIBS) $(VELOCIRAPTOR_MPI_LIBS) $(EXTRA_LIBS) $(LD_CSDS)
# Sources for fof
fof_SOURCES = swift_fof.c
fof_CFLAGS = $(MYFLAGS) $(AM_CFLAGS) -DENGINE_POLICY="engine_policy_keep $(ENGINE_POLICY_SETAFFINITY)"
fof_LDADD = src/.libs/libswiftsim.a argparse/.libs/libargparse.a $(VELOCIRAPTOR_LIBS) $(EXTRA_LIBS) $(LD_CSDS)
# Sources for fof_mpi, do we need an affinity policy for MPI?
fof_mpi_SOURCES = swift_fof.c
fof_mpi_CFLAGS = $(MYFLAGS) $(AM_CFLAGS) $(MPI_FLAGS) -DENGINE_POLICY="engine_policy_keep $(ENGINE_POLICY_SETAFFINITY)"
fof_mpi_LDADD = src/.libs/libswiftsim_mpi.a argparse/.libs/libargparse.a $(MPI_LIBS) $(VELOCIRAPTOR_MPI_LIBS) $(EXTRA_LIBS) $(LD_CSDS)
# Non-standard files that should be part of the distribution. # Non-standard files that should be part of the distribution.
EXTRA_DIST = INSTALL.swift .clang-format format.sh EXTRA_DIST = INSTALL.swift .clang-format format.sh
...@@ -107,15 +107,14 @@ This may be required as a dependency of HEALPix. ...@@ -107,15 +107,14 @@ This may be required as a dependency of HEALPix.
Initial Setup Initial Setup
------------- -------------
We use autotools for setup. To get a basic running version of the code We use autotools for setup. To get a basic running version of the code use:
(the binary is created in swiftsim/examples) on most platforms, run
.. code-block:: bash .. code-block:: bash
./autogen.sh ./autogen.sh
./configure ./configure
make make
the executable binaries are found in the top directory.
MacOS Specific Oddities MacOS Specific Oddities
~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
......
...@@ -20,7 +20,7 @@ then ...@@ -20,7 +20,7 @@ then
fi fi
# Run SWIFT # Run SWIFT
../../swift --hydro --cosmology --cooling --threads=4 const_cosmo_temp_evol.yml 2>&1 | tee output.log ../../../swift --hydro --cosmology --cooling --threads=4 const_cosmo_temp_evol.yml 2>&1 | tee output.log
# Plot the result # Plot the result
python3 plot_thermal_history.py cooling_box python3 plot_thermal_history.py cooling_box
...@@ -21,7 +21,7 @@ then ...@@ -21,7 +21,7 @@ then
fi fi
# Run SWIFT # Run SWIFT
../../swift --hydro --cooling --threads=4 -n 1000 coolingBox.yml ../../../swift --hydro --cooling --threads=4 -n 1000 coolingBox.yml
# Check energy conservation and cooling rate # Check energy conservation and cooling rate
python3 plotEnergy.py python3 plotEnergy.py
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
echo "Generating initial conditions for the isothermal potential box example..." echo "Generating initial conditions for the isothermal potential box example..."
python3 makeIC.py 10000 python3 makeIC.py 10000
../../swift --external-gravity --hydro --cooling --threads=16 cooling_halo.yml 2>&1 | tee output.log ../../../swift --external-gravity --hydro --cooling --threads=16 cooling_halo.yml 2>&1 | tee output.log
python3 radial_profile.py 2. 200 100 python3 radial_profile.py 2. 200 100
......
...@@ -5,7 +5,7 @@ echo "Generating initial conditions for the isothermal potential box example..." ...@@ -5,7 +5,7 @@ echo "Generating initial conditions for the isothermal potential box example..."
python3 makeIC.py 10000 python3 makeIC.py 10000
# Run SWIFT with external potential, SPH and cooling # Run SWIFT with external potential, SPH and cooling
../../swift --external-gravity --hydro --cooling --threads=1 cooling_halo.yml 2>&1 | tee output.log ../../../swift --external-gravity --hydro --cooling --threads=1 cooling_halo.yml 2>&1 | tee output.log
# python3 radial_profile.py 10 # python3 radial_profile.py 10
......
...@@ -14,7 +14,7 @@ then ...@@ -14,7 +14,7 @@ then
python3 makeIC.py python3 makeIC.py
fi fi
swift_location="../../swift" swift_location="../../../swift"
rm data/redshift_dependence_*_z_*.hdf5 rm data/redshift_dependence_*_z_*.hdf5
......
...@@ -12,7 +12,7 @@ if [ ! -f feedback.hdf5 ]; then ...@@ -12,7 +12,7 @@ if [ ! -f feedback.hdf5 ]; then
fi fi
# Run SWIFT # Run SWIFT
../../swift --hydro --cooling --limiter --threads=4 feedback.yml 2>&1 | tee output.log ../../../swift --hydro --cooling --limiter --threads=4 feedback.yml 2>&1 | tee output.log
# Plot the solution # Plot the solution
python3 plotSolution.py 5 python3 plotSolution.py 5
......
...@@ -17,7 +17,7 @@ do ...@@ -17,7 +17,7 @@ do
cd default_diffmax_$diffusion_alpha_max cd default_diffmax_$diffusion_alpha_max
../../../swift --hydro --cooling --limiter --threads=16 --param="SPH:diffusion_alpha_max:${diffusion_alpha_max}" ../feedback.yml 2>&1 | tee output.log ../../../../swift --hydro --cooling --limiter --threads=16 --param="SPH:diffusion_alpha_max:${diffusion_alpha_max}" ../feedback.yml 2>&1 | tee output.log
cd .. cd ..
...@@ -25,7 +25,7 @@ do ...@@ -25,7 +25,7 @@ do
cd nocool_diffmax_$diffusion_alpha_max cd nocool_diffmax_$diffusion_alpha_max
../../../swift --hydro --temperature --limiter --threads=16 --param="SPH:diffusion_alpha_max:${diffusion_alpha_max}" ../feedback.yml 2>&1 | tee output.log ../../../../swift --hydro --temperature --limiter --threads=16 --param="SPH:diffusion_alpha_max:${diffusion_alpha_max}" ../feedback.yml 2>&1 | tee output.log
cd .. cd ..
done done
...@@ -8,7 +8,7 @@ then ...@@ -8,7 +8,7 @@ then
fi fi
# Run SWIFT # Run SWIFT
../../swift --cosmology --hydro --threads=1 sodShock.yml 2>&1 | tee output.log ../../../swift --cosmology --hydro --threads=1 sodShock.yml 2>&1 | tee output.log
# Plot the result # Plot the result
python3 plotSolution.py 1 python3 plotSolution.py 1
...@@ -13,6 +13,6 @@ then ...@@ -13,6 +13,6 @@ then
fi fi
# Run SWIFT # Run SWIFT
../../swift --cosmology --hydro --threads=4 sodShock.yml 2>&1 | tee output.log ../../../swift --cosmology --hydro --threads=4 sodShock.yml 2>&1 | tee output.log
python3 plotSolution.py 1 python3 plotSolution.py 1
...@@ -13,6 +13,6 @@ then ...@@ -13,6 +13,6 @@ then
fi fi
# Run SWIFT # Run SWIFT
../../swift --cosmology --hydro --threads=4 sodShock.yml 2>&1 | tee output.log ../../../swift --cosmology --hydro --threads=4 sodShock.yml 2>&1 | tee output.log
python3 plotSolution.py 1 python3 plotSolution.py 1
...@@ -8,7 +8,7 @@ then ...@@ -8,7 +8,7 @@ then
fi fi
# Run SWIFT # Run SWIFT
../../swift --cosmology --hydro --threads=1 toroTest2.yml 2>&1 | tee output.log ../../../swift --cosmology --hydro --threads=1 toroTest2.yml 2>&1 | tee output.log
# Plot the result # Plot the result
python3 plotSolution.py 1 python3 plotSolution.py 1
...@@ -13,7 +13,7 @@ then ...@@ -13,7 +13,7 @@ then
fi fi
# Run SWIFT # Run SWIFT
../../swift --hydro --cosmology --self-gravity --threads=8 constant_volume.yml 2>&1 | tee output.log ../../../swift --hydro --cosmology --self-gravity --threads=8 constant_volume.yml 2>&1 | tee output.log
# Plot the result # Plot the result
python3 plotSolution.py $i python3 plotSolution.py $i
...@@ -8,4 +8,4 @@ then ...@@ -8,4 +8,4 @@ then
fi fi
# Run SWIFT # Run SWIFT
../../swift -c -G --threads=8 neutrino_cosmo.yml 2>&1 | tee output.log ../../../swift -c -G --threads=8 neutrino_cosmo.yml 2>&1 | tee output.log
...@@ -8,7 +8,7 @@ then ...@@ -8,7 +8,7 @@ then
fi fi
# Run SWIFT # Run SWIFT
../../swift --hydro --cosmology --self-gravity --threads=8 zeldovichPancake.yml 2>&1 | tee output.log ../../../swift --hydro --cosmology --self-gravity --threads=8 zeldovichPancake.yml 2>&1 | tee output.log
# Plot the result # Plot the result
for i in {0..119} for i in {0..119}
......
...@@ -7,5 +7,5 @@ then ...@@ -7,5 +7,5 @@ then
./getIC.sh ./getIC.sh
fi fi
../../swift --cosmology --self-gravity --threads=16 eagle_100.yml 2>&1 | tee output.log ../../../swift --cosmology --self-gravity --threads=16 eagle_100.yml 2>&1 | tee output.log
...@@ -7,5 +7,5 @@ then ...@@ -7,5 +7,5 @@ then
./getIC.sh ./getIC.sh
fi fi
../../swift --cosmology --self-gravity --threads=16 eagle_12.yml 2>&1 | tee output.log ../../../swift --cosmology --self-gravity --threads=16 eagle_12.yml 2>&1 | tee output.log
...@@ -7,5 +7,5 @@ then ...@@ -7,5 +7,5 @@ then
./getIC.sh ./getIC.sh
fi fi
../../swift --cosmology --self-gravity --threads=16 eagle_25.yml 2>&1 | tee output.log ../../../swift --cosmology --self-gravity --threads=16 eagle_25.yml 2>&1 | tee output.log
...@@ -7,5 +7,5 @@ then ...@@ -7,5 +7,5 @@ then
./getIC.sh ./getIC.sh
fi fi
../../swift --cosmology --self-gravity --threads=16 eagle_50.yml 2>&1 | tee output.log ../../../swift --cosmology --self-gravity --threads=16 eagle_50.yml 2>&1 | tee output.log
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment