Page 1 of 1
Problem reading in netcdf file at higher resolution
Posted: 07 Mar 2024, 00:04
by chenry
Hi,
I'm having some trouble reading in a netcdf file with an increased mesh resolution, causing a seg fault and stopping at the line:
Code: Select all
GridDataReader: Performing interpolation for variable: vx
My simulation runs fine with a mesh resolution of 500 m, but an increase to 450 m causes this seg fault. Is this likely to be due to insufficient memory? I would have expected a seg fault during the simulation rather than while simply reading in data.
The netcdf file has a resolution of 500 m. I have separately tried increasing the resolution to 250 m using the
command, but this has also resulted in a seg fault.
Has anyone had this problem before and has a fix, or have I just pushed past my memory limit?
Many thanks for any help!
All the best,
Clara
Re: Problem reading in netcdf file at higher resolution
Posted: 07 Mar 2024, 14:42
by raback
Hi
What line causes the segfault? Is it netcdf reader or Elmer side? If you increase verbosity to 30 what is the last line Elmer writes on std out?
-Peter
Re: Problem reading in netcdf file at higher resolution
Posted: 07 Mar 2024, 15:26
by chenry
Hi Peter,
Thanks for your reply. The error is occurring when reading in the data using the netcdf reader (GridDataReader). The last lines with a verbosity of 30 are:
Code: Select all
0: GridDataReader: Found 1 dimensional coordinate variable > x < : 1
0: GridDataReader: Found dimension > x < with id 1 and size 311
0: GridDataReader: Grid parameter of dimension > x < is 2.500E+02
0: GridDataReader: Range of dimension > x < is [ 9.205E+05 9.980E+05]
0: GridDataReader: Found 1 dimensional coordinate variable > y < : 1
0: GridDataReader: Found dimension > y < with id 2 and size 345
0: GridDataReader: Grid parameter of dimension > y < is 2.500E+02
0: GridDataReader: Range of dimension > y < is [ 1.880E+06 1.966E+06]
0: GridDataReader: Omitting the extra dimensions of Elmer mesh
0: GridDataReader: No time given, using 1st step
0: GridDataReader: Performing interpolation for variable: vx
Best,
Clara
Re: Problem reading in netcdf file at higher resolution
Posted: 14 Mar 2024, 12:56
by chenry
Just a quick update on this. I have slightly reduced the size of the domain and am no longer having problems with the GridDataReader. This doesn't explain why the GridDataReader didn't work with the previous domain at a higher res, but at least there is a solution to the problem.
-C
Re: Problem reading in netcdf file at higher resolution
Posted: 14 Mar 2024, 13:14
by raback
Hi
I added a few days ago some more output (with high "max output level") so you might get a better idea now what is going on. Generally memory issues may be difficult and if it happens in netcdf library it is hard to tell. In Elmer it is a good idea to always use and check the optional STAT argument with ALLOCATE. That sometimes helps, but didn't see the problem here.
-Peter