src/gray_errors.f90: avoid reshape in parameter initialization

The unused elements of the array are now initialized explicitly
with empty strings to add compatibility with ifort 2020, that
otherwise fails with internal error.
This commit is contained in:
Lorenzo Figini 2024-11-20 10:12:41 +00:00
parent 0ab0fcbf60
commit 6693fdf9b9

View File

@ -31,56 +31,56 @@ module gray_errors
type(error_spec), parameter :: unstable_beam = & type(error_spec), parameter :: unstable_beam = &
error_spec(offset=0, subcases=2, & error_spec(offset=0, subcases=2, &
mod='gray_core', proc='gray_main', & mod='gray_core', proc='gray_main', &
msg=reshape([str :: & msg=[str :: &
'beamtracing may be unstable'], & 'beamtracing may be unstable', &
[10], [str :: ''])) '', '', '', '', '', '', '', '', ''])
type(error_spec), parameter :: dielectric_tensor = & type(error_spec), parameter :: dielectric_tensor = &
error_spec(offset=after(unstable_beam), subcases=2, & error_spec(offset=after(unstable_beam), subcases=2, &
mod='gray_core', proc='gray_main', & mod='gray_core', proc='gray_main', &
msg=reshape([str :: & msg=[str :: &
'ε tensor, overflow in `fsup`', & 'ε tensor, overflow in `fsup`', &
'ε tensor, integration error in `hermitian_2`'], & 'ε tensor, integration error in `hermitian_2`', &
[10], [str :: ''])) '', '', '', '', '', '', '', ''])
type(error_spec), parameter :: warmdisp_convergence = & type(error_spec), parameter :: warmdisp_convergence = &
error_spec(offset=after(dielectric_tensor), subcases=2, & error_spec(offset=after(dielectric_tensor), subcases=2, &
mod='dispersion', proc='warmdisp', & mod='dispersion', proc='warmdisp', &
msg=reshape([str :: & msg=[str :: &
'failed to converge, returned fallback value', & 'failed to converge, returned fallback value', &
'failed to converge, returned last value'], & 'failed to converge, returned last value', &
[10], [str :: ''])) '', '', '', '', '', '', '', ''])
type(error_spec), parameter :: warmdisp_result = & type(error_spec), parameter :: warmdisp_result = &
error_spec(offset=after(warmdisp_convergence), subcases=2, & error_spec(offset=after(warmdisp_convergence), subcases=2, &
mod='dispersion', proc='warmdisp', & mod='dispersion', proc='warmdisp', &
msg=reshape([str :: & msg=[str :: &
'final N⊥² is NaN or ±Infinity', & 'final N⊥² is NaN or ±Infinity', &
'final N⊥² in 3rd quadrant'], & 'final N⊥² in 3rd quadrant', &
[10], [str :: ''])) '', '', '', '', '', '', '', ''])
type(error_spec), parameter :: negative_absorption = & type(error_spec), parameter :: negative_absorption = &
error_spec(offset=after(warmdisp_result), subcases=1, & error_spec(offset=after(warmdisp_result), subcases=1, &
mod='gray_core', proc='alpha_effj', & mod='gray_core', proc='alpha_effj', &
msg=reshape([str :: & msg=[str :: &
'negative absorption coeff.'], & 'negative absorption coeff.', &
[10], [str :: ''])) '', '', '', '', '', '', '', '', ''])
type(error_spec), parameter :: fpp_integration = & type(error_spec), parameter :: fpp_integration = &
error_spec(offset=after(negative_absorption), subcases=1, & error_spec(offset=after(negative_absorption), subcases=1, &
mod='eccd', proc='eccdeff', & mod='eccd', proc='eccdeff', &
msg=reshape([str :: & msg=[str :: &
'fpp integration error'], & 'fpp integration error', &
[10], [str :: ''])) '', '', '', '', '', '', '', '', ''])
type(error_spec), parameter :: fcur_integration = & type(error_spec), parameter :: fcur_integration = &
error_spec(offset=after(fpp_integration), subcases=3, & error_spec(offset=after(fpp_integration), subcases=3, &
mod='eccd', proc='eccdeff', & mod='eccd', proc='eccdeff', &
msg=reshape([str :: & msg=[str :: &
'fcur integration error (no trapping)', & 'fcur integration error (no trapping)', &
'fcur integration error (1st trapping region)', & 'fcur integration error (1st trapping region)', &
'fcur integration error (2st trapping region)'], & 'fcur integration error (2st trapping region)', &
[10], [str :: ''])) '', '', '', '', '', '', ''])
! Errors occuring during raytracing ! Errors occuring during raytracing
type(error_spec), parameter :: raytracing_errors(*) = [unstable_beam] type(error_spec), parameter :: raytracing_errors(*) = [unstable_beam]