Skip to content

Commit

Permalink
Get gadgethdf output working with gadget 4
Browse files Browse the repository at this point in the history
  • Loading branch information
apontzen committed Apr 20, 2024
1 parent e3fc1a2 commit 3b078a3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion genetIC/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ ifeq ($(HOST), butte)
endif

ifeq ($(HOST), jasmi)
CXX = /opt/local/bin/g++-mp-11 -L/opt/local/lib/
CXX = /opt/local/bin/g++-mp-13 -L/opt/local/lib/
CFLAGS = -O3 -g -fopenmp -std=c++17 -I`pwd` -I`pwd`/HighFive/include -DOPENMP -DDOUBLEPRECISION
endif

Expand Down
1 change: 1 addition & 0 deletions genetIC/src/io/gadgethdf.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ namespace io {
writeHdfAttributeArray(headerGroup, "MassTable", this->masses);
writeHdfAttribute(headerGroup, "ExpansionFactor", this->cosmology.scalefactor);
writeHdfAttribute(headerGroup, "Redshift", 1./this->cosmology.scalefactor-1.);
writeHdfAttribute(headerGroup, "Time", 0.0); // Gadget4 expects this but doesn't use it
writeHdfAttribute(headerGroup, "HubbleParam", this->cosmology.hubble);
writeHdfAttribute(headerGroup, "Flag_Sfr", baryonic);
writeHdfAttribute(headerGroup, "Flag_Cooling", baryonic);
Expand Down

0 comments on commit 3b078a3

Please sign in to comment.