Change order of includes: mpi.h BEFORE netcdf.h