Example #1
0
bool seissol::checkpoint::mpio::Wavefield::init(real* dofs, unsigned int numDofs)
{
	seissol::checkpoint::Wavefield::init(dofs, numDofs);

	// Create the header data type
	MPI_Datatype headerType;
	int blockLength[] = {1, 1, 1, 1};
	MPI_Aint displ[] = {offsetof(Header, identifier), offsetof(Header, partitions),
			offsetof(Header, time), offsetof(Header, timestepWavefield)};
	MPI_Datatype types[] = {MPI_UNSIGNED_LONG, MPI_INT, MPI_DOUBLE, MPI_INT};
	MPI_Type_create_struct(4, blockLength, displ, types, &headerType);
	setHeaderType(headerType);

	// Define the file view
	defineFileView(sizeof(Header), numDofs);

	return exists();
}
Example #2
0
bool seissol::checkpoint::mpio::Wavefield::init(size_t headerSize, unsigned long numDofs, unsigned int groupSize)
{
	seissol::checkpoint::Wavefield::init(headerSize, numDofs, groupSize);

	// Create the header data type
	// We cannot use header since this will be called on I/O nodes as well
	MPI_Datatype headerType;
	MPI_Type_contiguous(headerSize, MPI_BYTE, &headerType);
	setHeaderType(headerType);

	// Define the file view
	defineFileView(headerSize, sizeof(real), numDofs);

	// Large buffers are supported?
	m_useLargeBuffer = utils::Env::get<int>("SEISSOL_CHECKPOINT_MPIO_LARGE_BUFFER", 1) != 0;

	return exists();
}