SWIFTsim merge requestshttps://gitlab.cosma.dur.ac.uk/swift/swiftsim/-/merge_requests2024-01-24T14:22:44Zhttps://gitlab.cosma.dur.ac.uk/swift/swiftsim/-/merge_requests/1852Add more support for the Intel icx oneAPI compiler.2024-01-24T14:22:44ZPeter W. DraperAdd more support for the Intel icx oneAPI compiler.Adds warnings as errors, extends the warnings to include Wextra (note
no -w2 for this compiler contrary to what the man page says), and
adds support for different memory allocators.Adds warnings as errors, extends the warnings to include Wextra (note
no -w2 for this compiler contrary to what the man page says), and
adds support for different memory allocators.Peter W. DraperPeter W. Draperhttps://gitlab.cosma.dur.ac.uk/swift/swiftsim/-/merge_requests/1844Resolve memory leak in repart_edge_metis src/partition.c:16352024-01-29T14:22:25ZPeter W. DraperResolve memory leak in repart_edge_metis src/partition.c:1635Closes #880Closes #880Mladen IvkovicMladen Ivkovichttps://gitlab.cosma.dur.ac.uk/swift/swiftsim/-/merge_requests/1804Fix AX_OPENMP performance regression2023-11-20T10:09:41ZPeter W. DraperFix AX_OPENMP performance regressionWhen moving from AC_OPENMP and AX_OPENMP we stopped AC_SUBST of OPENMP_CFLAGS and these haven't been used since. Fix that, but do that by only using the OPENMP_CFLAGS as needed, that is as compiler hints for vectorizing some loops in the...When moving from AC_OPENMP and AX_OPENMP we stopped AC_SUBST of OPENMP_CFLAGS and these haven't been used since. Fix that, but do that by only using the OPENMP_CFLAGS as needed, that is as compiler hints for vectorizing some loops in the gravity interactions and only requiring the OpenMP runtime when linking against an OpenMP FFTW library.
Fixes #865Peter W. DraperPeter W. Draperhttps://gitlab.cosma.dur.ac.uk/swift/swiftsim/-/merge_requests/1708pre-genesis messages tidy-up2023-04-04T07:38:16ZPeter W. Draperpre-genesis messages tidy-upAdd a new function `pretime_message()` to avoid bespoke `printf` in the start up sections of code.
Stops silly things like adding a time field to the output before time is created for the odd few messages
that use `message()`. Also add s...Add a new function `pretime_message()` to avoid bespoke `printf` in the start up sections of code.
Stops silly things like adding a time field to the output before time is created for the odd few messages
that use `message()`. Also add some
consist flushes to all these messages so that they stand a better chance of being delivered when an
MPI takedown is in progress (that can be very confusing and look like a crash). Finally make sure that the greeting is delivered ahead of any
other messages from other ranks so that they do not interleave. Only really an issue when
being verbose.
Note based on !1707 as these changes are also for that, so that should be merged first.Peter W. DraperPeter W. Draperhttps://gitlab.cosma.dur.ac.uk/swift/swiftsim/-/merge_requests/1692Output the current call stack programmatically.2023-02-27T21:46:26ZPeter W. DraperOutput the current call stack programmatically.Adds a function that will show some information about the current call stack.
Useful to see where the code you are interested in is being called from without opening up a debugger
Not as good as line numbers are not available.
Sample ou...Adds a function that will show some information about the current call stack.
Useful to see where the code you are interested in is being called from without opening up a debugger
Not as good as line numbers are not available.
Sample output:
```
[0000] [00000.9] print_backtrace: threadpool_map
[0000] [00000.9] print_backtrace: eagle_6.yml(print_backtrace+0x67) [0x557d7e749ae7]
[0000] [00000.9] print_backtrace: eagle_6.yml(threadpool_map+0x136) [0x557d7e6b51a6]
[0000] [00000.9] print_backtrace: eagle_6.yml(space_free_cells+0x48) [0x557d7e625a68]
[0000] [00000.9] print_backtrace: eagle_6.yml(space_regrid+0x1396) [0x557d7e614ac6]
[0000] [00000.9] print_backtrace: eagle_6.yml(space_rebuild+0x5a) [0x557d7e60f00a]
[0000] [00000.9] print_backtrace: eagle_6.yml(engine_rebuild+0x8f) [0x557d7e63578f]
[0000] [00000.9] print_backtrace: eagle_6.yml(engine_init_particles+0x97) [0x557d7e639527]
[0000] [00000.9] print_backtrace: eagle_6.yml(main+0x4245) [0x557d7e5ff1c5]
```
```
[0000] [00000.8] print_backtrace: eagle_6.yml(print_backtrace+0x67) [0x557d7e749ae7]
[0000] [00000.8] print_backtrace: eagle_6.yml(threadpool_map+0x136) [0x557d7e6b51a6]
[0000] [00000.8] print_backtrace: eagle_6.yml(engine_redistribute+0xfb0) [0x557d7e65e250]
[0000] [00000.8] print_backtrace: eagle_6.yml(engine_split+0x78) [0x557d7e637588]
[0000] [00000.8] print_backtrace: eagle_6.yml(main+0x4231) [0x557d7e5ff1b1]
[0000] [00000.8] print_backtrace: /lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x14a6a6644d90]
[0000] [00000.8] print_backtrace: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80) [0x14a6a6644e40]
```
So not sure why the `program` is shown as the parameter file, but the basics are clear.
Uses glibc call so also configured as needed.Peter W. DraperPeter W. Draperhttps://gitlab.cosma.dur.ac.uk/swift/swiftsim/-/merge_requests/1647Remove thread specific seed code.2022-11-08T16:17:42ZPeter W. DraperRemove thread specific seed code.Hasn't been used since 2017, so time to cleanupHasn't been used since 2017, so time to cleanupMatthieu SchallerMatthieu Schallerhttps://gitlab.cosma.dur.ac.uk/swift/swiftsim/-/merge_requests/1639Upgrade the code formatting tool requirement to clang v.13.2022-10-12T07:53:43ZMatthieu SchallerUpgrade the code formatting tool requirement to clang v.13.This upgrades the code formatting tool requirement to version 13 of clang (October 2021). I think it's installed on cosma so it should not be an issue there.This upgrades the code formatting tool requirement to version 13 of clang (October 2021). I think it's installed on cosma so it should not be an issue there.Peter W. DraperPeter W. Draperhttps://gitlab.cosma.dur.ac.uk/swift/swiftsim/-/merge_requests/1595Remove engine_marktasks() entirely2024-03-18T20:54:14ZMatthieu SchallerRemove engine_marktasks() entirelyThis is a relic of a long-gone past where marktasks and unskip needed to be different. Now it just makes use duplicate entire code blocks for no good reasons.
`engine_unskip()` is superior as it only loops over the tree sections where ac...This is a relic of a long-gone past where marktasks and unskip needed to be different. Now it just makes use duplicate entire code blocks for no good reasons.
`engine_unskip()` is superior as it only loops over the tree sections where actual work could happen, so that's the version we should keep.
This version keeps marktasks as a way to verify unskip's job. Once we are happy they are identical (as they should) we can remove that check.
Actual changes to keep past these tests:
- Better names for the various BH ghosts between the task names and the cell-carried task pointers.
- More uniform activation (for readability) of the gravity drift related to MPI between unskip and marktasks.
- Remove the activation of some gas drifts when neighbouring a BH cell where the BH is not active.
- Fix a mismatch where marktasks was activating unnecessary star pairs.
- Fix a mismatch where marktasks was activating unnecessary BH ghosts.
- Fix a mismatch where markatask was not activating star drifts in the case of stars doing only gravity.
- Fix a mismatch where marktasks was not activating RT_in tasks.Matthieu SchallerMatthieu Schallerhttps://gitlab.cosma.dur.ac.uk/swift/swiftsim/-/merge_requests/1594Planetary update2022-07-16T09:24:01ZJacob Kegerreisjacob.kegerreis@durham.ac.ukPlanetary updateOnly trivial tweaks now that #817 is fixedOnly trivial tweaks now that #817 is fixedMatthieu SchallerMatthieu Schallerhttps://gitlab.cosma.dur.ac.uk/swift/swiftsim/-/merge_requests/1579Update the example python scripts to match the new improved style2022-07-26T11:54:24ZMatthieu SchallerUpdate the example python scripts to match the new improved styleChanges:
- Update the scripts to use the matplotlib template.
- Stop using \textsc which is not supported.
Fixes #807.Changes:
- Update the scripts to use the matplotlib template.
- Stop using \textsc which is not supported.
Fixes #807.Matthieu SchallerMatthieu Schallerhttps://gitlab.cosma.dur.ac.uk/swift/swiftsim/-/merge_requests/1330Move the logger in a submodule2021-03-29T07:21:35ZLoic HausammannMove the logger in a submoduleA lot of changes here, but it is mostly a big `git rm -rf logger`. The submodule is now hosted here https://gitlab.cosma.dur.ac.uk/lhausammann/csds-reader
The interesting changes are:
- Adding a submodule called CSDS
- `autogen.sh` is...A lot of changes here, but it is mostly a big `git rm -rf logger`. The submodule is now hosted here https://gitlab.cosma.dur.ac.uk/lhausammann/csds-reader
The interesting changes are:
- Adding a submodule called CSDS
- `autogen.sh` is now updating the submodules (it is required due to the way `AC_CONFIG_FILES` is working)
- When running `./configure --enable-csds`, I am also updating the submodule to be safe
- I am adding an old script from Peter to update the submodules
Due to the changes in the structure, some scripts for the logger might be broken now. As I am planning to rename everything, I will test and fix everything once the renaming is done.Continuous Simulation Data StreamPeter W. DraperPeter W. Draperhttps://gitlab.cosma.dur.ac.uk/swift/swiftsim/-/merge_requests/1286added checks whether star particles are inhibited in feedback tasks2021-02-04T16:22:49ZMladen Ivkovicadded checks whether star particles are inhibited in feedback tasksMatthieu SchallerMatthieu Schallerhttps://gitlab.cosma.dur.ac.uk/swift/swiftsim/-/merge_requests/1274Leaner code & active max h collection2021-01-21T16:47:45ZMatthieu SchallerLeaner code & active max h collectionA series of updates:
- Free foreign particles and the mesh before i/o operations.
- Free foreign particles before exchanging the proxy cells.
- Hide the unnecessary fields into anonymous unions inside the cell sub-structures to sav...A series of updates:
- Free foreign particles and the mesh before i/o operations.
- Free foreign particles before exchanging the proxy cells.
- Hide the unnecessary fields into anonymous unions inside the cell sub-structures to save memory.
- Collect the max active h of each cell.
The first three updates are currently in use in the Sibelius-dark run. The last change is not used yet for performance improvement but will be used in a future push that focuses solely on using the quantity to speed-up loops. At the risk of confusing things, I added it here already as I was making substantial changes to the cell structure organisation.Peter W. DraperPeter W. Draperhttps://gitlab.cosma.dur.ac.uk/swift/swiftsim/-/merge_requests/1262Various improvements to the i/o code2021-01-22T08:40:21ZMatthieu SchallerVarious improvements to the i/o codeBugs:
- Fixes incorrect meta-data in snapshots when not writing any of the fields of a particle type (Fixes #732)
- Fixes #728
- Add a barrier at the end of the distributed io output to make sure all ranks are done before progress...Bugs:
- Fixes incorrect meta-data in snapshots when not writing any of the fields of a particle type (Fixes #732)
- Fixes #728
- Add a barrier at the end of the distributed io output to make sure all ranks are done before progressing (Sibelius-dark bug with slow cosma6 disks)
- Fix an overflow in the global counter of particles in groups reported by FOF (bug had no consequence on output, just on stdout message).
Improvements:
- Refactoring of the selection of fields to unify the calls into a single simpler function
- Allow for different default values when reading optional fields (Implement #705)
- Re-read the output list when restarting a run (Implement #678)
- Allow for different snapshot basenames for the different output types (Implement #677)
- Allow users to specify a different snapshot ID for each entry in the output list (Implement #694)
- Add the list of particle type names to the snapshot headers.
- Upon restarting, check that all ranks are on the same ti_current. This prevents accidental restarts with mixed sets of restart files.
Peter W. DraperPeter W. Draperhttps://gitlab.cosma.dur.ac.uk/swift/swiftsim/-/merge_requests/1226Threadsafe, reproducible cell IDs2020-11-17T12:02:28ZMladen IvkovicThreadsafe, reproducible cell IDsThis merge request changes how the cells get their `cellID`s.
We can store up to 32^3 top level cells in 15 bits of the `long long cellID`. For every child of a cell, recursively the child inherits the cellID from its parent, shifts it ...This merge request changes how the cells get their `cellID`s.
We can store up to 32^3 top level cells in 15 bits of the `long long cellID`. For every child of a cell, recursively the child inherits the cellID from its parent, shifts it 3 bits to the left, and adds 3 bits depending on its location within the parent cell. This allows us to store up to 16 levels of progeny in a reproduceable, thread-safe way.
If there are either too many top level cells or the depth is too high, we revert to the old "ID-ing" scheme.Peter W. DraperPeter W. Draperhttps://gitlab.cosma.dur.ac.uk/swift/swiftsim/-/merge_requests/1152Remove useless stuff2020-09-07T08:23:11ZLoic HausammannRemove useless stuffHey,
I think I found some useless code thanks to Mladen. In `engine_count_and_link_tasks_mapper`, we should only have gravity and hydro-density task. Therefore there is no point of dealing with the other type of tasks.
I have been able...Hey,
I think I found some useless code thanks to Mladen. In `engine_count_and_link_tasks_mapper`, we should only have gravity and hydro-density task. Therefore there is no point of dealing with the other type of tasks.
I have been able to run the EAGLE_6 example at low redshift and with the full physics for ~100 steps without any problem.Matthieu SchallerMatthieu Schallerhttps://gitlab.cosma.dur.ac.uk/swift/swiftsim/-/merge_requests/1059Restart fixes2020-04-15T12:36:04ZMatthieu SchallerRestart fixesFixes #645.
- Free all the physics structures allocated by engine_restore() in engine_clean() to fix the (harmless) leaks.
- Free the file names of restart files even when not in MPI mode.Fixes #645.
- Free all the physics structures allocated by engine_restore() in engine_clean() to fix the (harmless) leaks.
- Free the file names of restart files even when not in MPI mode.Matthieu SchallerMatthieu Schallerhttps://gitlab.cosma.dur.ac.uk/swift/swiftsim/-/merge_requests/1056Add Star formation spart struct2020-04-09T11:49:15ZFolkert NobelsAdd Star formation spart structI implemented the changes as discussed, this change will add an struct for the star particles specifically for the star formation similar to the chemistry struct, this will make the stars and star formation models more modular and also i...I implemented the changes as discussed, this change will add an struct for the star particles specifically for the star formation similar to the chemistry struct, this will make the stars and star formation models more modular and also if we want to change what is stored in the stars related to star formation, than we only need to change the star_formation routine. I updated all the star formation and star schemes:
- EAGLE stars & star formation
- GEAR stars & star formation
- Default stars and none star formation
- Quick Lymann Alpha star formation.
I tested the code with the EAGLE subgrid on the isolated galaxy with feedback and that seems to run to completion. Also the code compiles when I use different subgrid routines and the default `./configure`. I am not able to test if the GEAR model works because I don't have crackle (it compiles). Let me know what you think.Matthieu SchallerMatthieu Schallerhttps://gitlab.cosma.dur.ac.uk/swift/swiftsim/-/merge_requests/1037WIP: Resolve "Planetary physics documentation"2020-03-13T14:59:57ZJacob Kegerreisjacob.kegerreis@durham.ac.ukWIP: Resolve "Planetary physics documentation"Closes #659Closes #659https://gitlab.cosma.dur.ac.uk/swift/swiftsim/-/merge_requests/1018Threadpool auto chunk size2020-02-18T15:48:03ZPedro GonnetThreadpool auto chunk sizeThis is an itch I've been wanting to scratch for a while, makes calls to `threapool_map` a bit more readable.This is an itch I've been wanting to scratch for a while, makes calls to `threapool_map` a bit more readable.Peter W. DraperPeter W. Draper