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

unreadable field init file leads to segfault #4900

Closed
valentin-krasontovitsch opened this issue Feb 16, 2023 · 3 comments
Closed

unreadable field init file leads to segfault #4900

valentin-krasontovitsch opened this issue Feb 16, 2023 · 3 comments
Assignees
Labels

Comments

@valentin-krasontovitsch
Copy link
Contributor

To reproduce
Steps to reproduce the behaviour:

  1. pip install ert
  2. get the ert repo and move to test-data/snake_oil_field
  3. modify the field init files in the fields directory to be unreadable by your user
  4. run ert test_run snake_oil_field.ert, or ert gui snake_oil_field.ert and start test run
  5. segfault

Expected behaviour
an error message telling you that the init file(s) are unreadable

@valentin-krasontovitsch
Copy link
Contributor Author

the reason is this bug in ecl

@valentin-krasontovitsch
Copy link
Contributor Author

valentin-krasontovitsch commented Feb 17, 2023

solved by enkfs-refactor efforts
output on that branch is

$ ert test_run snake_oil_field.ert
Warning: ERT is running in an existing runpath
Exception in thread ert_cli_simulation_thread:
Traceback (most recent call last):
  File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "/home/val/code/equinor/ert/src/ert/shared/models/base_run_model.py", line 169, in start_simulations_thread
    self.startSimulations(
  File "/home/val/code/equinor/ert/src/ert/shared/models/base_run_model.py", line 180, in startSimulations
    run_context = self.runSimulations(
  File "/home/val/code/equinor/ert/src/ert/shared/models/single_test_run.py", line 31, in runSimulations
    return self.runSimulations__(
  File "/home/val/code/equinor/ert/src/ert/shared/models/ensemble_experiment.py", line 122, in runSimulations__
    self.ert().sample_prior(
  File "/home/val/code/equinor/ert/src/ert/_c_wrappers/enkf/enkf_main.py", line 493, in sample_prior
    props = xtgeo.gridproperty_from_file(
  File "/home/val/code/py-venvs/equinor/ert/lib/python3.10/site-packages/xtgeo/grid3d/grid_property.py", line 98, in gridproperty_from_file
    return GridProperty._read_file(*args, **kwargs)
  File "/home/val/code/py-venvs/equinor/ert/lib/python3.10/site-packages/xtgeo/grid3d/grid_property.py", line 929, in _read_file
    fformat = pfile.detect_fformat()
  File "/home/val/code/py-venvs/equinor/ert/lib/python3.10/site-packages/xtgeo/common/sys.py", line 516, in detect_fformat
    fformat = self._detect_fformat_by_contents(details)
  File "/home/val/code/py-venvs/equinor/ert/lib/python3.10/site-packages/xtgeo/common/sys.py", line 535, in _detect_fformat_by_contents
    with open(self.file, "rb") as fhandle:
PermissionError: [Errno 13] Permission denied: 'fields/permx0.grdecl'

@eivindjahren eivindjahren moved this to Todo in SCOUT Feb 21, 2023
@oysteoh oysteoh moved this from Todo to In Progress in SCOUT Feb 21, 2023
@valentin-krasontovitsch valentin-krasontovitsch moved this from In Progress to Ready for Review in SCOUT Feb 22, 2023
@valentin-krasontovitsch valentin-krasontovitsch moved this from Ready for Review to In Review in SCOUT Feb 22, 2023
@valentin-krasontovitsch
Copy link
Contributor Author

Solved by now merged work on enkfs and covered by tests merged in #4983

@github-project-automation github-project-automation bot moved this from In Review to Done in SCOUT Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
1 participant