Commit a4084ea6 authored by Yves Ineichen's avatar Yves Ineichen

Merge branch 'develop' into svn: replacing MPI_COMM_WORLDs and adding barrier...

Merge branch 'develop' into svn: replacing MPI_COMM_WORLDs and adding barrier before opal lib starts running
parent 95035af5
......@@ -940,7 +940,7 @@ void PartBunch::computeSelfFields() {
//ostringstream oss;
//MPI_File file;
//MPI_Status status;
//MPI_File_open(MPI_COMM_WORLD, "rho_scalar", MPI_MODE_WRONLY | MPI_MODE_CREATE, MPI_INFO_NULL, &file);
//MPI_File_open(Ippl::getComm(), "rho_scalar", MPI_MODE_WRONLY | MPI_MODE_CREATE, MPI_INFO_NULL, &file);
ofstream fstr2;
fstr2.precision(9);
......@@ -981,7 +981,7 @@ void PartBunch::computeSelfFields() {
//MPI_File file;
//MPI_Status status;
//MPI_Info fileinfo;
//MPI_File_open(MPI_COMM_WORLD, "rho_scalar", MPI_MODE_WRONLY | MPI_MODE_CREATE, fileinfo, &file);
//MPI_File_open(Ippl::getComm(), "rho_scalar", MPI_MODE_WRONLY | MPI_MODE_CREATE, fileinfo, &file);
ofstream fstr;
......
......@@ -23,7 +23,7 @@ FM3DH5Block::FM3DH5Block(string aFilename):
h5_int64_t ftype;
Type = T3DDynamicH5Block;
h5_file_t *file = H5OpenFile(aFilename.c_str(), H5_O_RDONLY, MPI_COMM_WORLD);
h5_file_t *file = H5OpenFile(aFilename.c_str(), H5_O_RDONLY, Ippl::getComm());
if(file) {
......@@ -80,7 +80,7 @@ FM3DH5Block::~FM3DH5Block() {
void FM3DH5Block::readMap() {
if(FieldstrengthEz_m.empty()) {
Inform msg("FM3DH5 ");
h5_file_t *file = H5OpenFile(Filename_m.c_str(), H5_O_RDONLY, MPI_COMM_WORLD);
h5_file_t *file = H5OpenFile(Filename_m.c_str(), H5_O_RDONLY, Ippl::getComm());
if(file) {
h5_int64_t h5err;
......@@ -162,12 +162,12 @@ void FM3DH5Block::readMap() {
for(int i = 0; i < Nnodes; ++ i) {
int N_read_start = Nz_read_start[i] * num_gridpx_m * num_gridpy_m;
int N_read_length = Nz_read_length[i] * num_gridpx_m * num_gridpy_m;
MPI_Bcast(&(FieldstrengthEx_m[N_read_start]), N_read_length, MPI_DOUBLE, i, MPI_COMM_WORLD);
MPI_Bcast(&(FieldstrengthEy_m[N_read_start]), N_read_length, MPI_DOUBLE, i, MPI_COMM_WORLD);
MPI_Bcast(&(FieldstrengthEz_m[N_read_start]), N_read_length, MPI_DOUBLE, i, MPI_COMM_WORLD);
MPI_Bcast(&(FieldstrengthHx_m[N_read_start]), N_read_length, MPI_DOUBLE, i, MPI_COMM_WORLD);
MPI_Bcast(&(FieldstrengthHy_m[N_read_start]), N_read_length, MPI_DOUBLE, i, MPI_COMM_WORLD);
MPI_Bcast(&(FieldstrengthHz_m[N_read_start]), N_read_length, MPI_DOUBLE, i, MPI_COMM_WORLD);
MPI_Bcast(&(FieldstrengthEx_m[N_read_start]), N_read_length, MPI_DOUBLE, i, Ippl::getComm());
MPI_Bcast(&(FieldstrengthEy_m[N_read_start]), N_read_length, MPI_DOUBLE, i, Ippl::getComm());
MPI_Bcast(&(FieldstrengthEz_m[N_read_start]), N_read_length, MPI_DOUBLE, i, Ippl::getComm());
MPI_Bcast(&(FieldstrengthHx_m[N_read_start]), N_read_length, MPI_DOUBLE, i, Ippl::getComm());
MPI_Bcast(&(FieldstrengthHy_m[N_read_start]), N_read_length, MPI_DOUBLE, i, Ippl::getComm());
MPI_Bcast(&(FieldstrengthHz_m[N_read_start]), N_read_length, MPI_DOUBLE, i, Ippl::getComm());
}
h5err = H5CloseFile(file);
......
......@@ -22,7 +22,7 @@ FM3DH5Block_nonescale::FM3DH5Block_nonescale(string aFilename):
h5_size_t len_name = 20;
Type = T3DDynamicH5Block;
h5_file_t *file = H5OpenFile(aFilename.c_str(), H5_O_RDONLY, MPI_COMM_WORLD);
h5_file_t *file = H5OpenFile(aFilename.c_str(), H5_O_RDONLY, Ippl::getComm());
if(file) {
......@@ -80,7 +80,7 @@ FM3DH5Block_nonescale::~FM3DH5Block_nonescale() {
void FM3DH5Block_nonescale::readMap() {
if(FieldstrengthEz_m.empty()) {
Inform msg("FM3DH5_NS ");
h5_file_t *file = H5OpenFile(Filename_m.c_str(), H5_O_RDONLY, MPI_COMM_WORLD);
h5_file_t *file = H5OpenFile(Filename_m.c_str(), H5_O_RDONLY, Ippl::getComm());
if(file) {
h5_int64_t h5err;
......@@ -147,12 +147,12 @@ void FM3DH5Block_nonescale::readMap() {
for(int i = 0; i < Nnodes; ++ i) {
int N_read_start = Nz_read_start[i] * num_gridpx_m * num_gridpy_m;
int N_read_length = Nz_read_length[i] * num_gridpx_m * num_gridpy_m;
MPI_Bcast(&(FieldstrengthEx_m[N_read_start]), N_read_length, MPI_DOUBLE, i, MPI_COMM_WORLD);
MPI_Bcast(&(FieldstrengthEy_m[N_read_start]), N_read_length, MPI_DOUBLE, i, MPI_COMM_WORLD);
MPI_Bcast(&(FieldstrengthEz_m[N_read_start]), N_read_length, MPI_DOUBLE, i, MPI_COMM_WORLD);
MPI_Bcast(&(FieldstrengthHx_m[N_read_start]), N_read_length, MPI_DOUBLE, i, MPI_COMM_WORLD);
MPI_Bcast(&(FieldstrengthHy_m[N_read_start]), N_read_length, MPI_DOUBLE, i, MPI_COMM_WORLD);
MPI_Bcast(&(FieldstrengthHz_m[N_read_start]), N_read_length, MPI_DOUBLE, i, MPI_COMM_WORLD);
MPI_Bcast(&(FieldstrengthEx_m[N_read_start]), N_read_length, MPI_DOUBLE, i, Ippl::getComm());
MPI_Bcast(&(FieldstrengthEy_m[N_read_start]), N_read_length, MPI_DOUBLE, i, Ippl::getComm());
MPI_Bcast(&(FieldstrengthEz_m[N_read_start]), N_read_length, MPI_DOUBLE, i, Ippl::getComm());
MPI_Bcast(&(FieldstrengthHx_m[N_read_start]), N_read_length, MPI_DOUBLE, i, Ippl::getComm());
MPI_Bcast(&(FieldstrengthHy_m[N_read_start]), N_read_length, MPI_DOUBLE, i, Ippl::getComm());
MPI_Bcast(&(FieldstrengthHz_m[N_read_start]), N_read_length, MPI_DOUBLE, i, Ippl::getComm());
}
h5err = H5CloseFile(file);
......
......@@ -22,7 +22,7 @@ FM3DMagnetoStaticH5Block::FM3DMagnetoStaticH5Block(string aFilename):
h5_size_t len_name = 20;
Type = T3DMagnetoStaticH5Block;
h5_file_t *file = H5OpenFile(aFilename.c_str(), H5_O_RDONLY, MPI_COMM_WORLD);
h5_file_t *file = H5OpenFile(aFilename.c_str(), H5_O_RDONLY, Ippl::getComm());
if(file) {
......@@ -77,7 +77,7 @@ FM3DMagnetoStaticH5Block::~FM3DMagnetoStaticH5Block() {
void FM3DMagnetoStaticH5Block::readMap() {
if(FieldstrengthEz_m.empty()) {
Inform msg("FM3DMagH5 ");
h5_file_t *file = H5OpenFile(Filename_m.c_str(), H5_O_RDONLY, MPI_COMM_WORLD);
h5_file_t *file = H5OpenFile(Filename_m.c_str(), H5_O_RDONLY, Ippl::getComm());
if(file) {
h5_int64_t h5err;
......@@ -152,12 +152,12 @@ void FM3DMagnetoStaticH5Block::readMap() {
for(int i = 0; i < Nnodes; ++ i) {
int N_read_start = Nz_read_start[i] * num_gridpx_m * num_gridpy_m;
int N_read_length = Nz_read_length[i] * num_gridpx_m * num_gridpy_m;
MPI_Bcast(&(FieldstrengthEx_m[N_read_start]), N_read_length, MPI_DOUBLE, i, MPI_COMM_WORLD);
MPI_Bcast(&(FieldstrengthEy_m[N_read_start]), N_read_length, MPI_DOUBLE, i, MPI_COMM_WORLD);
MPI_Bcast(&(FieldstrengthEz_m[N_read_start]), N_read_length, MPI_DOUBLE, i, MPI_COMM_WORLD);
MPI_Bcast(&(FieldstrengthBx_m[N_read_start]), N_read_length, MPI_DOUBLE, i, MPI_COMM_WORLD);
MPI_Bcast(&(FieldstrengthBy_m[N_read_start]), N_read_length, MPI_DOUBLE, i, MPI_COMM_WORLD);
MPI_Bcast(&(FieldstrengthBz_m[N_read_start]), N_read_length, MPI_DOUBLE, i, MPI_COMM_WORLD);
MPI_Bcast(&(FieldstrengthEx_m[N_read_start]), N_read_length, MPI_DOUBLE, i, Ippl::getComm());
MPI_Bcast(&(FieldstrengthEy_m[N_read_start]), N_read_length, MPI_DOUBLE, i, Ippl::getComm());
MPI_Bcast(&(FieldstrengthEz_m[N_read_start]), N_read_length, MPI_DOUBLE, i, Ippl::getComm());
MPI_Bcast(&(FieldstrengthBx_m[N_read_start]), N_read_length, MPI_DOUBLE, i, Ippl::getComm());
MPI_Bcast(&(FieldstrengthBy_m[N_read_start]), N_read_length, MPI_DOUBLE, i, Ippl::getComm());
MPI_Bcast(&(FieldstrengthBz_m[N_read_start]), N_read_length, MPI_DOUBLE, i, Ippl::getComm());
}
h5err = H5CloseFile(file);
......
......@@ -273,7 +273,7 @@ MapType Fieldmap::readHeader(std::string Filename) {
h5_size_t len_name = 20;
h5_int64_t ftype;
h5_file_t *file = H5OpenFile(Filename.c_str(), H5_O_RDONLY, MPI_COMM_WORLD);
h5_file_t *file = H5OpenFile(Filename.c_str(), H5_O_RDONLY, Ippl::getComm());
if(file) {
h5err = H5SetStep(file, 0);
if(h5err != H5_SUCCESS)
......
......@@ -39,7 +39,7 @@ BoundaryGeometry::BoundaryGeometry() :
itsAttr[TOPO] = Attributes::makeString
("TOPO",
"BOX, BOXCORNER, ELLIPTIC if FGEOM is selected topo is over-written ",
"BOX, BOXCORNER, ELLIPTIC if FGEOM is selected topo is over-written ",
"ELLIPTIC");
itsAttr[LENGHT] = Attributes::makeReal
......@@ -184,7 +184,7 @@ BoundaryGeometry* BoundaryGeometry::find (const string& name) {
OpalData::getInstance ()->find (name));
if (geom == 0)
throw OpalException ("BoundaryGeometry::find()", "Geometry \""
throw OpalException ("BoundaryGeometry::find()", "Geometry \""
+ name + "\" not found.");
return geom;
}
......@@ -575,7 +575,7 @@ void BoundaryGeometry::initialize () {
if (rc != H5_SUCCESS)
ERRORMSG ("H5 rc= " << rc << " in " << __FILE__ << " @ line " << __LINE__ << endl);
H5SetVerbosityLevel (1);
h5_file_t* f = H5OpenFile (h5FileName_m.c_str (), H5_O_RDONLY, MPI_COMM_WORLD);
h5_file_t* f = H5OpenFile (h5FileName_m.c_str (), H5_O_RDONLY, Ippl::getComm());
h5t_mesh_t* m = NULL;
H5FedOpenTriangleMesh (f, "0", &m);
H5FedSetLevel (m, 0);
......
......@@ -6,7 +6,10 @@ Inform *gmsg;
int run_opal(char *arg[], std::string inputfile, int restartStep, MPI_Comm comm) {
MPI_Barrier(comm);
int narg = 5, remove = 1;
if(!ippl)
ippl = new Ippl(narg, arg, remove, comm);
//Ippl *aippl = new Ippl(narg, arg, remove, comm);
......
......@@ -6,7 +6,6 @@
#include "AbstractObjects/OpalData.h"
#include "OpalConfigure/Configure.h"
#include "FixedAlgebra/FTps.h"
#include "OpalParser/OpalParser.h"
#include "Parser/FileStream.h"
#include "Parser/TerminalStream.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment