/[escript]/trunk/escript/src/DataConstant.cpp
ViewVC logotype

Diff of /trunk/escript/src/DataConstant.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3258 by jfenwick, Thu Jan 28 02:03:15 2010 UTC revision 3259 by jfenwick, Mon Oct 11 01:48:14 2010 UTC
# Line 16  Line 16 
16  #include "DataConstant.h"  #include "DataConstant.h"
17  #include "DataException.h"  #include "DataException.h"
18  #include "esysUtils/EsysAssert.h"  #include "esysUtils/EsysAssert.h"
19    #include "esysUtils/Esys_MPI.h"
20    
21  #include <iostream>  #include <iostream>
22  #include <boost/python/extract.hpp>  #include <boost/python/extract.hpp>
23    #include <boost/scoped_ptr.hpp>
24  #ifdef USE_NETCDF  #ifdef USE_NETCDF
25  #include <netcdfcpp.h>  #include <netcdfcpp.h>
26  #endif  #endif
 #ifdef PASO_MPI  
 #include <mpi.h>  
 #endif  
27    
 #include <boost/python/extract.hpp>  
 #include <boost/scoped_ptr.hpp>  
28  #include "DataMaths.h"  #include "DataMaths.h"
29    
30  // #define CHECK_FOR_EX_WRITE if (!checkNoSharing()) {throw DataException("Attempt to modify shared object");}  // #define CHECK_FOR_EX_WRITE if (!checkNoSharing()) {throw DataException("Attempt to modify shared object");}
# Line 290  DataConstant::dump(const std::string fil Line 287  DataConstant::dump(const std::string fil
287     DataTypes::ShapeType shape = getShape();     DataTypes::ShapeType shape = getShape();
288     int mpi_iam=getFunctionSpace().getDomain()->getMPIRank();     int mpi_iam=getFunctionSpace().getDomain()->getMPIRank();
289     int mpi_num=getFunctionSpace().getDomain()->getMPISize();     int mpi_num=getFunctionSpace().getDomain()->getMPISize();
290  #ifdef PASO_MPI  #ifdef ESYS_MPI
291     MPI_Status status;     MPI_Status status;
292  #endif  #endif
293    
294  #ifdef PASO_MPI  #ifdef ESYS_MPI
295     /* Serialize NetCDF I/O */     /* Serialize NetCDF I/O */
296     if (mpi_iam>0) MPI_Recv(&ndims, 0, MPI_INT, mpi_iam-1, 81802, MPI_COMM_WORLD, &status);     if (mpi_iam>0) MPI_Recv(&ndims, 0, MPI_INT, mpi_iam-1, 81802, MPI_COMM_WORLD, &status);
297  #endif  #endif
# Line 345  DataConstant::dump(const std::string fil Line 342  DataConstant::dump(const std::string fil
342      throw DataException("Error - DataConstant:: appending variable to netCDF file failed.");      throw DataException("Error - DataConstant:: appending variable to netCDF file failed.");
343     if (! (var->put(d_ptr,dims)) )     if (! (var->put(d_ptr,dims)) )
344           throw DataException("Error - DataConstant:: copy data to netCDF buffer failed.");           throw DataException("Error - DataConstant:: copy data to netCDF buffer failed.");
345  #ifdef PASO_MPI  #ifdef ESYS_MPI
346     if (mpi_iam<mpi_num-1) MPI_Send(&ndims, 0, MPI_INT, mpi_iam+1, 81802, MPI_COMM_WORLD);     if (mpi_iam<mpi_num-1) MPI_Send(&ndims, 0, MPI_INT, mpi_iam+1, 81802, MPI_COMM_WORLD);
347  #endif  #endif
348     #else     #else

Legend:
Removed from v.3258  
changed lines
  Added in v.3259

  ViewVC Help
Powered by ViewVC 1.1.26