-
Notifications
You must be signed in to change notification settings - Fork 66
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
Segmentation fault (core dumped) issue when Reading hdf5 files #196
Comments
Hi,
I don't know for certain, but I wonder if the file you wrote has not been
properly closed at the time you attempt to read it? Perhaps add a
"delete(f)" statement before opening the file for reading. This should
delete the filevariable, not the file, and in doing so, I speculate it will
close the file.
Rick
…On Tue, Jan 3, 2023 at 9:27 AM thegiantspaceman ***@***.***> wrote:
I am using linux OS and have installed NCL using the conda install method
here <https://www.ncl.ucar.edu/Download/conda.shtml>. I have NCL version
6.6.2 and it works fine except for the fact that it cannot read hdf5 files.
To illustrate this error, below is a test script to write and then read an
hdf5 file. The script is able to write to hdf5, but once it goes to read
hdf5 it gives "Segmentation fault (core dumped)." How can I fix this issue?
begin
fn = "./out.hdf5"
a= (/1,2/)
;WRITE
f = addfile(fn, "c")
f->a = (/a/)
;READ
f = addfile(fn, "r")
s = f->a
end
—
Reply to this email directly, view it on GitHub
<#196>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADLWOXUMZ2HRONYRM7T7ABTWQRHPHANCNFSM6AAAAAATP3R4NI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Thank you for the quick reply Rick. I added "delete(f)" before reading, but I still get the same seg fault issue. I also have tried to open an hdf5 file output from a model and I encounter the exact same error. Should I try to build NCL differently on my machine? Do you have any other suggestions? -Reuben |
Regrettably, I don't really know what else to suggest. There's the
pre-compiled binary option, in addition to the conda installation (
https://www.ncl.ucar.edu/Download/). I would not recommend trying to build
NCL from source unless you have a great deal of experience building out
source code packages.
Best of luck...
Rick
…On Tue, Jan 3, 2023 at 11:33 AM thegiantspaceman ***@***.***> wrote:
Thank you for the quick reply Rick. I added "delete(f)" before reading,
but I still get the same seg fault issue. I also have tried to open an hdf5
file output from a model and I encounter the exact same error. Should I try
to build NCL differently on my machine? Do you have any other suggestions?
-Reuben
—
Reply to this email directly, view it on GitHub
<#196 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADLWOXREBIKPONO4WP2OVVLWQRWGPANCNFSM6AAAAAATP3R4NI>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am using linux OS and have installed NCL using the conda install method here. I have NCL version 6.6.2 and it works fine except for the fact that it cannot read hdf5 files. To illustrate this error, below is a test script to write and then read an hdf5 file. The script is able to write to hdf5, but once it goes to read hdf5 it gives "Segmentation fault (core dumped)." How can I fix this issue?
begin
fn = "./out.hdf5"
a= (/1,2/)
;WRITE
f = addfile(fn, "c")
f->a = (/a/)
;READ
f = addfile(fn, "r")
s = f->a
end
The text was updated successfully, but these errors were encountered: