Skip to content
Snippets Groups Projects
Commit 29399617 authored by Cristian Lalescu's avatar Cristian Lalescu
Browse files

[wip] [bug] debugging 3D correlations

parent befb9090
No related branches found
No related tags found
1 merge request!125Feature/improve rij pp
Pipeline #227639 passed
......@@ -191,55 +191,55 @@ int compute_correlation(
MPI_SUM,
Rij->comm);
// output angle-averaged data
if (Rij->rlayout->myrank == 0)
{
hid_t dset, mspace, wspace;
hsize_t count[4], offset[4];
offset[0] = toffset;
offset[1] = 0;
offset[2] = 0;
offset[3] = 0;
count[0] = 1;
count[1] = Rij->get_nx();
count[2] = 3;
count[3] = 3;
dset = H5Dopen(
group,
(std::string("correlations/R^") + label + std::string("_ij(0, 0, x)")).c_str(),
H5P_DEFAULT);
mspace = H5Screate_simple(4, count, NULL);
wspace = H5Dget_space(dset);
H5Sselect_hyperslab(wspace, H5S_SELECT_SET, offset, NULL, count, NULL);
H5Dwrite(dset, H5T_NATIVE_DOUBLE, mspace, wspace, H5P_DEFAULT, Rijx);
H5Dclose(dset);
H5Sclose(wspace);
H5Sclose(mspace);
dset = H5Dopen(
group,
(std::string("correlations/R^") + label + std::string("_ij(0, y, 0)")).c_str(),
H5P_DEFAULT);
count[1] = Rij->get_ny();
mspace = H5Screate_simple(4, count, NULL);
wspace = H5Dget_space(dset);
H5Sselect_hyperslab(wspace, H5S_SELECT_SET, offset, NULL, count, NULL);
H5Dwrite(dset, H5T_NATIVE_DOUBLE, mspace, wspace, H5P_DEFAULT, Rijy);
H5Dclose(dset);
H5Sclose(wspace);
H5Sclose(mspace);
dset = H5Dopen(
group,
(std::string("correlations/R^") + label + std::string("_ij(z, 0, 0)")).c_str(),
H5P_DEFAULT);
count[1] = Rij->get_nz();
mspace = H5Screate_simple(4, count, NULL);
wspace = H5Dget_space(dset);
H5Sselect_hyperslab(wspace, H5S_SELECT_SET, offset, NULL, count, NULL);
H5Dwrite(dset, H5T_NATIVE_DOUBLE, mspace, wspace, H5P_DEFAULT, Rijz);
H5Dclose(dset);
H5Sclose(wspace);
H5Sclose(mspace);
}
//// output angle-averaged data
//if (Rij->rlayout->myrank == 0)
//{
// hid_t dset, mspace, wspace;
// hsize_t count[4], offset[4];
// offset[0] = toffset;
// offset[1] = 0;
// offset[2] = 0;
// offset[3] = 0;
// count[0] = 1;
// count[1] = Rij->get_nx();
// count[2] = 3;
// count[3] = 3;
// dset = H5Dopen(
// group,
// (std::string("correlations/R^") + label + std::string("_ij(0, 0, x)")).c_str(),
// H5P_DEFAULT);
// mspace = H5Screate_simple(4, count, NULL);
// wspace = H5Dget_space(dset);
// H5Sselect_hyperslab(wspace, H5S_SELECT_SET, offset, NULL, count, NULL);
// H5Dwrite(dset, H5T_NATIVE_DOUBLE, mspace, wspace, H5P_DEFAULT, Rijx);
// H5Dclose(dset);
// H5Sclose(wspace);
// H5Sclose(mspace);
// dset = H5Dopen(
// group,
// (std::string("correlations/R^") + label + std::string("_ij(0, y, 0)")).c_str(),
// H5P_DEFAULT);
// count[1] = Rij->get_ny();
// mspace = H5Screate_simple(4, count, NULL);
// wspace = H5Dget_space(dset);
// H5Sselect_hyperslab(wspace, H5S_SELECT_SET, offset, NULL, count, NULL);
// H5Dwrite(dset, H5T_NATIVE_DOUBLE, mspace, wspace, H5P_DEFAULT, Rijy);
// H5Dclose(dset);
// H5Sclose(wspace);
// H5Sclose(mspace);
// dset = H5Dopen(
// group,
// (std::string("correlations/R^") + label + std::string("_ij(z, 0, 0)")).c_str(),
// H5P_DEFAULT);
// count[1] = Rij->get_nz();
// mspace = H5Screate_simple(4, count, NULL);
// wspace = H5Dget_space(dset);
// H5Sselect_hyperslab(wspace, H5S_SELECT_SET, offset, NULL, count, NULL);
// H5Dwrite(dset, H5T_NATIVE_DOUBLE, mspace, wspace, H5P_DEFAULT, Rijz);
// H5Dclose(dset);
// H5Sclose(wspace);
// H5Sclose(mspace);
//}
return EXIT_SUCCESS;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment