I encountered this issue (as stated in the title) when testing the ADC-WW3-NWM-NEMS coupling app on the UNC Hatteras cluster.
In _module_NEMSRusage.F90 and in the subroutine _color_byhash, the Fortran version of crc32 hash returned from the CRC algorithm (_nems_crusage.c) is negative. I think the problem is that the C function returns the crc32 hash as an unsigned integer data type (uint32_t), but in Fortran, the only available datatype is the signed integer (int32_t).
I am not sure if this indicates a bug in my compiler (openmpi 3.0.0)'s Fortran 2003 support or not (as noted at the beginning of this module). I also wonder if taking the absolute value of the negative Fortran hash can be a workaround for this machine/compiler dependent issue.
I encountered this issue (as stated in the title) when testing the ADC-WW3-NWM-NEMS coupling app on the UNC Hatteras cluster. In _module_NEMSRusage.F90 and in the subroutine _color_byhash, the Fortran version of crc32 hash returned from the CRC algorithm (_nems_crusage.c) is negative. I think the problem is that the C function returns the crc32 hash as an unsigned integer data type (uint32_t), but in Fortran, the only available datatype is the signed integer (int32_t). I am not sure if this indicates a bug in my compiler (openmpi 3.0.0)'s Fortran 2003 support or not (as noted at the beginning of this module). I also wonder if taking the absolute value of the negative Fortran hash can be a workaround for this machine/compiler dependent issue.