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

chgres_cube - problem with call to routine "search_many" #797

Closed
GeorgeGayno-NOAA opened this issue Mar 30, 2023 · 3 comments · Fixed by #808
Closed

chgres_cube - problem with call to routine "search_many" #797

GeorgeGayno-NOAA opened this issue Mar 30, 2023 · 3 comments · Fixed by #808
Assignees
Labels
bug Something isn't working

Comments

@GeorgeGayno-NOAA
Copy link
Collaborator

When running is Debug mode, the chgres_cube regression tests are crashing at the calls to routine "search_many". That routine is called from each MPI task, but some of the arguments have only been allocated on task 0. For example, the tests crash with an error about 'land_target_one_tile' not being allocated.

   if (localpet == 0) then
     allocate(land_target_one_tile(i_target,j_target))
     land_target_one_tile = 0
     where(mask_target_one_tile == 1) land_target_one_tile = 1
   endif

   call search_many(num_fields,bundle_allland_target,data_one_tile, land_target_one_tile,&
                    tile,search_nums,localpet)

   if (localpet == 0) deallocate(land_target_one_tile)

After a code handoff, NCO will now compile/run all tags in Debug mode. For the Intel compiler, that mode must include at least -check all -ftrapuv.

As a future item, at least one of the regression tests should run in Debug mode.

@GeorgeGayno-NOAA
Copy link
Collaborator Author

@LarissaReames-NOAA I recall you had a fix ready? If so, I can test it.

@LarissaReames-NOAA
Copy link
Collaborator

@LarissaReames-NOAA I recall you had a fix ready? If so, I can test it.

I'm running the GitHub actions in my fork right now. Once those pass I'll submit a PR. If you'd like to test before then, here's the branch: https://github.com/LarissaReames-NOAA/UFS_UTILS/tree/feature/fix_chres_unallocated_bug

GeorgeGayno-NOAA pushed a commit that referenced this issue Apr 12, 2023
The routine is called from all MPI tasks, but some arrays passed to
the routine were not allocated on all tasks. This problem was only seen 
when compiling/running under 'Debug' mode (all regression tests crashed
at the call to search_many).

Fixes #797.
@GeorgeGayno-NOAA
Copy link
Collaborator Author

@BinLiu-NOAA and @ZhanZhang-NOAA - chgres_cube now runs on WCOSS2 in "Debug' mode.

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