Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix segfault on restart read? #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 4 additions & 3 deletions core/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -1519,6 +1519,7 @@ void restart_read(char *fname) {
nph_in += dset_sizes[n];
}
H5Sclose(space);
H5Dclose(ph_dsets[n]);
}
printf("[%i] nph_in = %lu\n", mpi_myrank(), (unsigned long int)nph_in);
// Actually read datasets
Expand All @@ -1527,8 +1528,11 @@ void restart_read(char *fname) {
int noffset = 0;
for (int n = 0; n < num_datasets; n++) {
if (n % mpi_nprocs() == mpi_myrank()) {
sprintf(dsetnam, "photons_%08d", n);
ph_dsets[n] = H5Dopen(file_id, dsetnam, H5P_DEFAULT);
H5Dread(ph_dsets[n], phmemtype, H5S_ALL, H5S_ALL, H5P_DEFAULT,
&rdata[noffset]);
H5Dclose(ph_dsets[n]);
noffset += dset_sizes[n];
}
}
Expand Down Expand Up @@ -1573,9 +1577,6 @@ void restart_read(char *fname) {
}

free(rdata);
for (int n = 0; n < num_datasets; n++) {
H5Dclose(ph_dsets[n]);
}
free(ph_dsets);
free(dset_sizes);
#endif // RADIATION
Expand Down
3 changes: 2 additions & 1 deletion script/machine/debian.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ def get_options():
host = {}

host['NAME'] = os.uname()[1]
host['COMPILER'] = '/usr/local/hdf5-parallel/bin/h5pcc'
#host['COMPILER'] = '/usr/local/hdf5-parallel/bin/h5pcc'
host['COMPILER'] = 'h5pcc'
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should not be merged like this... but my vm is named ubuntu but my h5pcc isn't at this path. Maybe the solution is turning host['COMPILER'] into an array of strings all of which are searched?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think I want to do a "search" thing. I think these machine files are intended to be modified... and debian was just a template.

host['COMPILER_FLAGS'] = flags_base + ' ' + fcflags + ' ' + '-O2 -march=native'
host['DEBUG_FLAGS'] = flags_base + ' ' + fcflags + ' ' + '-g -O0'
host['GSL_DIR'] = ''
Expand Down