Commit b5a21907 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

New i/o infrastructure now also for serial writes

parent a0410438
......@@ -2676,8 +2676,9 @@ void engine_dump_snapshot(struct engine *e) {
e->snapshotUnits, e->nodeID, e->nr_nodes,
MPI_COMM_WORLD, MPI_INFO_NULL);
#else
write_output_serial(e, e->snapshotBaseName, e->snapshotUnits, e->nodeID,
e->nr_nodes, MPI_COMM_WORLD, MPI_INFO_NULL);
write_output_serial(e, e->snapshotBaseName, e->internalUnits,
e->snapshotUnits, e->nodeID, e->nr_nodes, MPI_COMM_WORLD,
MPI_INFO_NULL);
#endif
#else
write_output_single(e, e->snapshotBaseName, e->internalUnits,
......
......@@ -65,8 +65,9 @@
*
* Calls #error() if an error occurs.
*/
void readArray(hid_t grp, const struct io_props prop, int N, long long N_total,
long long offset, const struct UnitSystem* internal_units,
void readArray(hid_t grp, const struct io_props prop, size_t N,
long long N_total, long long offset,
const struct UnitSystem* internal_units,
const struct UnitSystem* ic_units) {
const size_t typeSize = sizeOfType(prop.type);
......@@ -334,8 +335,11 @@ void writeArray(hid_t grp, char* fileName, FILE* xmfFile,
* @param N (output) The number of particles read from the file.
* @param periodic (output) 1 if the volume is periodic, 0 if not.
* @param flag_entropy (output) 1 if the ICs contained Entropy in the
* InternalEnergy
* field
* InternalEnergy field
* @param mpi_rank The MPI rank of this node
* @param mpi_size The number of MPI ranks
* @param comm The MPI communicator
* @param info The MPI information object
* @param dry_run If 1, don't read the particle. Only allocates the arrays.
*
* Opens the HDF5 file fileName and reads the particles contained
......
This diff is collapsed.
......@@ -34,14 +34,16 @@
#if defined(HAVE_HDF5) && defined(WITH_MPI) && !defined(HAVE_PARALLEL_HDF5)
void read_ic_serial(char* fileName, double dim[3], struct part** parts,
struct gpart** gparts, size_t* Ngas, size_t* Ngparts,
int* periodic, int* flag_entropy, int mpi_rank,
int mpi_size, MPI_Comm comm, MPI_Info info, int dry_run);
void read_ic_serial(char* fileName, const struct UnitSystem* internal_units,
double dim[3], struct part** parts, struct gpart** gparts,
size_t* Ngas, size_t* Ngparts, int* periodic,
int* flag_entropy, int mpi_rank, int mpi_size,
MPI_Comm comm, MPI_Info info, int dry_run);
void write_output_serial(struct engine* e, const char* baseName,
struct UnitSystem* us, int mpi_rank, int mpi_size,
MPI_Comm comm, MPI_Info info);
const struct UnitSystem* internal_units,
const struct UnitSystem* snapshot_units, int mpi_rank,
int mpi_size, MPI_Comm comm, MPI_Info info);
#endif
......
Supports Markdown
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