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

Failure in atlas_fctest_trace #45

Closed
DJDavies2 opened this issue Jul 8, 2024 · 2 comments · Fixed by #46
Closed

Failure in atlas_fctest_trace #45

DJDavies2 opened this issue Jul 8, 2024 · 2 comments · Fixed by #46
Labels
bug Something isn't working

Comments

@DJDavies2
Copy link
Contributor

What happened?

I am getting a failure in atlas_fctest_trace like this:

28/208 Test #28: atlas_fctest_trace ........................................Subprocess aborted***Exception: 0.30 sec
Runtime Error: /home/h01/frwd/cylc-run/mi-be984/work/1/git_clone_fckit/fckit/src/fckit/module/fckit_C_interop.F90, line 169: Subscript out of range for assumed-size array S - Access to element 256 but actual argument has only 255 elements
Program terminated by fatal error
/home/h01/frwd/cylc-run/mi-be984/work/1/git_clone_fckit/fckit/src/fckit/module/fckit_C_interop.F90, line 169: Error occurred in FCKIT_C_INTEROP_MODULE:COPY_C_STR_TO_STRING
/home/h01/frwd/cylc-run/mi-be984/work/1/git_clone_fckit/fckit/src/fckit/module/fckit_C_interop.F90, line 188: Called by FCKIT_C_INTEROP_MODULE:COPY_C_PTR_TO_STRING
/home/h01/frwd/cylc-run/mi-be984/work/1/git_clone_fckit/fckit/src/fckit/Log.F90, line 17: Called by FCKIT_WRITE_TO_FORTRAN_UNIT
/home/h01/frwd/cylc-run/mi-be984/work/1/git_clone_atlas/atlas/src/atlas_f/atlas_module.F90, line 246: Called by ATLAS_MODULE:ATLAS_FINAL
/home/h01/frwd/cylc-run/mi-be984/work/1/ecbuild_atlas_nag/build/src/tests/runtime//home/h01/frwd/cylc-run/mi-be984/work/1/git_clone_atlas/atlas/src/tests/runtime/fctest_trace.fypp, line 59: Called by FCTEST_ATLAS_TRACE:TESTSUITE_FINALIZE
/home/h01/frwd/cylc-run/mi-be984/work/1/ecbuild_atlas_nag/build/src/tests/runtime/fctest_trace_main.F90, line 22: Called by RUN_FCTEST_ATLAS_TRACE

I believe the problem is in fckit though, so I am opening the issue here.

What are the steps to reproduce the bug?

Build and run with NAG.

Version

develop

Platform (OS and architecture)

Linux

Relevant log output

No response

Accompanying data

No response

Organisation

Met Office

@DJDavies2 DJDavies2 added the bug Something isn't working label Jul 8, 2024
@wdeconinck
Copy link
Member

Indeed as mentioned in #46 there is the hardcoded limit. I think the change in #46 is good, but I also think we should increase this limit. What is the example limit that would be required for this test to pass?

@DJDavies2
Copy link
Contributor Author

I upped the limit to 2550 in copy_c_ptr_to_string and the test passed. Looking at the particular tests, it appears that the string that it is trying to print is a stack trace; it is coming from the atlas finalise/library code (not surprising given which ctest is failing).

I can go through and increase all the limits to 2550 if you like. When these fckit functions were written was it intended that longer strings like stack traces would be passed to them?

Ideally there would be a way of doing this that didn't involve hardcoded limits at all.

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

Successfully merging a pull request may close this issue.

2 participants