visit-dav / visit

VisIt - Visualization and Data Analysis for Mesh-based Scientific Data
https://visit.llnl.gov
BSD 3-Clause "New" or "Revised" License
434 stars 112 forks source link

Problem reading Exodus / NetCDF file generated by CUBIT 16.02. #18477

Closed brugger1 closed 1 year ago

brugger1 commented 1 year ago

I got the following bug report.

Hi Eric,

I saw that you did this build, maybe that's all you have to do with it, but I got an error plotting a Mesh or a mesh_quality/volume plot on a pretty simple Exodus / NetCDF file (34 quadratic tets) generated by CUBIT 16.02. Would you like the file or is this expected behavior?

The compute engine running on host rzgenie2.llnl.gov issued the following warning: Encountered netCDF error (-40, "NetCDF: Index exceeds dimension bound") after call to "nc_inq_dimid" at line 1657 in file "/usr/tmp/brugger/rztrona/visitbuild/visit3.3.1/src/databases/Exodus/avtExodusFileFormat.C"

brugger1 commented 1 year ago

I got the file and was able to replicate, getting the error message above when doing a Mesh plot.

markcmiller86 commented 1 year ago

What version of VisIt is the user running? If I look on develop around line 1657, I see https://github.com/visit-dav/visit/blob/c4ef565ed2d62843673db6c81371941d424077ff/src/databases/Exodus/avtExodusFileFormat.C#L1654-L1658

This is logic where the plugin is trying to get the list of times from the file. And, I note an obvious cut-n-paste bug in that code. It just called nc_get_var_double but then is doing an error check for nc_inq_dim. So, VisItNCErr is obviously in the error state but the message it is printing is not correct and misleading.