- edited description
compilation fails with cray compiler at diagnostics_zonal_transfer
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)
-
reporter -
Thanks Ryusuke. I see this too with Cray compilers on Archer. Looking at the other diagnostics files,
gnostics
hasintent(inout)
, even though we're only writing the variable, so would expectintent(in)
to be okay. Changingintent(in)
tointent(inout)
would be the easiest fix.As an aside, the reason it needs to be
inout
is becausecreate_and_write_variable
callsread_variable
fromsimpledataio_read
, which in turn puts data into the last argument ofcreate_and_write_variable
usingnf90_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 indiagnostics_create_and_write
, calledcreate_and_write_variable_no_read
, that skips the reading step; that would allowintent(in)
. But this part of the code has bus factor zero. -
- changed status to resolved
Closed by PR #62
- Log in to comment