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

Add threading to the filter_topo and orog_gsl codes #948

Merged
merged 19 commits into from
May 20, 2024

Conversation

GeorgeGayno-NOAA
Copy link
Collaborator

@GeorgeGayno-NOAA GeorgeGayno-NOAA commented May 15, 2024

DESCRIPTION OF CHANGES:

  • Add threading to the filter_topo and orog_gsl codes.
  • Update the regional_gsl_gwd regression test to run with varying thread counts.

TESTS CONDUCTED:

If there are changes to the build or source code, the tests below must be conducted. Contact a repository manager if you need assistance.

  • Compile branch on all Tier 1 machines using Intel (Orion, Jet, Hera, Hercules and WCOSS2). Done using 4c0d64c.
  • Compile branch on Hera using GNU. Done using 4c0d64c.
  • Compile branch in 'Debug' mode on WCOSS2. Done using 4c0d64c.
  • Run unit tests locally on any Tier 1 machine. Done on Hera using 4c0d64c. All tests passed.
  • Run grid_gen consistency tests locally on all Tier 1 machines. Used 4c0d64c. All tests passed on Orion, Hercules, Jet and Hera. Tests failed on WCOSS2, but this is not a problem. For details, see: Add threading to the filter_topo and orog_gsl codes #948 (comment)

Describe any additional tests performed.

Some stand-alone tests of the filter_topo program:

Some stand-alone tests of the orog_gsl program:

Some independent tests performed by @BinLiu-NOAA

DEPENDENCIES:

None.

DOCUMENTATION:

N/A

ISSUE:

Fixes #939.

George Gayno and others added 17 commits May 1, 2024 14:28
number of threads. The 'orog' and 'filter_topo' programs use
threads and should be tested with varying thread counts.

Update the hercules driver script to run test twice with
12 and 24 threads.

Fixes ufs-community#939.
@GeorgeGayno-NOAA
Copy link
Collaborator Author

GeorgeGayno-NOAA commented May 16, 2024

The regional.gsl.gwd regression test failed on WCOSS2 (4c0d64c). The files output from the orog_gsl step differed from the baseline. The test is run with both 15 and 30 threads. The differences as computed by the nccmp utility (15 thread run) are:

CHECK C772_oro_data_ls.tile7.halo0.nc
+ /lfs/h2/emc/global/noscrub/George.Gayno/util/nccmp/nccmp-1.8.5.0/src/nccmp -dmfqS C772_oro_data_ls.tile7.halo0.nc /lfs/h2/emc/nems/noscrub/emc.nems/UFS_UTILS/reg_tests/grid_gen/baseline_data/region
al.gsl.gwd/C772_oro_data_ls.tile7.halo0.nc
Variable  Group Count          Sum     AbsSum          Min         Max       Range         Mean      StdDev
stddev    /      1945 -0.000182526 0.00515588 -3.05176e-05 6.10352e-05 9.15527e-05 -9.38439e-08 4.90475e-06
convexity /     12724 -7.51019e-06 0.00569522 -2.86102e-06  3.8147e-06 6.67572e-06 -5.90238e-10 5.15856e-07
CHECK C772_oro_data_ss.tile7.halo0.nc
+ /lfs/h2/emc/global/noscrub/George.Gayno/util/nccmp/nccmp-1.8.5.0/src/nccmp -dmfqS C772_oro_data_ss.tile7.halo0.nc /lfs/h2/emc/nems/noscrub/emc.nems/UFS_UTILS/reg_tests/grid_gen/baseline_data/regional.gsl.gwd/C772_oro_data_ss.tile7.halo0.nc
Variable  Group Count          Sum     AbsSum          Min         Max       Range         Mean      StdDev
stddev    /       469 -6.74836e-06 0.00164294 -1.52588e-05 3.05176e-05 4.57764e-05 -1.43888e-08 5.81491e-06
convexity /     14718   2.6226e-06 0.00822735 -4.76837e-06 4.76837e-06 9.53674e-06   1.7819e-10 6.73586e-07

stddev is the standard deviation of the terrain. For this case it varies from 0 to around 350 meters. The differences from the baseline are very small. convexity ranges from about 1 to 9. Again, the differences are very small.

Rerunning the case with one thread showed the same exact differences. So, there is no problem with the threading. I suspect the OMP library on WCOSS2 may use different math libraries which create the difference.

In conclusion, the code is working and this PR should be merged.

@GeorgeGayno-NOAA GeorgeGayno-NOAA marked this pull request as ready for review May 16, 2024 17:36
@GeorgeGayno-NOAA
Copy link
Collaborator Author

@BinLiu-NOAA - can you please review?

Copy link
Collaborator

@BinLiu-NOAA BinLiu-NOAA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks for the speeding up through OMP threading!

@GeorgeGayno-NOAA GeorgeGayno-NOAA merged commit c6efbbd into ufs-community:develop May 20, 2024
4 checks passed
BinLiu-NOAA pushed a commit to hafs-community/UFS_UTILS that referenced this pull request Jul 10, 2024
Include threading in both programs. Update the "regional.gsl.gwd" 
regression test - which runs both programs - to run twice with varying
thread counts.

Fixes ufs-community#939.
@GeorgeGayno-NOAA GeorgeGayno-NOAA deleted the filter_opt branch July 15, 2024 20:14
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

Successfully merging this pull request may close these issues.

Enable OpenMP threading to speed up orog_gsl and filter_topo programs
2 participants