Add support (and tests) for optional arguments in ccpp_prebuild
See https://github.com/NCAR/ccpp-framework/issues/526 for a detailed description. This PR goes even further and creates an array of pointers for each conditionally allocated variable dimensioned to the number of OpenMP threads. This was required to fix multi-threading issues with GNU compilers (9.2.0 on Hera - might have to do with this being an old version). Since pointers do not cost anything in terms of memory, it's not an issue at all to have an array of number-of-openmp-thread pointers instead of a scalar.
Testing:
test removed: none
unit tests: added test_prebuild/test_opt_arg/* and wrapper script test_prebuild/run_all_tests.sh that runs all tests - ALL PASS
system tests: ran end-to-end regression tests for ufs-weather-model on Hera with Intel and GNU, all tests b4b identical with existing baseline
manual testing: compile on macOS for all suites (cannot run due to ESMF/UFS-W-M bug on macOS, since about 5 years ago)
Add support (and tests) for optional arguments in ccpp_prebuild
See https://github.com/NCAR/ccpp-framework/issues/526 for a detailed description. This PR goes even further and creates an array of pointers for each conditionally allocated variable dimensioned to the number of OpenMP threads. This was required to fix multi-threading issues with GNU compilers (9.2.0 on Hera - might have to do with this being an old version). Since pointers do not cost anything in terms of memory, it's not an issue at all to have an array of number-of-openmp-thread pointers instead of a scalar.
User interface changes?: No
Resolves https://github.com/NCAR/ccpp-framework/issues/526 Resolves https://github.com/NCAR/ccpp-framework/issues/540
Testing: test removed: none unit tests: added
test_prebuild/test_opt_arg/*
and wrapper scripttest_prebuild/run_all_tests.sh
that runs all tests - ALL PASS system tests: ran end-to-end regression tests for ufs-weather-model on Hera with Intel and GNU, all tests b4b identical with existing baseline manual testing: compile on macOS for all suites (cannot run due to ESMF/UFS-W-M bug on macOS, since about 5 years ago)