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

SIGSEGV, segmentation error running MODFLOW #2280

Open
iaped opened this issue Aug 5, 2024 · 14 comments
Open

SIGSEGV, segmentation error running MODFLOW #2280

iaped opened this issue Aug 5, 2024 · 14 comments

Comments

@iaped
Copy link

iaped commented Aug 5, 2024

I have compiled all of my MODFLOW input files and as far as I know they should all be correctly formatted however, MODFLOW is throwing an error I don't recognize because I think it is pointing to something in the source code. I am not sure how to debug this, a screen shot of the error is attached
Screenshot 2024-08-05 at 4 38 18 PM

@dbrakenhoff
Copy link
Contributor

Just a guess here, but do you see any strange values in any timeseries packages you're using?

@wpbonelli
Copy link
Member

@Manangka can you have a look? the segfault happens here

https://github.com/MODFLOW-USGS/modflow6/blob/8124ad419dc9b52bfdd2655308bd3f621513a0fd/src/Utilities/HashTable.f90#L120

seems the hash doesn't map to any bucket.

@Manangka
Copy link

Manangka commented Aug 7, 2024

@wpbonelli I will look into it.

@Manangka
Copy link

Manangka commented Aug 7, 2024

@iaped Could you provide a (minimal) model which causes this issue?

@iaped
Copy link
Author

iaped commented Aug 7, 2024

@Manangka I will attach in 2 zip files since it is large. Please note that the mf6 executable is not in the zip files
Model_pt1.zip
Model_pt2.zip

@iaped
Copy link
Author

iaped commented Aug 8, 2024

Just a guess here, but do you see any strange values in any timeseries packages you're using?

I am running this program on a Mac computer and it appears that my mac think a .ts file is a MPEG-2 Transport Stream - 8 MB file. This might be the issue since my computer thinks it is a media file. I am looking into how to change this but it is not working

@Manangka
Copy link

Manangka commented Aug 9, 2024

@iaped I found some issues in the way the model files are generated. I made some changes to your notebook and I was able to successfully run the generated model.

Attached the fixed notebook
issue2280.zip

@Manangka
Copy link

Manangka commented Aug 9, 2024

A bit more information.

I made the following changes to the ipynb file:

  • skiprows was skipping 1 row to much, missing the first value
  • Changed SSM sources
  • Added ims for the transport model
  • Added creation of the gwftgwt exchange
  • Added timeseries for the uzt package
  • have the altered model be written to a separate folder

Changes in input_concentrations.xlsx:

  • Added value for time = 0

The reason for the crash was a missing option in the uzt file. It was missing the line 'TS6 FILEIN input_conc.ts'.
When timeseries are defined a hastable is created storing the timeseries data. In this case that wasn't happening because of the missing line. There is a dependency on the timeseries however in the perioddata of the uzt package. When it tries to retrieve the value of PFOS it results in a crash

@wpbonelli We should probably create an issue to prevent a hard crash. A simple null check could be sufficient

@wpbonelli I was a bit surprised that the timeseries needed time=0 to be defined. In the uzt package we also define a start value. Shouldn't that be enough?

@wpbonelli
Copy link
Member

@Manangka agreed on the first point, I would defer to someone else with more experience with the timeseries machinery on the second.

@langevin-usgs
Copy link
Contributor

On the second point, I think it makes sense that time=0 needs to be defined. Conceptually, if a string is entered for a value, then it is a time series entry, and the code must be able to interpolate a value from data in the time series. There is no tie to the data in the period block. The behavior is similar for the end of the simulation. And end time in the time series greater than or equal to the simulation length is required. We could rethink this, but it seems to me that requiring a complete time series record is probably the safest.

@iaped
Copy link
Author

iaped commented Aug 9, 2024

@Manangka thank you! It appears the transport model is not running along with the flow model. I noticed that in the simulation name file the transport model is not listed under models, was this intentional? When I added it to the name file, it threw the error that it could not find the corresponding UZF file while reading the UZT file.

@emorway-usgs
Copy link
Contributor

@iaped, I just downloaded and ran the notebook included in issue2280.zip that @Manangka posted. The name of the notebook I ran was Peterson.ipynb. I can confirm that the model it produced is running both the GWF and GWT models simultaneously. As you point out, the simulation name file that is in the zip file only includes the GWF model, thus, I think if you rerun the notebook you'll be good-to-go.

@iaped
Copy link
Author

iaped commented Aug 15, 2024

Hi again @emorway-usgs @langevin-usgs @Manangka @wpbonelli . Thank you for all of your help however, I am facing an issue I did before with the UZF file, I am not sure why but modflow is not reading my UZF file in its entirety. As I understand, it is supposed to go through each part of the file and in the list file it will state: "BEGIN UZF PACAKGE DATA" and end with "END UZF PACKAGE DATA" for example. However after running the simulation I noticed that no infiltration was occurring and in the list file, it was not reading the UZF past the line in the picture. Any thoughts? attaching the LST file and UZF file
Screenshot 2024-08-15 162823
Uploading UZF and LST file.zip…

@langevin-usgs
Copy link
Contributor

One way to troubleshoot this is to start with a much simpler UZF package. Try a single UZF cell, make sure that works, and then gradually increase the number of UZF cells and the complexity. Maybe this would give you an idea of what's causing the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants