[MOAB-dev] commit/MOAB: danwu: Added PNETCDF_FILE guards to make a build configured without pnetcdf pass.

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Tue Apr 22 10:18:32 CDT 2014


1 new commit in MOAB:

https://bitbucket.org/fathomteam/moab/commits/e33195a012f1/
Changeset:   e33195a012f1
Branch:      ncwriter
User:        danwu
Date:        2014-04-22 17:18:05
Summary:     Added PNETCDF_FILE guards to make a build configured without pnetcdf pass.

Affected #:  1 file

diff --git a/src/io/NCWriteHelper.cpp b/src/io/NCWriteHelper.cpp
index 18c8a3e..4f95ef8 100644
--- a/src/io/NCWriteHelper.cpp
+++ b/src/io/NCWriteHelper.cpp
@@ -561,11 +561,12 @@ ErrorCode ScdNCWriteHelper::write_values(std::vector<std::string>& var_names)
   // Use independent I/O mode put, since this write is only for the root processor
   // CAUTION: if the NetCDF ID is from a previous call to ncmpi_create rather than ncmpi_open,
   // all processors need to call ncmpi_begin_indep_data(). If only the root processor does so,
-  // ncmpi_begin_indep_data() will be blocked forever, :(
-
+  // ncmpi_begin_indep_data() call will be blocked forever :(
+#ifdef PNETCDF_FILE
   // Enter independent I/O mode
   success = NCFUNC(begin_indep_data)(_fileId);
   ERRORS(success, "Failed to begin independent I/O mode.");
+#endif
 
   int rank = 0;
 #ifdef USE_MPI
@@ -609,9 +610,11 @@ ErrorCode ScdNCWriteHelper::write_values(std::vector<std::string>& var_names)
     }
   }
 
+#ifdef PNETCDF_FILE
   // End independent I/O mode
   success = NCFUNC(end_indep_data)(_fileId);
   ERRORS(success, "Failed to end independent I/O mode.");
+#endif
 
   return MB_SUCCESS;
 }

Repository URL: https://bitbucket.org/fathomteam/moab/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.


More information about the moab-dev mailing list