Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TurTLE
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TurTLE
TurTLE
Commits
29399617
Commit
29399617
authored
9 months ago
by
Cristian Lalescu
Browse files
Options
Downloads
Patches
Plain Diff
[wip] [bug] debugging 3D correlations
parent
befb9090
No related branches found
No related tags found
1 merge request
!125
Feature/improve rij pp
Pipeline
#227639
passed
9 months ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
cpp/full_code/get_3D_correlations.cpp
+57
-57
57 additions, 57 deletions
cpp/full_code/get_3D_correlations.cpp
with
57 additions
and
57 deletions
cpp/full_code/get_3D_correlations.cpp
+
57
−
57
View file @
29399617
...
...
@@ -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
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment