compilation fails with cray compiler at diagnostics_zonal_transfer

Issue #41 resolved
Ryusuke Numata created an issue

Cray compiler on JFRS (Cray XC50 at IFERC-CSC in Japan) reports an error at diagnostics_zonal_transfer. gnostics should intent(in out)??

module diagnostics_zonal_transfer ^
ftn-855 crayftn: ERROR DIAGNOSTICS_ZONAL_TRANSFER, File = diagnostics/diagnostics_zonal_transfer.f90, Line = 1, Column = 8 The compiler has detected errors in module "DIAGNOSTICS_ZONAL_TRANSFER". No module information file will be created for this module.

"Tr2rhorcnsvth6 / Ba2ea3", gnostics%current_results%zonal_transfer) ^
ftn-786 crayftn: ERROR WRITE_ZONAL_TRANSFER, File = diagnostics/diagnostics_zonal_transfer.f90, Line = 335, Column = 68 An actual argument must be definable when associated with a dummy argument that has INTENT(OUT) or INTENT(INOUT).

Comments (3)

  1. Joseph Parker

    Thanks Ryusuke. I see this too with Cray compilers on Archer. Looking at the other diagnostics files, gnostics has intent(inout), even though we're only writing the variable, so would expect intent(in) to be okay. Changing intent(in) to intent(inout) would be the easiest fix.

    As an aside, the reason it needs to be inout is because create_and_write_variable calls read_variable from simpledataio_read, which in turn puts data into the last argument of create_and_write_variable using nf90_get_var. This looks to me that we are reading data from the netcdf file only to write it back again? There is also a function in diagnostics_create_and_write, called create_and_write_variable_no_read, that skips the reading step; that would allow intent(in). But this part of the code has bus factor zero.

  2. Log in to comment