Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • 840-unit-test-testtimeline-fails
  • 875-wendland-c6-missing-neighbour-contributions
  • 887-code-does-not-compile-with-parmetis-installed-locally-but-without-metis
  • CubeTest
  • FS_Del
  • GEARRT_Iliev1
  • GEARRT_Iliev3
  • GEARRT_Iliev4
  • GEARRT_Iliev5
  • GEARRT_Iliev5-fixed-nr-subcycles
  • GEARRT_Iliev7
  • GEARRT_Iliev_static
  • GEARRT_Ivanova
  • GEARRT_fixed_nr_subcycles
  • GEARRT_injection_tests_Iliev0
  • GPU_swift
  • GrackleCoolingUpdates2
  • Lambda-T-table
  • MAGMA2
  • MAGMA2_matthieu
  • MHD_FS
  • MHD_FS_TESTs
  • MHD_FS_VP_AdvectGauge
  • MHD_Orestis
  • MHD_canvas
  • MHD_canvas_RF_128
  • MHD_canvas_RF_growth_rate
  • MHD_canvas_RobertsFlow
  • MHD_canvas_SPH_errors
  • MHD_canvas_matthieu
  • MHD_canvas_nickishch
  • MHD_canvas_nickishch_Lorentz_force_test
  • MHD_canvas_nickishch_track_everything
  • MHD_canvas_sid
  • OAK/CPAW_updates
  • OAK/LoopAdvectionTest
  • OAK/adaptive_divv
  • OAK/kinetic_dedner
  • REMIX_cosmo
  • RT_dualc
  • RT_recombination_radiation
  • RT_test_mladen
  • SIDM
  • SIDM_wKDSDK
  • SNdust
  • SPHM1RT_CosmologicalStromgrenSphere
  • SPHM1RT_bincheck
  • SPHM1RT_smoothedRT
  • TangoSIDM
  • TestPropagation3D
  • Test_fixedhProb
  • activate_fewer_comms
  • active_h_max_optimization
  • adaptive_softening_Lieuwe
  • add_2p5D
  • add_black_holes_checks
  • adding_sidm_to_master
  • agn_crksph
  • agn_crksph_subtask_speedup
  • amd-optimization
  • arm_vec
  • automatic_tasks
  • better_ray_RNG
  • black_holes_accreted_angular_momenta_from_gas
  • burkert-potential
  • c11
  • c11_atomics_copy
  • cancel_all_sorts
  • cell_exchange_improvements
  • cell_types
  • cherry-pick-cd1c39e0
  • comm_tasks_are_special
  • conduction_velocities
  • cpp-fixes
  • cuda_test
  • darwin/adaptive_softening
  • darwin/gear_chemistry_fluxes
  • darwin/gear_mechanical_feedback
  • darwin/gear_preSN_feedback
  • darwin/gear_radiation
  • darwin/simulations
  • darwin/sink_formation_proba
  • darwin/sink_mpi
  • darwin/sink_mpi_physics
  • dead-time-stats
  • derijcke_cooling
  • dev_cms
  • do-not-activate-empty-star-pairs
  • domain_zoom_nometis
  • drift_flag_debug_check
  • driven_turbulence
  • driven_turbulence_forcings
  • engineering
  • eos_updates
  • evrard_disc
  • expand_fof_2022
  • explict_bkg_cdim
  • fewer_star_comms
  • fewer_timestep_comms_no_empty_pairs
  • fix-velcut
  • v0.0
  • v0.1
  • v0.1.0-pre
  • v0.2.0
  • v0.3.0
  • v0.4.0
  • v0.5.0
  • v0.6.0
  • v0.7.0
  • v0.8.0
  • v0.8.1
  • v0.8.2
  • v0.8.3
  • v0.8.4
  • v0.8.5
  • v0.9.0
  • v1.0.0
  • v2025.01
  • v2025.04
119 results

Target

Select target project
  • dc-oman1/swiftsim
  • swift/swiftsim
  • pdraper/swiftsim
  • tkchan/swiftsim
  • dc-turn5/swiftsim
