scrimppp/src/biniobase.cpp
// I/O methods. Using raw pointers to maintain flexibility regarding the actual type (aligned vector, general vector, array...) without neessity for templating
// read a subsequence from the file, collective operation of all processes within the communicator. Though every proc may specify a custom slice offset and length (and buffer accordingly)
I/O methods. Using raw pointers to maintain flexibility regarding the actual type (aligned vector, general vector, array...) without neessity for templating
read a subsequence from the file, collective operation of all processes within the communicator. Though every proc may specify a custom slice offset and length (and buffer accordingly)
I / O methods . Using raw pointers to maintain flexibility regarding the actual type ( aligned vector general vector array ... ) without neessity for templating read a subsequence from the file collective operation of all processes within the communicator . Though every proc may specify a custom slice offset and length ( and buffer accordingly )
void BinIOBase::write_series_slice(const void * const slicebuffer, int total_ts_length, const int slicelen, const int sliceoffset, const MPI_Datatype etype, const bool write_header) {
	    MPI_Datatype filetype;
		assert(total_ts_length > 0);
		if (_file_handle==MPI_FILE_NULL or !(_access_mode==WRITE || _access_mode==FULL)) {
			    open_write();
		}
		BinIOBase::write_header(total_ts_length, write_header);
		EXEC_DEBUG("Writing to file view");
		MPI_Type_create_subarray(1, &total_ts_length, &slicelen, &sliceoffset, MPI_ORDER_C, etype, &filetype);
		MPI_Type_commit(&filetype);
		MPI_File_set_view(_file_handle, _header_size, etype, filetype, _mpi_file_representation, MPI_INFO_NULL );
		MPI_File_write_all(_file_handle, slicebuffer, slicelen, etype, MPI_STATUS_IGNORE);
		MPI_Type_free(&filetype);
}
void BinIOBase :: write_series_slice ( const void * const slicebuffer , int total_ts_length , const int slicelen , const int sliceoffset , const MPI_Datatype etype , const bool write_header ) { MPI_Datatype filetype ; assert ( total_ts_length > 0 ) ; if ( _file_handle == MPI_FILE_NULL or ! ( _access_mode == WRITE || _access_mode == FULL ) ) { open_write ( ) ; } BinIOBase :: write_header ( total_ts_length , write_header ) ; EXEC_DEBUG ( " " ) ; MPI_Type_create_subarray ( 1 , & total_ts_length , & slicelen , & sliceoffset , MPI_ORDER_C , etype , & filetype ) ; MPI_Type_commit ( & filetype ) ; MPI_File_set_view ( _file_handle , _header_size , etype , filetype , _mpi_file_representation , MPI_INFO_NULL ) ; MPI_File_write_all ( _file_handle , slicebuffer , slicelen , etype , MPI_STATUS_IGNORE ) ; MPI_Type_free ( & filetype ) ; }
I/O methods.
I / O methods .
// make sure the file is opened /*
 * actually causing a deadlock, if more than 1 process is used in distributed I/O, therefore removed
#ifndef NDEBUG
		EXEC_INFO("Checking written header...")
		read_header_and_check_fmt();
		EXEC_DEBUG("Validated written header!");
#endif
*/