NVidia/PGI errors
mo_utils::unpack_chunkwise
Getting the following error using the PGI compiler:
[ 64%] Building Fortran object _deps/forces-build/src/CMakeFiles/forces.dir/mo_nml.f90.o
PGF90-S-0079-Keyword form of argument illegal in this context for kind (/home/muellese/GIT/cli_test/build/_deps/forces-src/src/mo_utils.f90: 1315)
0 inform, 0 warnings, 1 severes, 0 fatal for unpack_chunkwise_dp
PGF90-S-0079-Keyword form of argument illegal in this context for kind (/home/muellese/GIT/cli_test/build/_deps/forces-src/src/mo_utils.f90: 1361)
0 inform, 0 warnings, 1 severes, 0 fatal for unpack_chunkwise_i1
Problem is the unsupported kind
argument here https://git.ufz.de/chs/forces/-/blob/6c5856549769863028d8f1a1b180abc2de27da13/src/mo_utils.f90#L1315:
counts = count(mask(indexMin: indexMax), kind=i8)
mo_cli::get_option
Need to change (https://git.ufz.de/chs/forces/-/blob/3357358f8244ff7d85f3ff6364e7063e348a1f79/src/mo_cli.f90#L323):
get_option = self%options(self%get_option_index(name))
to:
integer(i4) :: i
i = self%get_option_index(name)
get_option = self%options(i)
Hope Nvidia is getting better at this, since this just resulted in an internal compiler error.
mo_cost::cost_objective
When running test_mo_anneal
, test_mo_dds
or test_mo_sce
we run into errors like the following:
See: https://git.ufz.de/chs/forces/-/blob/3357358f8244ff7d85f3ff6364e7063e348a1f79/src/mo_cost.f90#L230
"test_mo_anneal" start time: Jun 01 09:42 CEST
Output:
----------------------------------------------------------
0: Null pointer for et_opti (forces/src/mo_cost.f90: 230)
According to https://stackoverflow.com/a/58191670/6696397, et_opti
should be allocated before passing, which is actually a requirement by the fortran standard. This means that the paragraph 7 of section 15.5.2.4 of the current Fortran standard applies:
Except in references to intrinsic inquiry functions, if the dummy argument is nonoptional and the actual argument is allocatable, the corresponding actual argument shall be allocated.
mo_utils
Here comes the downside of not using pFUnit:
"test_mo_utils" start time: Jun 01 09:42 CEST
Output:
----------------------------------------------------------
TestError: mo_utils failed
Warning: ieee_invalid is signaling
Warning: ieee_overflow is signaling
Warning: ieee_inexact is signaling
I have no clue what is going wrong ATM.
@ottor since pgi is now part of nvidia hpc sdk, we could just drop the old PGI compiler: https://git.ufz.de/it/eve/software/-/issues/234