5 results
Select Git revision
Show changes
Commits on Source (4116)
......@@ -3,4 +3,17 @@ Language: Cpp
BasedOnStyle: Google
KeepEmptyLinesAtTheStartOfBlocks: true
PenaltyBreakAssignment: 2
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 3
SortPriority: 3
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 4
- Regex: '<[[:alnum:].]+>'
Priority: 5
- Regex: '.*'
Priority: 2
SortPriority: 0
- Regex: config.h
Priority: 1
...
......@@ -13,6 +13,10 @@ config.sub
ltmain.sh
libtool
build
swift
swift_mpi
fof
fof_mpi
src/version_string.h
swift*.tar.gz
......@@ -22,40 +26,66 @@ doc/html/
doc/latex/
doc/man/
doc/Doxyfile
doc/RTD/source/SubgridModels/*/*.png
doc/RTD/source/RadiativeTransfer/full_dependency_graph_RT.png
examples/swift
examples/swift_mpi
examples/fof
examples/fof_mpi
examples/*/*/*.xmf
examples/*/*/*.dat
examples/*/*/*.png
examples/*/*/*.pdf
examples/*/*/*.mp4
examples/*/*/*.txt
examples/*/*/*.rst
examples/*/*/*.hdf5
examples/*/*/*.csv
examples/*/*/*.dot
examples/*/*/partition_fixed_costs.h
examples/**/cell_hierarchy.html
examples/*/*/energy.txt
examples/**/task_level.txt
examples/*/*/timesteps_*.txt
examples/**/timesteps.txt
examples/**/SFR.txt
examples/**/statistics.txt
examples/**/partition_fixed_costs.h
examples/*/*/memuse_report-step*.dat
examples/*/*/memuse_report-step*.log
examples/*/*/restart/*
examples/*/*/used_parameters.yml
examples/*/stf_output*
examples/*/stf.*
examples/*/fof_output*
examples/*/log*
examples/*/*/used_parameters.yml
examples/*/*/unused_parameters.yml
examples/*/*/fof_used_parameters.yml
examples/*/*/fof_unused_parameters.yml
examples/*/*.mpg
examples/*/*/gravity_checks_*.dat
examples/*/*/coolingtables.tar.gz
examples/*/*/coolingtables
examples/*/*/yieldtables.tar.gz
examples/*/*/yieldtables
examples/*/*/photometry.tar.gz
examples/*/*/photometry
examples/*/*/plots
examples/*/*/snapshots
examples/*/*/restart
examples/Cooling/CoolingRates/cooling_rates
examples/Cooling/CoolingRates/cooling_element_*.dat
examples/Cooling/CoolingRates/cooling_output.dat
examples/SubgridTests/StellarEvolution/StellarEvolutionSolution*
examples/SubgridTests/CosmologicalStellarEvolution/StellarEvolutionSolution*
examples/SmallCosmoVolume/SmallCosmoVolume_DM/power_spectra
examples/SmallCosmoVolume/SmallCosmoVolume_cooling/snapshots/
examples/SmallCosmoVolume/SmallCosmoVolume_hydro/snapshots/
examples/**/CloudyData_UVB=HM2012.h5
examples/**/CloudyData_UVB=HM2012_shielded.h5
examples/**/CloudyData_UVB=HM2012_high_density.h5
examples/**/chemistry-AGB+OMgSFeZnSrYBaEu-16072013.h5
examples/**/POPIIsw.h5
examples/**/GRACKLE_INFO
examples/**/snap/
examples/SinkParticles/HomogeneousBox/snapshot_0003restart.hdf5
tests/testActivePair
tests/testActivePair.sh
......@@ -104,14 +134,23 @@ tests/testReading
tests/testSingle
tests/testTimeIntegration
tests/testSPHStep
tests/testExp
tests/testErfc
tests/testKernel
tests/testKernelGrav
tests/testKernelLongGrav
tests/testFFT
tests/testInteractions
tests/testInteractions.sh
tests/testSymmetry
tests/testDistance
tests/testHydroMPIrules
tests/testMaths
tests/testAtomic
tests/testRandom
tests/testRandomSpacing
tests/testRandomPoisson
tests/testRandomCone
tests/testThreadpool
tests/testParser
tests/testFeedback
......@@ -126,9 +165,11 @@ tests/test125cells.sh
tests/test125cellsPerturbed.sh
tests/testParser.sh
tests/testReading.sh
tests/testNeutrinoCosmology.sh
tests/testSelectOutput.sh
tests/unused_parser_output.yml
tests/used_parser_output.yml
tests/output_list_params.yml
tests/testAdiabaticIndex
tests/testRiemannExact
tests/testRiemannTRRS
......@@ -138,9 +179,10 @@ tests/testVoronoi1D
tests/testVoronoi2D
tests/testVoronoi3D
tests/testDump
tests/testLogger
tests/testCSDS
tests/benchmarkInteractions
tests/testGravityDerivatives
tests/testGravitySpeed
tests/testPotentialSelf
tests/testPotentialPair
tests/testEOS
......@@ -152,7 +194,12 @@ tests/testOutputList
tests/testCbrt
tests/testFormat.sh
tests/testCooling
tests/testComovingCooling
tests/testHashmap
tests/testNeutrinoCosmology
tests/testNeutrinoFermiDirac
tests/testLog
tests/testTimeline
tests/*.png
tests/*.txt
......@@ -164,14 +211,21 @@ theory/SPH/Flavours/sph_flavours.pdf
theory/SPH/EoS/eos.pdf
theory/SPH/*.pdf
theory/paper_pasc/pasc_paper.pdf
theory/Multipoles/alpha_derivatives.pdf
theory/Multipoles/alpha_powers.pdf
theory/Multipoles/chi_derivatives.pdf
theory/Multipoles/sigma_derivatives.pdf
theory/Multipoles/fmm.pdf
theory/Multipoles/fmm_standalone.pdf
theory/Multipoles/potential.pdf
theory/Multipoles/potential_long.pdf
theory/Multipoles/potential_short.pdf
theory/Multipoles/force_short.pdf
theory/Multipoles/mac_potential.pdf
theory/Cosmology/cosmology.pdf
theory/Cooling/eagle_cooling.pdf
theory/Gizmo/gizmo-implementation-details/gizmo-implementation-details.pdf
theory/RadiativeTransfer/GEARRT/GEARRT.pdf
m4/libtool.m4
m4/ltoptions.m4
......@@ -193,6 +247,7 @@ src/equation_of_state/planetary/*.txt
# Intel compiler optimization reports
*.optrpt
*.opt.yaml
# Object files
.deps/
......@@ -238,6 +293,9 @@ src/equation_of_state/planetary/*.txt
*.out
*.toc
## Figures
*.svg
## Intermediate documents:
*.dvi
*-converted-to.*
......@@ -345,3 +403,9 @@ sympy-plots-for-*.tex/
# vim
*.swp
# black formatting
black_formatting_env
# vscode
*.json
[submodule "csds"]
path = csds
url = https://gitlab.cosma.dur.ac.uk/lhausammann/csds-reader.git
Matthieu Schaller schaller@strw.leidenuniv.nl
Pedro Gonnet gonnet@google.com
Matthieu Schaller matthieu.schaller@durham.ac.uk
Aidan Chalk aidan.chalk@durham.ac.uk
Peter W. Draper p.w.draper@durham.ac.uk
Bert Vandenbroucke bert.vandenbroucke@gmail.com
......@@ -13,3 +13,22 @@ Josh Borrow joshua.borrow@durham.ac.uk
Loic Hausammann loic.hausammann@epfl.ch
Yves Revaz yves.revaz@epfl.ch
Jacob Kegerreis jacob.kegerreis@durham.ac.uk
Mladen Ivkovic mladen.ivkovic@durham.ac.uk
Stuart McAlpine stuart.mcalpine@helsinki.fi
Folkert Nobels nobels@strw.leidenuniv.nl
John Helly j.c.helly@durham.ac.uk
Alexei Borissov alexei.borissov@ed.ac.uk
Yannick Bahe bahe@strw.leidenuniv.nl
Roi Kugel kugel@strw.leidenuniv.nl
Evgenii Chaikin chaikin@strw.leidenuniv.nl
Sylvia Ploeckinger ploeckinger@lorentz.leidenuniv.nl
Willem Elbers willem.h.elbers@durham.ac.uk
TK Chan chantsangkeung@gmail.com
Marcel van Daalen daalen@strw.leidenuniv.nl
Filip Husko filip.husko@durham.ac.uk
Orestis Karapiperis karapiperis@lorentz.leidenuniv.nl
Stan Verhoeve s06verhoeve@gmail.com
Nikyta Shchutskyi shchutskyi@lorentz.leidenuniv.nl
Will Roper w.roper@sussex.ac.uk
Darwin Roduit darwin.roduit@alumni.epfl.ch
Jonathan Davies j.j.davies@ljmu.ac.uk
cff-version: 1.2.0
title: >-
SWIFT: SPH With Inter-dependent Fine-grained
Tasking
message: 'If you use this software, please cite it as below'
type: software
authors:
- given-names: Matthieu
family-names: Schaller
email: schaller@strw.leidenuniv.nl
affiliation: Leiden University
orcid: 'https://orcid.org/0000-0002-2395-4902'
- given-names: Gonnet
family-names: Pedro
- given-names: Peter
family-names: Draper
- given-names: Aidan
family-names: Chalk
- given-names: Bert
family-names: Vandenbroucke
- given-names: James
family-names: Willis
- given-names: Richard
family-names: Bower
- given-names: Josh
family-names: Borrow
- given-names: Loic
family-names: Hausammann
- given-names: Yves
family-names: Revaz
- given-names: Jacob
family-names: Kegerreis
- given-names: Mladen
family-names: Ivkovic
- given-names: Stuart
family-names: McAlpine
- given-names: Folkert
family-names: Nobels
- given-names: John
family-names: Helly
- given-names: Yannick
family-names: Bahé
- given-names: Willem
family-names: Elbers
- given-names: Filip
family-names: Husko
The SWIFT source code is using a variation of the 'Google' formatting style.
The script 'format.sh' in the root directory applies the clang-format-5.0
The script 'format.sh' in the root directory applies the clang-format-18
tool with our style choices to all the SWIFT C source file. Please apply
the formatting script to the files before submitting a merge request.
The Python scripts in the repository use default formatting enforced by
'black'. Since 'black' formatting still strongly depends on the version,
we currently enforce use of 'black==19.3b0' using a virtual environment.
The setup of the virtual environment and formatting of all PYthon
scripts is done automatically by the Python formatting script
'format_python.sh'. Please apply this script before submitting a merge
request containing new or updated Python scripts.
The SWIFT code comes with a series of unit tests that are run automatically
when a push to the master branch occurs. The suite can be run by doing a `make
check` in the root directory. Please check that the test suite still
......
### GNU LESSER GENERAL PUBLIC LICENSE
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Copyright (C) 2007 Free Software Foundation, Inc.
<https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
This version of the GNU Lesser General Public License incorporates the
terms and conditions of version 3 of the GNU General Public License,
supplemented by the additional permissions listed below.
0. Additional Definitions.
#### 0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the
GNU General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
"The Library" refers to a covered work governed by this License, other
than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
#### 1. Exception to Section 3 of the GNU GPL.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
#### 2. Conveying Modified Versions.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
- a) under this License, provided that you make a good faith effort
to ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
- b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
#### 3. Object Code Incorporating Material from Library Header Files.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from a
header file that is part of the Library. You may convey such object
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
- a) Give prominent notice with each copy of the object code that
the Library is used in it and that the Library and its use are
covered by this License.
- b) Accompany the object code with a copy of the GNU GPL and this
license document.
#### 4. Combined Works.
You may convey a Combined Work under terms of your choice that, taken
together, effectively do not restrict modification of the portions of
the Library contained in the Combined Work and reverse engineering for
debugging such modifications, if you also do each of the following:
- a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
- b) Accompany the Combined Work with a copy of the GNU GPL and this
license document.
- c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
- d) Do one of the following:
- 0) Convey the Minimal Corresponding Source under the terms of
this License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
- 1) Use a suitable shared library mechanism for linking with
the Library. A suitable mechanism is one that (a) uses at run
time a copy of the Library already present on the user's
computer system, and (b) will operate properly with a modified
version of the Library that is interface-compatible with the
Linked Version.
- e) Provide Installation Information, but only if you would
otherwise be required to provide such information under section 6
of the GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the Application
with a modified version of the Linked Version. (If you use option
4d0, the Installation Information must accompany the Minimal
Corresponding Source and Corresponding Application Code. If you
use option 4d1, you must provide the Installation Information in
the manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.)
#### 5. Combined Libraries.
You may place library facilities that are a work based on the Library
side by side in a single library together with other library
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
- a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities, conveyed under the terms of this License.
- b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
#### 6. Revised Versions of the GNU Lesser General Public License.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
as you received it specifies that a certain numbered version of the
GNU Lesser General Public License "or any later version" applies to
it, you have the option of following the terms and conditions either
of that published version or of any later version published by the
Free Software Foundation. If the Library as you received it does not
specify a version number of the GNU Lesser General Public License, you
may choose any version of the GNU Lesser General Public License ever
published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
......
......@@ -37,6 +37,8 @@ SWIFT has been successfully built and tested with the following compilers:
- GCC 4.8.x
- Intel ICC 15.0.x
- clang 3.4.x
- aocc 3.x
- icx (oneAPI) 2022.x
More recent versions and slightly older ones should also be able to
build the software.
......@@ -97,7 +99,7 @@ before you can build it.
- HDF5:
A HDF5 library (v. 1.8.x or higher) is required to read and
A HDF5 library (v. 1.10.x or higher) is required to read and
write particle data. One of the commands "h5cc" or "h5pcc"
should be available. If "h5pcc" is located then a parallel
HDF5 built for the version of MPI located should be
......@@ -180,7 +182,7 @@ before you can build it.
documentation.
- python:
Examples and solution script use python and rely on the numpy
Examples and solution script use python 3 and rely on the numpy
library version 1.8.2 or higher.
......@@ -189,6 +191,14 @@ before you can build it.
==================
The SWIFT source code uses a variation of 'Google' style. The script
'format.sh' in the root directory applies the clang-format-5.0 tool with our
'format.sh' in the root directory applies the clang-format-18 tool with our
style choices to all the SWIFT C source file. Please apply the formatting
script to the files before submitting a merge request.
The Python scripts in the repository use default formatting enforced by
'black'. Since 'black' formatting still strongly depends on the version,
we currently enforce use of 'black==19.3b0' using a virtual environment.
The setup of the virtual environment and formatting of all PYthon
scripts is done automatically by the Python formatting script
'format_python.sh'. Please apply this script before submitting a merge
request containing new or updated Python scripts.
# This file is part of SWIFT.
# Copyright (c) 2012 pedro.gonnet@durham.ac.uk
# 2015 matthieu.schaller@durham.ac.uk
# 2015 schaller@strw.leidenuniv.nl
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -19,10 +19,87 @@
ACLOCAL_AMFLAGS = -I m4
# Show the way...
SUBDIRS = src argparse examples doc tests tools
if HAVECSDS
SUBDIRS = csds
else
SUBDIRS =
endif
SUBDIRS += src argparse examples doc tests tools
if HAVEEAGLECOOLING
SUBDIRS += examples/Cooling/CoolingRates
DIST_SUBDIRS = $(SUBDIRS)
else
DIST_SUBDIRS = $(SUBDIRS) examples/Cooling/CoolingRates
endif
# 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) \
$(CHEALPIX_CFLAGS) $(LUSTREAPI_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) $(LUSTREAPI_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.
EXTRA_DIST = INSTALL.swift .clang-format format.sh
......@@ -6,7 +6,7 @@
/____/ |__/|__/___/_/ /_/
SPH With Inter-dependent Fine-grained Tasking
Version : 0.8.3
Version : 2025.04
Website: www.swiftsim.com
Twitter: @SwiftSimulation
......@@ -22,7 +22,7 @@ Parameters:
-h, --help show this help message and exit
Simulation options:
-b, --feedback Run with stars feedback.
-c, --cosmology Run with cosmological time integration.
--temperature Run with temperature calculation.
......@@ -30,21 +30,52 @@ Parameters:
-D, --drift-all Always drift all particles even the ones
far from active particles. This emulates
Gadget-[23] and GIZMO's default behaviours.
-F, --star-formation Run with star formation.
-F, --star-formation Run with star formation.
-g, --external-gravity Run with an external gravitational potential.
-G, --self-gravity Run with self-gravity.
-M, --multipole-reconstruction Reconstruct the multipoles every time-step.
-s, --hydro Run with hydrodynamics.
-S, --stars Run with stars.
-B, --black-holes Run with black holes.
-u, --fof Run Friends-of-Friends algorithm and
black holes seeding.
-k, --sinks Run with sink particles.
-u, --fof Run Friends-of-Friends algorithm to
perform black hole seeding.
--lightcone Generate lightcone outputs.
-x, --velociraptor Run with structure finding.
--line-of-sight Run with line-of-sight outputs.
--limiter Run with time-step limiter.
--sync Run with time-step synchronization
of particles hit by feedback events.
--csds Run with the Continuous Simulation Data
Stream (CSDS).
-R, --radiation Run with radiative transfer.
--power Run with power spectrum outputs.
Simulation meta-options:
--quick-lyman-alpha Run with all the options needed for the
quick Lyman-alpha model. This is equivalent
to --hydro --self-gravity --stars --star-formation
--cooling.
--eagle Run with all the options needed for the
EAGLE model. This is equivalent to --hydro
--limiter --sync --self-gravity --stars
--star-formation --cooling --feedback
--black-holes --fof.
--gear Run with all the options needed for the
GEAR model. This is equivalent to --hydro
--limiter --sync --self-gravity --stars
--star-formation --cooling --feedback.
--agora Run with all the options needed for the
AGORA model. This is equivalent to --hydro
--limiter --sync --self-gravity --stars
--star-formation --cooling --feedback.
Control options:
-a, --pin Pin runners using processor affinity.
--nointerleave Do not interleave memory allocations across
NUMA regions.
-d, --dry-run Dry run. Read the parameter file, allocates
memory but does not read the particles
from ICs. Exits before the start of time
......@@ -64,14 +95,24 @@ Parameters:
read from the parameter file. Can be used
more than once {sec:par:value}.
-r, --restart Continue using restart files.
-t, --threads=<int> The number of threads to use on each MPI
rank. Defaults to 1 if not specified.
-t, --threads=<int> The number of task threads to use on each
MPI rank. Defaults to 1 if not specified.
--pool-threads=<int> The number of threads to use on each MPI
rank for the threadpool operations.
Defaults to the numbers of task threads
if not specified.
-T, --timers=<int> Print timers every time-step.
-v, --verbose=<int> Run in verbose mode, in MPI mode 2 outputs
from all ranks.
-y, --task-dumps=<int> Time-step frequency at which task analysis
files and/or tasks are dumped.
-y, --task-dumps=<int> Time-step frequency at which task graphs
are dumped.
--cell-dumps=<int> Time-step frequency at which cell graphs
are dumped.
-Y, --threadpool-dumps=<int> Time-step frequency at which threadpool
tasks are dumped.
--dump-tasks-threshold=<flt> Fraction of the total step's time spent
in a task to trigger a dump of the task plot
on this step
See the file examples/parameter_example.yml for an example of parameter file.
Various hints on settings needed to get various MPIs running with SWIFT.
Last update 5th May 2020.
## Intel MPI
_Intel MPI 2018_ usually runs without any needs for special settings.
_Intel MPI 2019 and 2020_ can run for small tests, but without flags will
generally deadlock in the MPI exchanges of the engine, or worse. In that case
try the following settings.
```
FI_OFI_RXM_RX_SIZE=4096
FI_OFI_RXM_TX_SIZE=4096
FI_UNIVERSE_SIZE=2048
```
If you want use the `release_mt` library, then you also need to use:
```
source $I_MPI_ROOT/intel64/bin/mpivars.sh release_mt
```
when initializing the library environment. Some success has also been seen
using the asynchronous progression settings:
```
I_MPI_ASYNC_PROGRESS=1
I_MPI_ASYNC_PROGRESS_THREADS=1
```
(note these are tested with `2019 update-4` and `2020 update-1` on Mellanox).
## OpenMPI
_Open MPI_ comes in many flavours with many combinations of underlying
transport libraries and running on many different fabrics. A complete
description of all combinations is beyond the scope of this guide.
On Mellanox hardware, we have had success running version 4.0 with the
UCX layer version 1.6 and using the following settings:
```
-mca coll_hcoll_enable 0
UCX_TLS=ud_x,shm,self
UCX_RC_MLX5_TM_ENABLE=n
UCX_DC_MLX5_TM_ENABLE=n
```
These environment variables (set on the Mellanox-base cosma system in Durham)
for version 4.0.5 with the UCX backend can also be useful:
```
OMPI_MCA_btl ^openib
OMPI_MCA_btl_openib_flags 1
OMPI_MCA_plm_rsh_num_concurrent 768
OMPI_MCA_mpool_rdma_rcache_size_limit 209715200
```
\ No newline at end of file
<a name="logo"/>
<div align="center">
<a href="https://www.swiftsim.com/" target="_blank">
<img src="https://swift.strw.leidenuniv.nl/SWIFT_banner.jpg" alt="SWIFT banner" width="1016" height="242"></img>
</a>
</div>
SWIFT: SPH WIth Fine-grained inter-dependent Tasking
====================================================
......@@ -11,7 +18,7 @@ More general information about SWIFT is available on the project
[webpages](http://www.swiftsim.com).
For information on how to _run_ SWIFT, please consult the onboarding guide
available [here](http://www.swiftsim.com/onboarding.pdf). This includes
available [here](https://swift.strw.leidenuniv.nl/onboarding.pdf). This includes
dependencies, and a few examples to get you going.
We suggest that you use the latest release branch of SWIFT, rather than the
......@@ -28,11 +35,53 @@ Please feel free to submit issues to this repository, or even pull
requests. We will try to deal with them as soon as possible, but as the
core development team is quite small this could take some time.
Disclaimer
----------
We would like to emphasise that SWIFT comes without any warranty of accuracy,
correctness or efficiency. As mentioned in the license, the software comes
`as-is` and the onus is on the user to get meaningful results. Whilst the
authors will endeavour to answer questions related to using the code, we
recommend users build and maintain their own copies. This documentation contains
the most basic information to get started. Reading it and possibly also the
source code is the best way to start running simulations.
The users are responsible to understand what the code is doing and for the
results of their simulation runs.
Note also that the values of the parameters given in the examples are only
indicative. We recommend users experiment by themselves and a campaign of
experimentation with various values is highly encouraged. Each problem will
likely require different values and the sensitivity to the details of the
physical model is something left to the users to explore.
Acknowledgement & Citation
-------------------------
The SWIFT code was last described in this paper:
https://ui.adsabs.harvard.edu/abs/2023arXiv230513380S. The core solver, the
numerical methods as well as many extensions where described there. We ask users
running SWIFT for their research to please cite this paper when they present
their results.
In order to keep track of usage and measure the impact of the software, we
kindly ask users publishing scientific results using SWIFT to add the following
sentence to the acknowledgement section of their papers:
"The research in this paper made use of the SWIFT open-source
simulation code (http://www.swiftsim.com, Schaller et al. 2018)
version X.Y.Z."
with the version number set to the version used for the simulations and the
reference pointing to the ASCL entry of the code: https://ascl.net/1805.020.
Contribution Guidelines
-----------------------
The SWIFT source code uses a variation of the 'Google' formatting style.
The script 'format.sh' in the root directory applies the clang-format-5.0
The script 'format.sh' in the root directory applies the clang-format-18
tool with our style choices to all the SWIFT C source file. Please apply
the formatting script to the files before submitting a pull request.
......@@ -57,7 +106,7 @@ Runtime parameters
/____/ |__/|__/___/_/ /_/
SPH With Inter-dependent Fine-grained Tasking
Version : 0.8.3
Version : 2025.04
Website: www.swiftsim.com
Twitter: @SwiftSimulation
......@@ -73,7 +122,7 @@ Parameters:
-h, --help show this help message and exit
Simulation options:
-b, --feedback Run with stars feedback.
-c, --cosmology Run with cosmological time integration.
--temperature Run with temperature calculation.
......@@ -81,21 +130,52 @@ Parameters:
-D, --drift-all Always drift all particles even the ones
far from active particles. This emulates
Gadget-[23] and GIZMO's default behaviours.
-F, --star-formation Run with star formation.
-F, --star-formation Run with star formation.
-g, --external-gravity Run with an external gravitational potential.
-G, --self-gravity Run with self-gravity.
-M, --multipole-reconstruction Reconstruct the multipoles every time-step.
-s, --hydro Run with hydrodynamics.
-S, --stars Run with stars.
-B, --black-holes Run with black holes.
-k, --sinks Run with sink particles.
-u, --fof Run Friends-of-Friends algorithm to
perform black hole seeding.
--lightcone Generate lightcone outputs.
-x, --velociraptor Run with structure finding.
--line-of-sight Run with line-of-sight outputs.
--limiter Run with time-step limiter.
--sync Run with time-step synchronization
of particles hit by feedback events.
--csds Run with the Continuous Simulation Data
Stream (CSDS).
-R, --radiation Run with radiative transfer.
--power Run with power spectrum outputs.
Simulation meta-options:
--quick-lyman-alpha Run with all the options needed for the
quick Lyman-alpha model. This is equivalent
to --hydro --self-gravity --stars --star-formation
--cooling.
--eagle Run with all the options needed for the
EAGLE model. This is equivalent to --hydro
--limiter --sync --self-gravity --stars
--star-formation --cooling --feedback
--black-holes --fof.
--gear Run with all the options needed for the
GEAR model. This is equivalent to --hydro
--limiter --sync --self-gravity --stars
--star-formation --cooling --feedback.
--agora Run with all the options needed for the
GEAR model. This is equivalent to --hydro
--limiter --sync --self-gravity --stars
--star-formation --cooling --feedback.
Control options:
-a, --pin Pin runners using processor affinity.
--nointerleave Do not interleave memory allocations across
NUMA regions.
-d, --dry-run Dry run. Read the parameter file, allocates
memory but does not read the particles
from ICs. Exits before the start of time
......@@ -115,14 +195,24 @@ Parameters:
read from the parameter file. Can be used
more than once {sec:par:value}.
-r, --restart Continue using restart files.
-t, --threads=<int> The number of threads to use on each MPI
rank. Defaults to 1 if not specified.
-t, --threads=<int> The number of task threads to use on each
MPI rank. Defaults to 1 if not specified.
--pool-threads=<int> The number of threads to use on each MPI
rank for the threadpool operations.
Defaults to the numbers of task threads
if not specified.
-T, --timers=<int> Print timers every time-step.
-v, --verbose=<int> Run in verbose mode, in MPI mode 2 outputs
from all ranks.
-y, --task-dumps=<int> Time-step frequency at which task analysis
files and/or tasks are dumped.
-y, --task-dumps=<int> Time-step frequency at which task graphs
are dumped.
--cell-dumps=<int> Time-step frequency at which cell graphs
are dumped.
-Y, --threadpool-dumps=<int> Time-step frequency at which threadpool
tasks are dumped.
--dump-tasks-threshold=<flt> Fraction of the total step's time spent
in a task to trigger a dump of the task plot
on this step
See the file examples/parameter_example.yml for an example of parameter file.
```
......@@ -5,10 +5,11 @@
* Use of this source code is governed by a MIT-style license that can be found
* in the LICENSE file.
*/
#include "../config.h"
#include "argparse.h"
#include <config.h>
/* System includes */
#include <assert.h>
#include <errno.h>
#include <stdio.h>
......
......@@ -105,20 +105,13 @@ int argparse_help_cb(struct argparse *self,
const struct argparse_option *option);
// built-in option macros
#define OPT_END() \
{ ARGPARSE_OPT_END, 0, NULL, NULL, 0, NULL, 0, 0 }
#define OPT_BOOLEAN(...) \
{ ARGPARSE_OPT_BOOLEAN, __VA_ARGS__ }
#define OPT_BIT(...) \
{ ARGPARSE_OPT_BIT, __VA_ARGS__ }
#define OPT_INTEGER(...) \
{ ARGPARSE_OPT_INTEGER, __VA_ARGS__ }
#define OPT_FLOAT(...) \
{ ARGPARSE_OPT_FLOAT, __VA_ARGS__ }
#define OPT_STRING(...) \
{ ARGPARSE_OPT_STRING, __VA_ARGS__ }
#define OPT_GROUP(h) \
{ ARGPARSE_OPT_GROUP, 0, NULL, NULL, h, NULL, 0, 0 }
#define OPT_END() {ARGPARSE_OPT_END, 0, NULL, NULL, 0, NULL, 0, 0}
#define OPT_BOOLEAN(...) {ARGPARSE_OPT_BOOLEAN, __VA_ARGS__}
#define OPT_BIT(...) {ARGPARSE_OPT_BIT, __VA_ARGS__}
#define OPT_INTEGER(...) {ARGPARSE_OPT_INTEGER, __VA_ARGS__}
#define OPT_FLOAT(...) {ARGPARSE_OPT_FLOAT, __VA_ARGS__}
#define OPT_STRING(...) {ARGPARSE_OPT_STRING, __VA_ARGS__}
#define OPT_GROUP(h) {ARGPARSE_OPT_GROUP, 0, NULL, NULL, h, NULL, 0, 0}
#define OPT_HELP() \
OPT_BOOLEAN('h', "help", NULL, "show this help message and exit", \
argparse_help_cb, 0, 0)
......
#include "argparse.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "argparse.h"
static const char *const usages[] = {
"test_argparse [options] [[--] args]",
......
......@@ -3,7 +3,7 @@
# Update generated configuration files, i.e. do work so that a
# developer checkout can be configured.
autoreconf --install --symlink
autoreconf --install --symlink
exit
This diff is collapsed.
Subproject commit 0523433a7880e58e22b2215afd0104ea58786962
This diff is collapsed.
# This file is part of SWIFT.
# Copyright (c) 2012 Pedro Gonnet (pedro.gonnet@durham.ac.uk),
# Matthieu Schaller (matthieu.schaller@durham.ac.uk).
# Matthieu Schaller (schaller@strw.leidenuniv.nl).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......