UW-Hydro / VIC

The Variable Infiltration Capacity (VIC) Macroscale Hydrologic Model
http://vic.readthedocs.io
MIT License
262 stars 392 forks source link

Intel compiler warnings #563

Closed jhamman closed 8 years ago

jhamman commented 8 years ago

Version info:

./vic_image.exe -v
warning:regcache incompatible with malloc
VIC Driver  : Image
VIC Version : 5.0.0 Release Candidate 1: June 28, 2016
VIC Git Tag : VIC.5.0.0.rc1-18-gacbca-dirty
Compiled    : by jhamman1 on n0026 (LINUX) Jul 20 2016 22:27:01
Compiler    : icc
 version    : Intel(R) C++ gcc 4.4.7 mode

Intel version is actually 16.0.2 on Hyak.

Warnings:

../../vic_run/src/surface_fluxes.c(512): warning #3656: variable "iter_soil_energy" may be used before its value is set
                              (last_snow_flux + iter_soil_energy.snow_flux) / 2.;
                                                ^

../shared_image/src/vic_mpi_support.c(1598): warning #1338: arithmetic on pointer to void or function type
              memcpy(to + i * size, from + i * size, size);
                        ^

../shared_image/src/vic_mpi_support.c(1598): warning #1338: arithmetic on pointer to void or function type
              memcpy(to + i * size, from + i * size, size);
                                         ^

../shared_image/src/vic_mpi_support.c(1604): warning #1338: arithmetic on pointer to void or function type
              memcpy(to + i * size, from + from_map[i] * size, size);
                        ^

../shared_image/src/vic_mpi_support.c(1604): warning #1338: arithmetic on pointer to void or function type
              memcpy(to + i * size, from + from_map[i] * size, size);
                                         ^

../shared_image/src/vic_mpi_support.c(1610): warning #1338: arithmetic on pointer to void or function type
              memcpy(to + to_map[i] * size, from + i * size, size);
                        ^

../shared_image/src/vic_mpi_support.c(1610): warning #1338: arithmetic on pointer to void or function type
              memcpy(to + to_map[i] * size, from + i * size, size);
                                                 ^

../shared_image/src/vic_mpi_support.c(1616): warning #1338: arithmetic on pointer to void or function type
              memcpy(to + to_map[i] * size, from + from_map[i] * size, size);
                        ^

../shared_image/src/vic_mpi_support.c(1616): warning #1338: arithmetic on pointer to void or function type
              memcpy(to + to_map[i] * size, from + from_map[i] * size, size);```
jhamman commented 8 years ago

Additional warnings when using OpenMPI version 1.8.8:

../shared_image/src/vic_mpi_support.c(69): warning #1478: function "MPI_Errhandler_set" (declared at line 1335 of "/sw/openmpi-1.8.8_icc-16.0.2/include/mpi.h") was declared deprecated
      MPI_Errhandler_set(MPI_COMM_VIC, MPI_ERRORS_RETURN);
      ^

../shared_image/src/vic_mpi_support.c(72): warning #1478: function "MPI_Errhandler_set" (declared at line 1335 of "/sw/openmpi-1.8.8_icc-16.0.2/include/mpi.h") was declared deprecated
      MPI_Errhandler_set(MPI_COMM_VIC, MPI_ERRORS_RETURN);
      ^
bartnijssen commented 8 years ago

For the regcache warning : this appears at runtime.

Try setting the following environment variable: MX_RCACHE=2 in your shell before you run it and see if the message disappears. Not sure whether you need to do it before you build it or before you run it. I would try the latter first and see if it makes the message go away

If that does not work you can also try MX-RCACHE=0. This thread has some info on this: https://www.open-mpi.org/community/lists/users/2007/07/3621.php and this post was the most informative: https://www.open-mpi.org/community/lists/users/2007/07/3623.php .

I think you may just be able to use a -D flag in the Makefile: -D MX_RCACHE=2 and that may fix it, but you may need to play around with it a bit.

jhamman commented 8 years ago

MX_RCACHE=2 set after the build silences the recache warning.

bartnijssen commented 8 years ago

@jhamman - maybe add a line for this in the documentation (or Makefile) and then close the issue

jhamman commented 8 years ago

closed via #568