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

Non-allocated arrays accessed in output #415

Open
micaeljtoliveira opened this issue Oct 8, 2024 · 0 comments
Open

Non-allocated arrays accessed in output #415

micaeljtoliveira opened this issue Oct 8, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@micaeljtoliveira
Copy link
Contributor

micaeljtoliveira commented Oct 8, 2024

As discussed in #410, there are a few places where non-allocated arrays are accessed in src/offline/cable_output.F90. Nothing is really done with the arrays and the code works fine with the Intel compiler, but gfortran produces a segmentation fault.

The proposed solution is to fence the affected code to make sure arrays are only accessed if they were allocated.

As a side-note, the code would probably be more robust (i.e, compilers would better identify and report the issue) if the arrays were declared as allocatables instead of pointers. This would also probably generate faster code.

@micaeljtoliveira micaeljtoliveira added the bug Something isn't working label Oct 8, 2024
@micaeljtoliveira micaeljtoliveira self-assigned this Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant