Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
caa6a19
Added new ParticleHDF class to generalize EXP HDF5 particle writing a…
Aug 14, 2026
0b48448
Added new ParticleHDF5 class header
Aug 14, 2026
369a778
Cherry pick the refactoring of 1d mass models from slabUpdate
Aug 14, 2026
5852d9a
Remove a stray character
Aug 14, 2026
c0a1bf1
Add a Python HDF5 IC check script
Aug 14, 2026
ffcf140
Tweaked the test profiles to allow user-specified total mass and make…
Aug 14, 2026
4fe6b80
Added mass on spherical table as a particle check
Aug 14, 2026
df779e1
Add HDF5 file generation to Zang ICs; update the mass tolerance
Aug 14, 2026
a495833
Allow use of non-MPI applications
Aug 14, 2026
18a0ce9
Potential fix for pull request finding
The9Cat Aug 14, 2026
828b00a
Potential fix for pull request finding
The9Cat Aug 14, 2026
4d2c233
Potential fix for pull request finding
The9Cat Aug 14, 2026
658a799
Potential fix for pull request finding
The9Cat Aug 14, 2026
f4bd1b7
Potential fix for pull request finding
The9Cat Aug 14, 2026
bff80dd
Potential fix for pull request finding
The9Cat Aug 14, 2026
103f3e0
Add gendisk HDF5 schema CTest coverage
Copilot Aug 14, 2026
86fc6c7
Add gendisk2d HDF5 CTest coverage
Copilot Aug 14, 2026
1f52901
test: add gendisk halo hdf5 schema check
Copilot Aug 14, 2026
1480253
Reduce root memory overhead in gathered HDF5 writes
Copilot Aug 14, 2026
fd116a9
Removed gas particle tests, decrease basis resolution to speed up tes…
Aug 15, 2026
97231fc
gendisk2d needs a smaller default RMIN to match the table
Aug 15, 2026
3e8d002
Apply suggestions from code review
The9Cat Aug 16, 2026
c5f0c07
Added compression to save some disk space
Aug 16, 2026
3746903
Merge branch 'generateHDF5ICs' of github.com:EXP-code/EXP into genera…
Aug 16, 2026
43bbc93
Change hsize_t to size_t to try to keep Clang happy
Aug 16, 2026
581199f
Another try at type matching
Aug 16, 2026
a51ac72
Potential fix for pull request finding
The9Cat Aug 16, 2026
f7d63fd
Missing commit of pyEXP updates for Cylindrical, oops
Aug 16, 2026
4d1654f
Change IC generation defaults to HDF5 and H5compress=5
Copilot Aug 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Testing/Temporary/LastTest.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Start testing: Aug 14 22:26 UTC
----------------------------------------------------------
End testing: Aug 14 22:26 UTC
3 changes: 3 additions & 0 deletions expui/BiorthBasis.H
Original file line number Diff line number Diff line change
Expand Up @@ -985,6 +985,9 @@ namespace BasisClasses
double rcylmin, rcylmax, acyl, hcyl, bias;
bool expcond, logarithmic, density, EVEN_M, sech2 = true;

int H5compress = 0;
bool H5shuffle = false;

std::vector<Eigen::MatrixXd> potd, dpot, dpt2, dend;
std::vector<Eigen::MatrixXd> legs, dlegs, d2legs;

Expand Down
13 changes: 10 additions & 3 deletions expui/BiorthBasis.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1279,7 +1279,9 @@ namespace BasisClasses
"pyproj",
"nint",
"totalCovar",
"fullCovar"
"fullCovar",
"H5compress",
"H5shuffle"
};

Cylindrical::Cylindrical(const YAML::Node& CONF) :
Expand Down Expand Up @@ -1529,10 +1531,13 @@ namespace BasisClasses
if (conf["vflag" ]) vflag = conf["vflag" ].as<int>();
if (conf["pyname" ]) pyname = conf["pyname" ].as<std::string>();
if (conf["pyproj" ]) pyproj = conf["pyproj" ].as<std::string>();
if (conf["pcavar"] ) pcavar = conf["pcavar" ].as<bool>();
if (conf["subsamp"] ) sampT = conf["subsamp" ].as<int>();
if (conf["pcavar" ]) pcavar = conf["pcavar" ].as<bool>();
if (conf["subsamp" ]) sampT = conf["subsamp" ].as<int>();
if (conf["samplesz" ]) sampT = conf["samplesz" ].as<int>();

if (conf["H5compress"]) H5compress = conf["H5compress"].as<int>();
if (conf["H5shuffle" ]) H5shuffle = conf["H5shuffle" ].as<bool>();

// Sanity
sampT = std::max(1, sampT);

Expand Down Expand Up @@ -1604,6 +1609,8 @@ namespace BasisClasses
EmpCylSL::CMAPZ = cmapZ;
EmpCylSL::logarithmic = logarithmic;
EmpCylSL::VFLAG = vflag;
EmpCylSL::H5compress = H5compress;
EmpCylSL::H5shuffle = H5shuffle;

