diff --git a/src/field_descriptor.cpp b/src/field_descriptor.cpp index 65e65b5571a433bfb982e9e9e3b5e2a42c32ecca..ca29cb9ca6f43473ff3e551f4bf50986f953595e 100644 --- a/src/field_descriptor.cpp +++ b/src/field_descriptor.cpp @@ -235,6 +235,7 @@ int field_descriptor<rnumber>::read( else if (sizeof(rnumber)==8) ttype = MPI_DOUBLE_COMPLEX; DEBUG_MSG("aloha 00\n"); + char representation[] = "native"; if (this->subsizes[0] > 0) { MPI_Info info; @@ -259,7 +260,7 @@ int field_descriptor<rnumber>::read( 0, MPI_UNSIGNED_CHAR, this->mpi_array_dtype, - "native", + representation, info); MPI_File_read_all( f, @@ -282,6 +283,7 @@ int field_descriptor<rnumber>::write( ttype = MPI_COMPLEX; else if (sizeof(rnumber)==8) ttype = MPI_DOUBLE_COMPLEX; + char representation[] = "native"; if (this->subsizes[0] > 0) { MPI_Info info; @@ -304,7 +306,7 @@ int field_descriptor<rnumber>::write( 0, MPI_UNSIGNED_CHAR, this->mpi_array_dtype, - "native", + representation, info); MPI_File_write_all( f, diff --git a/src/fluid_solver.cpp b/src/fluid_solver.cpp index 075ba6165c17966ec036045554d9b7e1af09afeb..a9f201d9db639e917a1fe2e9fc41d56b461af62f 100644 --- a/src/fluid_solver.cpp +++ b/src/fluid_solver.cpp @@ -417,10 +417,7 @@ int fluid_solver<R>::read(char field, char representation) \ this->fill_up_filename("cvorticity", fname); \ read_result = this->cd->read(fname, (void*)this->cvorticity); \ if (read_result != EXIT_SUCCESS) \ - { \ - DEBUG_MSG("read error"); \ return read_result; \ - } \ } \ if (representation == 'r') \ { \ @@ -455,16 +452,21 @@ int fluid_solver<R>::write(char field, char representation) \ { \ FFTW(execute)(*((FFTW(plan)*)this->c2r_vorticity )); \ clip_zero_padding<R>(this->rd, this->rvorticity, 3); \ - return this->write_base("rvorticity", this->rvorticity); \ + this->fill_up_filename("rvorticity", fname); \ + return this->rd->write(fname, this->rvorticity); \ } \ this->compute_velocity(this->cvorticity); \ if ((field == 'u') && (representation == 'c')) \ - return this->write_base("cvelocity", this->cvelocity); \ + { \ + this->fill_up_filename("cvelocity", fname); \ + return this->cd->write(fname, this->cvelocity); \ + } \ if ((field == 'u') && (representation == 'r')) \ { \ this->ift_velocity(); \ clip_zero_padding<R>(this->rd, this->rvelocity, 3); \ - return this->write_base("rvelocity", this->rvelocity); \ + this->fill_up_filename("rvelocity", fname); \ + return this->rd->write(fname, this->rvelocity); \ } \ return EXIT_FAILURE; \ }