// Convert dmodel string to lower case (deprojection model for EOF
// basis construction)
Expand Down
2 changes: 1 addition & 1 deletion exputil/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ set(PHASE_SRC phase.cc ensemble.cc io_ensemble.cc move_ensemble.cc
set(SPECFUNC_SRC gammln.cc bessel.cc OrthoPoly.cc CauchyPV.cc) # modbessel.cc
set(INTERP_SRC Spline.cc SplintE.cc Vodd2.cc Vlocate.cc levsurf.cc Interp1d.cc Cheby1d.cc MonotCubicInterpolator.cc)
set(MASSMODEL_SRC massmodel.cc massmodel_dist.cc embedded.cc isothermal.cc realize_model.cc GenPoly.cc mestel.cc
toomre.cc exponential.cc)
massmodel1d.cc toomre.cc exponential.cc)
set(ORBIT_SRC orbit.cc orbit_trans.cc FindOrb.cc)

set(BIORTH_SRC biorth_wake.cc biorth.cc biorth2d.cc biorth_grid.cc
Expand Down
62 changes: 52 additions & 10 deletions exputil/EmpCylSL.cc
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ double EmpCylSL::RMAX = 20.0;
double EmpCylSL::HFAC = 0.2;
double EmpCylSL::PPOW = 4.0;
bool EmpCylSL::NewCoefs = true;
int EmpCylSL::H5compress = 5;
bool EmpCylSL::H5shuffle = false;


EmpCylSL::EmpModel EmpCylSL::mtype = EmpCylSL::EmpModel::Exponential;
Expand Down Expand Up @@ -2403,6 +2405,22 @@ void EmpCylSL::generate_eof(int numr, int nump, int numt,
Timer timer;
if (VFLAG & 16) timer.start();

// Sanity check on quadrature parameters
//
numr = std::max<int>(1, numr);
nump = std::max<int>(1, nump);
numt = std::max<int>(1, numt);

if (myid==0 and numr < 10) {
std::cerr << "EmpCylSL: Warning, numr=" << numr
<< " is very small for quadrature" << std::endl;
}

if (myid==0 and numt < 10) {
std::cerr << "EmpCylSL: Warning, numt=" << numt
<< " is very small for quadrature" << std::endl;
}

// Create spherical orthogonal basis if necessary
//
if (not ortho) {
Expand Down Expand Up @@ -2667,7 +2685,7 @@ void EmpCylSL::generate_eof(int numr, int nump, int numt,

} // *** r quadrature loop

if (VFLAG & 8) {
if (VFLAG & 16) {
auto t = timer.stop();
if (myid==0) {
std::cout << std::endl
Expand Down Expand Up @@ -2700,7 +2718,7 @@ void EmpCylSL::generate_eof(int numr, int nump, int numt,
//
make_eof();

if (VFLAG & 8) {
if (VFLAG & 16) {
cout << "Process " << setw(4) << myid << ": completed basis in "
<< timer.stop() << " seconds"
<< endl;
Expand Down Expand Up @@ -7463,6 +7481,30 @@ void EmpCylSL::WriteH5Cache()
file.createAttribute<int> ("eof_numt", HighFive::DataSpace::From(eof_vars.numt)).write(eof_vars.numt);


// To write an Eigen::MatrixXd with compression in HighFive, we we
// create the dataset with explicit chunk sizes and a deflation
// (gzip) filter before writing, because shortcut functions do not
// pass compression parameters.

auto dcpl = HighFive::DataSetCreateProps{};

// Define dimensions
std::vector<size_t> dims {static_cast<size_t>(NUMX+1),
static_cast<size_t>(NUMY+1)};

// Dataspace size definition
HighFive::DataSpace ds(dims);

// Define chunk size (e.g., matching matrix size or split into blocks)
std::vector<hsize_t> chunk_dims {static_cast<hsize_t>(NUMX+1),
static_cast<hsize_t>(NUMY+1)};

if (H5compress>0) {
dcpl.add(HighFive::Chunking(chunk_dims));
if (H5shuffle) dcpl.add(HighFive::Shuffle());
dcpl.add(HighFive::Deflate(H5compress));
}

// Cosine functions

auto cosine = file.createGroup("Cosine");
Expand All @@ -7480,10 +7522,10 @@ void EmpCylSL::WriteH5Cache()
sout << n;
auto order = harmonic.createGroup(sout.str());

order.createDataSet("potC", potC [m][n]);
order.createDataSet("rforceC", rforceC[m][n]);
order.createDataSet("zforceC", zforceC[m][n]);
order.createDataSet("densC", densC [m][n]);
order.createDataSet<double>("potC", ds, dcpl).write(potC [m][n]);
order.createDataSet<double>("rforceC", ds, dcpl).write(rforceC[m][n]);
order.createDataSet<double>("zforceC", ds, dcpl).write(zforceC[m][n]);
order.createDataSet<double>("densC", ds, dcpl).write(densC [m][n]);
}
}

Expand All @@ -7504,10 +7546,10 @@ void EmpCylSL::WriteH5Cache()
sout << n;
auto order = harmonic.createGroup(sout.str());

order.createDataSet("potS", potS [m][n]);
order.createDataSet("rforceS", rforceS[m][n]);
order.createDataSet("zforceS", zforceS[m][n]);
order.createDataSet("densS", densS [m][n]);
order.createDataSet<double>("potS", ds, dcpl).write(potS [m][n]);
order.createDataSet<double>("rforceS", ds, dcpl).write(rforceS[m][n]);
order.createDataSet<double>("zforceS", ds, dcpl).write(zforceS[m][n]);
order.createDataSet<double>("densS", ds, dcpl).write(densS [m][n]);
}
}

Expand Down
Loading
Loading