Skip to content
GitLab
Explore
Sign in
Commits on Source (5)
Fix copydoc target
· b952cbaa
Sophie Wenzel-Teuber
authored
Oct 09, 2019
b952cbaa
Change filename of MPI_io_driver to IO_driver_mpi
· 4d7b517d
Sophie Wenzel-Teuber
authored
Oct 09, 2019
4d7b517d
Rename class MPI_io_driver to IO_driver_mpi
· fb906f3d
Sophie Wenzel-Teuber
authored
Oct 09, 2019
fb906f3d
Rename file MPI_Distributed_vector.hh to Distributed_vector_mpi.hh
· c55e570e
Sophie Wenzel-Teuber
authored
Oct 09, 2019
c55e570e
Rename class MPI_Distributed_vector to Distributed_vector_mpi
· ebfe9044
Sophie Wenzel-Teuber
authored
Oct 09, 2019
ebfe9044
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
ebfe9044
...
...
@@ -159,7 +159,7 @@ add_library(
src/exseisdat/piol/file/object/ReadSEGYModel.cc
src/exseisdat/piol/file/Output_file.cc
src/exseisdat/piol/file/Output_file_segy.cc
src/exseisdat/piol/io_driver/
MPI_io
_driver.cc
src/exseisdat/piol/io_driver/
IO
_driver
_mpi
.cc
src/exseisdat/piol/metadata/rules/Rule.cc
src/exseisdat/piol/metadata/Trace_metadata.cc
src/exseisdat/piol/operations/gather.cc
...
...
include/exseisdat/piol.h
View file @
ebfe9044
...
...
@@ -43,10 +43,10 @@ typedef Rule piol_file_rule;
/// @copydoc exseis::piol::metadata::Trace_metadata
typedef
Trace_metadata
piol_file_trace_metadata
;
/// @copydoc exseis::piol::file::Input_file
_interface
/// @copydoc exseis::piol::file::Input_file
typedef
Input_file
piol_file_read_interface
;
/// @copydoc exseis::piol::file::Output_file
_interface
/// @copydoc exseis::piol::file::Output_file
typedef
Output_file
piol_file_write_interface
;
#else // __cplusplus
...
...
@@ -62,10 +62,10 @@ typedef struct piol_file_rule piol_file_rule;
/// @copydoc piol::metadata::Trace_metadata
typedef
struct
piol_file_trace_metadata
piol_file_trace_metadata
;
/// @copydoc piol::file::input_file::Input_file
_interface
/// @copydoc piol::file::input_file::Input_file
typedef
struct
piol_file_read_interface
piol_file_read_interface
;
/// @copydoc piol::file::output_file::Output_file
_interface
/// @copydoc piol::file::output_file::Output_file
typedef
struct
piol_file_write_interface
piol_file_write_interface
;
#endif // __cplusplus
...
...
include/exseisdat/piol.hh
View file @
ebfe9044
...
...
@@ -16,7 +16,7 @@
#include
"exseisdat/piol/file/object/ObjectSEGY.hh"
#include
"exseisdat/piol/file/object/ReadSEGYModel.hh"
#include
"exseisdat/piol/io_driver/IO_driver.hh"
#include
"exseisdat/piol/io_driver/
MPI_io
_driver.hh"
#include
"exseisdat/piol/io_driver/
IO
_driver
_mpi
.hh"
#include
"exseisdat/piol/makeFile.hh"
#include
"exseisdat/piol/metadata/Trace_metadata.hh"
#include
"exseisdat/piol/metadata/Trace_metadata_key.hh"
...
...
include/exseisdat/piol/file/object/ObjectInterface.hh
View file @
ebfe9044
...
...
@@ -8,7 +8,7 @@
#define EXSEISDAT_PIOL_FILE_OBJECT_OBJECTINTERFACE_HH
#include
"exseisdat/piol/configuration/ExSeisPIOL.hh"
#include
"exseisdat/piol/io_driver/
MPI_io
_driver.hh"
#include
"exseisdat/piol/io_driver/
IO
_driver
_mpi
.hh"
#include
"exseisdat/utils/types/typedefs.hh"
namespace
exseis
{
...
...
include/exseisdat/piol/io_driver/
MPI_io
_driver.hh
→
include/exseisdat/piol/io_driver/
IO
_driver
_mpi
.hh
View file @
ebfe9044
...
...
@@ -3,8 +3,8 @@
/// @brief The specfic MPI implementation of the Data layer interface
/// @details MPI implementation of data layer features such as reading.
////////////////////////////////////////////////////////////////////////////////
#ifndef EXSEISDAT_PIOL_IO_DRIVER_
MPI_
IO_DRIVER_HH
#define EXSEISDAT_PIOL_IO_DRIVER_
MPI_
IO_DRIVER_HH
#ifndef EXSEISDAT_PIOL_IO_DRIVER_IO_DRIVER_
MPI_
HH
#define EXSEISDAT_PIOL_IO_DRIVER_IO_DRIVER_
MPI_
HH
#include
"exseisdat/piol/io_driver/IO_driver.hh"
#include
"exseisdat/utils/mpi_utils/MPI_max_array_length.hh"
...
...
@@ -30,7 +30,7 @@ enum FileMode : int {
/// @brief The MPI-IO Data class.
///
class
MPI_io
_driver
:
public
IO_driver
{
class
IO
_driver
_mpi
:
public
IO_driver
{
public:
/// @brief The MPI-IO options structure.
///
...
...
@@ -38,7 +38,7 @@ class MPI_io_driver : public IO_driver {
///
struct
Opt
{
/// @brief The Type of the class this structure is nested in
typedef
MPI_io
_driver
Type
;
typedef
IO
_driver
_mpi
Type
;
/// @brief Whether collective read/write operations will be used.
///
...
...
@@ -88,19 +88,19 @@ class MPI_io_driver : public IO_driver {
/// Store the file name for debugging purposes.
std
::
string
m_file_name
;
/// @copydoc
MPI_io
_driver::Opt::use_collective_operations
/// @copydoc
IO
_driver
_mpi
::Opt::use_collective_operations
bool
m_use_collective_operations
;
/// The MPI-IO file handle
MPI_File
m_file
=
MPI_FILE_NULL
;
/// @copydoc
MPI_io
_driver::Opt::file_communicator
/// @copydoc
IO
_driver
_mpi
::Opt::file_communicator
MPI_Comm
m_file_communicator
;
/// @copydoc
MPI_io
_driver::Opt::info
/// @copydoc
IO
_driver
_mpi
::Opt::info
MPI_Info
m_info
;
/// @copydoc
MPI_io
_driver::Opt::max_size
/// @copydoc
IO
_driver
_mpi
::Opt::max_size
size_t
m_max_size
;
public
:
...
...
@@ -112,11 +112,11 @@ class MPI_io_driver : public IO_driver {
/// etc.
/// @param[in] opt The MPI-IO options
///
MPI_io
_driver
(
IO
_driver
_mpi
(
std
::
shared_ptr
<
ExSeisPIOL
>
piol
,
std
::
string
file_name
,
FileMode
mode
,
const
MPI_io
_driver
::
Opt
&
opt
=
MPI_io
_driver
::
Opt
());
const
IO
_driver
_mpi
::
Opt
&
opt
=
IO
_driver
_mpi
::
Opt
());
/// @brief The MPI-IO class constructor.
///
...
...
@@ -126,31 +126,31 @@ class MPI_io_driver : public IO_driver {
/// etc.
/// @param[in] opt The MPI-IO options
///
MPI_io
_driver
(
IO
_driver
_mpi
(
std
::
shared_ptr
<
exseis
::
utils
::
Log
>
log
,
std
::
string
file_name
,
FileMode
mode
,
const
MPI_io
_driver
::
Opt
&
opt
=
MPI_io
_driver
::
Opt
());
const
IO
_driver
_mpi
::
Opt
&
opt
=
IO
_driver
_mpi
::
Opt
());
/// @brief Explicit destructor, closes file and frees info
void
close
();
/// @brief Destructor.
~
MPI_io
_driver
();
~
IO
_driver
_mpi
();
/// @name @special_member_functions
/// @{
/// @copy_constructor{delete}
MPI_io
_driver
(
const
MPI_io
_driver
&
)
=
delete
;
IO
_driver
_mpi
(
const
IO
_driver
_mpi
&
)
=
delete
;
/// @copy_assignment{delete}
MPI_io
_driver
&
operator
=
(
const
MPI_io
_driver
&
)
=
delete
;
IO
_driver
_mpi
&
operator
=
(
const
IO
_driver
_mpi
&
)
=
delete
;
/// @move_constructor{delete}
MPI_io
_driver
(
MPI_io
_driver
&&
)
=
delete
;
IO
_driver
_mpi
(
IO
_driver
_mpi
&&
)
=
delete
;
/// @move_assignment{delete}
MPI_io
_driver
&
operator
=
(
MPI_io
_driver
&&
)
=
delete
;
IO
_driver
_mpi
&
operator
=
(
IO
_driver
_mpi
&&
)
=
delete
;
/// @}
...
...
@@ -278,4 +278,4 @@ class MPI_io_driver : public IO_driver {
}
// namespace piol
}
// namespace exseis
#endif // EXSEISDAT_PIOL_IO_DRIVER_
MPI_
IO_DRIVER_HH
#endif // EXSEISDAT_PIOL_IO_DRIVER_IO_DRIVER_
MPI_
HH
include/exseisdat/utils/distributed_vector/
MPI_
Distributed_vector.hh
→
include/exseisdat/utils/distributed_vector/Distributed_vector
_mpi
.hh
View file @
ebfe9044
/// @file
/// @brief The
MPI_
Distributed_vector class, an MPI implementation of
/// @brief The Distributed_vector
_mpi
class, an MPI implementation of
/// Distributed_vector.
#ifndef EXSEISDAT_UTILS_DISTRIBUTED_VECTOR_
MPI_
DISTRIBUTED_VECTOR_HH
#define EXSEISDAT_UTILS_DISTRIBUTED_VECTOR_
MPI_
DISTRIBUTED_VECTOR_HH
#ifndef EXSEISDAT_UTILS_DISTRIBUTED_VECTOR_DISTRIBUTED_VECTOR_
MPI_
HH
#define EXSEISDAT_UTILS_DISTRIBUTED_VECTOR_DISTRIBUTED_VECTOR_
MPI_
HH
#include
"exseisdat/utils/decomposition/block_decomposition.hh"
#include
"exseisdat/utils/distributed_vector/Distributed_vector.hh"
...
...
@@ -16,7 +16,7 @@ inline namespace distributed_vector {
/// @brief An MPI implementation of Distributed_vector
template
<
typename
T
>
class
MPI_
Distributed_vector
:
public
Distributed_vector
<
T
>
{
class
Distributed_vector
_mpi
:
public
Distributed_vector
<
T
>
{
// Ensure T is trivially copyable, because we'll be passing it around
// bitwise over MPI.
...
...
@@ -25,7 +25,7 @@ class MPI_Distributed_vector : public Distributed_vector<T> {
"Template parameter, T, is not trivially copyable!"
);
protected:
/// @brief The internal implementation of
MPI_
Distributed_vector.
/// @brief The internal implementation of Distributed_vector
_mpi
.
class
Model
final
:
public
Distributed_vector
<
T
>::
Concept
{
public:
/// @brief The MPI window handle.
...
...
@@ -40,7 +40,7 @@ class MPI_Distributed_vector : public Distributed_vector<T> {
/// @brief The global size of the array.
size_t
global_size
=
0
;
/// @copydoc
MPI_
Distributed_vector
::MPI_
Distributed_vector
/// @copydoc Distributed_vector
_mpi::
Distributed_vector
_mpi
Model
(
MPI_Aint
global_size
,
MPI_Comm
comm
);
~
Model
()
override
;
...
...
@@ -66,12 +66,12 @@ class MPI_Distributed_vector : public Distributed_vector<T> {
/// @param[in] global_size The number of elements in the global array.
/// @param[in] comm The communicator to distribute the array over.
///
MPI_
Distributed_vector
(
size_t
global_size
,
MPI_Comm
comm
);
Distributed_vector
_mpi
(
size_t
global_size
,
MPI_Comm
comm
);
};
template
<
typename
T
>
MPI_
Distributed_vector
<
T
>::
MPI_
Distributed_vector
(
Distributed_vector
_mpi
<
T
>::
Distributed_vector
_mpi
(
size_t
global_size
,
MPI_Comm
comm
)
:
Distributed_vector
<
T
>
(
std
::
make_unique
<
Model
>
(
global_size
,
comm
))
{
...
...
@@ -79,13 +79,13 @@ MPI_Distributed_vector<T>::MPI_Distributed_vector(
template
<
typename
T
>
MPI_
Distributed_vector
<
T
>::
Model
::
Model
(
MPI_Aint
global_size
,
MPI_Comm
comm
)
:
Distributed_vector
_mpi
<
T
>::
Model
::
Model
(
MPI_Aint
global_size
,
MPI_Comm
comm
)
:
comm
(
comm
),
global_size
(
static_cast
<
size_t
>
(
global_size
))
{
assert
(
global_size
>=
0
&&
"
MPI_
Distributed_vector::Model::Model global_size_ should be >= 0."
);
&&
"Distributed_vector
_mpi
::Model::Model global_size_ should be >= 0."
);
int
rank
=
0
;
int
num_ranks
=
0
;
...
...
@@ -111,14 +111,14 @@ MPI_Distributed_vector<T>::Model::Model(MPI_Aint global_size, MPI_Comm comm) :
}
template
<
typename
T
>
MPI_
Distributed_vector
<
T
>::
Model
::~
Model
()
Distributed_vector
_mpi
<
T
>::
Model
::~
Model
()
{
MPI_Win_free
(
&
win
);
}
template
<
typename
T
>
void
MPI_
Distributed_vector
<
T
>::
Model
::
set
(
size_t
i
,
const
T
&
val
)
void
Distributed_vector
_mpi
<
T
>::
Model
::
set
(
size_t
i
,
const
T
&
val
)
{
if
(
i
>
global_size
)
{
return
;
...
...
@@ -162,7 +162,7 @@ void MPI_Distributed_vector<T>::Model::set(size_t i, const T& val)
}
template
<
typename
T
>
T
MPI_
Distributed_vector
<
T
>::
Model
::
get
(
size_t
i
)
const
T
Distributed_vector
_mpi
<
T
>::
Model
::
get
(
size_t
i
)
const
{
if
(
i
>
global_size
)
{
return
T
();
...
...
@@ -209,7 +209,7 @@ T MPI_Distributed_vector<T>::Model::get(size_t i) const
template
<
typename
T
>
size_t
MPI_
Distributed_vector
<
T
>::
Model
::
size
()
const
size_t
Distributed_vector
_mpi
<
T
>::
Model
::
size
()
const
{
return
global_size
;
}
...
...
@@ -218,4 +218,4 @@ size_t MPI_Distributed_vector<T>::Model::size() const
}
// namespace utils
}
// namespace exseis
#endif // EXSEISDAT_UTILS_DISTRIBUTED_VECTOR_
MPI_
DISTRIBUTED_VECTOR_HH
#endif // EXSEISDAT_UTILS_DISTRIBUTED_VECTOR_DISTRIBUTED_VECTOR_
MPI_
HH
src/exseisdat/piol/file/Input_file_segy.cc
View file @
ebfe9044
...
...
@@ -10,7 +10,7 @@
#include
"exseisdat/piol/file/Input_file_segy.hh"
#include
"exseisdat/piol/file/object/ObjectSEGY.hh"
#include
"exseisdat/piol/io_driver/
MPI_io
_driver.hh"
#include
"exseisdat/piol/io_driver/
IO
_driver
_mpi
.hh"
#include
"exseisdat/piol/operations/sort_operations/sort.hh"
#include
"exseisdat/piol/segy/utils.hh"
...
...
@@ -39,7 +39,7 @@ Input_file_segy::Input_file_segy(
std
::
make_shared
<
ObjectSEGY
>
(
piol
,
name
,
std
::
make_shared
<
MPI_io
_driver
>
(
piol
,
name
,
FileMode
::
Read
)))
std
::
make_shared
<
IO
_driver
_mpi
>
(
piol
,
name
,
FileMode
::
Read
)))
{
}
...
...
src/exseisdat/piol/file/Output_file_segy.cc
View file @
ebfe9044
...
...
@@ -10,7 +10,7 @@
#include
"exseisdat/piol/file/Output_file_segy.hh"
#include
"exseisdat/piol/file/object/ObjectSEGY.hh"
#include
"exseisdat/piol/io_driver/
MPI_io
_driver.hh"
#include
"exseisdat/piol/io_driver/
IO
_driver
_mpi
.hh"
#include
"exseisdat/piol/segy/utils.hh"
#include
"exseisdat/utils/encoding/number_encoding.hh"
...
...
@@ -38,7 +38,7 @@ Output_file_segy::Output_file_segy(
std
::
make_shared
<
ObjectSEGY
>
(
piol
,
name
,
std
::
make_shared
<
MPI_io
_driver
>
(
piol
,
name
,
FileMode
::
Write
)))
std
::
make_shared
<
IO
_driver
_mpi
>
(
piol
,
name
,
FileMode
::
Write
)))
{
}
...
...
src/exseisdat/piol/file/object/ObjectSEGY.cc
View file @
ebfe9044
...
...
@@ -7,7 +7,7 @@
#include
"exseisdat/piol/configuration/ExSeisPIOL.hh"
#include
"exseisdat/piol/file/object/ObjectSEGY.hh"
#include
"exseisdat/piol/io_driver/IO_driver.hh"
#include
"exseisdat/piol/io_driver/
MPI_io
_driver.hh"
#include
"exseisdat/piol/io_driver/
IO
_driver
_mpi
.hh"
#include
"exseisdat/piol/segy/utils.hh"
namespace
exseis
{
...
...
src/exseisdat/piol/io_driver/
MPI_io
_driver.cc
→
src/exseisdat/piol/io_driver/
IO
_driver
_mpi
.cc
View file @
ebfe9044
...
...
@@ -5,7 +5,7 @@
#include
"exseisdat/piol/configuration/ExSeisPIOL.hh"
#include
"exseisdat/piol/io_driver/
MPI_io
_driver.hh"
#include
"exseisdat/piol/io_driver/
IO
_driver
_mpi
.hh"
#include
"exseisdat/utils/mpi_utils/MPI_error_to_string.hh"
#include
"exseisdat/utils/mpi_utils/MPI_max_array_length.hh"
#include
"exseisdat/utils/types/MPI_type.hh"
...
...
@@ -194,7 +194,7 @@ bool default_collectiveness()
}
// namespace
MPI_io
_driver
::
Opt
::
Opt
()
:
use_collective_operations
(
default_collectiveness
())
IO
_driver
_mpi
::
Opt
::
Opt
()
:
use_collective_operations
(
default_collectiveness
())
{
MPI_Info_create
(
&
info
);
// MPI_Info_set(info, "access_style", "read_once");
...
...
@@ -216,33 +216,33 @@ MPI_io_driver::Opt::Opt() : use_collective_operations(default_collectiveness())
// MPI_Info_set(info, "panfs_concurrent_write", "false");
}
void
MPI_io
_driver
::
Opt
::
free
()
void
IO
_driver
_mpi
::
Opt
::
free
()
{
if
(
info
!=
MPI_INFO_NULL
)
{
MPI_Info_free
(
&
info
);
}
}
MPI_io
_driver
::
Opt
::~
Opt
()
IO
_driver
_mpi
::
Opt
::~
Opt
()
{
free
();
}
MPI_io
_driver
::
MPI_io
_driver
(
IO
_driver
_mpi
::
IO
_driver
_mpi
(
std
::
shared_ptr
<
ExSeisPIOL
>
piol
,
std
::
string
file_name
,
FileMode
mode
,
const
MPI_io
_driver
::
Opt
&
opt
)
:
MPI_io
_driver
(
piol
->
log
,
file_name
,
mode
,
opt
)
const
IO
_driver
_mpi
::
Opt
&
opt
)
:
IO
_driver
_mpi
(
piol
->
log
,
file_name
,
mode
,
opt
)
{
}
MPI_io
_driver
::
MPI_io
_driver
(
IO
_driver
_mpi
::
IO
_driver
_mpi
(
std
::
shared_ptr
<
exseis
::
utils
::
Log
>
log
,
std
::
string
file_name
,
FileMode
mode
,
const
MPI_io
_driver
::
Opt
&
opt
)
:
const
IO
_driver
_mpi
::
Opt
&
opt
)
:
m_log
(
log
),
m_file_name
(
file_name
),
m_use_collective_operations
(
opt
.
use_collective_operations
),
...
...
@@ -297,7 +297,7 @@ MPI_io_driver::MPI_io_driver(
}
}
void
MPI_io
_driver
::
close
()
void
IO
_driver
_mpi
::
close
()
{
static
const
char
*
function_name
=
"exseis::piol::mpi::MPI_Binary_file::close"
;
...
...
@@ -321,18 +321,18 @@ void MPI_io_driver::close()
}
}
MPI_io
_driver
::~
MPI_io
_driver
()
IO
_driver
_mpi
::~
IO
_driver
_mpi
()
{
close
();
}
bool
MPI_io
_driver
::
is_open
()
const
bool
IO
_driver
_mpi
::
is_open
()
const
{
return
m_file
==
MPI_FILE_NULL
;
}
size_t
MPI_io
_driver
::
get_file_size
()
const
size_t
IO
_driver
_mpi
::
get_file_size
()
const
{
static
const
char
*
function_name
=
"exseis::piol::mpi::MPI_Binary_file::get_file_size"
;
...
...
@@ -357,7 +357,7 @@ size_t MPI_io_driver::get_file_size() const
return
static_cast
<
size_t
>
(
max_fsz
);
}
void
MPI_io
_driver
::
set_file_size
(
size_t
sz
)
const
void
IO
_driver
_mpi
::
set_file_size
(
size_t
sz
)
const
{
static
const
char
*
function_name
=
"exseis::piol::mpi::MPI_Binary_file::set_file_size"
;
...
...
@@ -439,7 +439,7 @@ void read_write_impl(
}
// namespace
void
MPI_io
_driver
::
read
(
size_t
offset
,
size_t
size
,
void
*
buffer
)
const
void
IO
_driver
_mpi
::
read
(
size_t
offset
,
size_t
size
,
void
*
buffer
)
const
{
static
const
char
*
function_name
=
"exseis::piol::mpi::MPI_Binary_file::read"
;
...
...
@@ -452,7 +452,7 @@ void MPI_io_driver::read(size_t offset, size_t size, void* buffer) const
m_file_communicator
,
m_file
,
m_log
,
m_file_name
,
function_name
);
}
void
MPI_io
_driver
::
write
(
size_t
offset
,
size_t
size
,
const
void
*
buffer
)
const
void
IO
_driver
_mpi
::
write
(
size_t
offset
,
size_t
size
,
const
void
*
buffer
)
const
{
static
const
char
*
function_name
=
"exseis::piol::mpi::MPI_Binary_file::write"
;
...
...
@@ -613,7 +613,7 @@ void read_write_noncontiguous_impl(
}
// namespace
void
MPI_io
_driver
::
read_noncontiguous
(
void
IO
_driver
_mpi
::
read_noncontiguous
(
size_t
offset
,
size_t
block_size
,
size_t
stride_size
,
...
...
@@ -632,7 +632,7 @@ void MPI_io_driver::read_noncontiguous(
function_name
);
}
void
MPI_io
_driver
::
write_noncontiguous
(
void
IO
_driver
_mpi
::
write_noncontiguous
(
size_t
offset
,
size_t
block_size
,
size_t
stride_size
,
...
...
@@ -831,7 +831,7 @@ void read_write_noncontiguous_irregular_impl(
}
// namespace
void
MPI_io
_driver
::
read_noncontiguous_irregular
(
void
IO
_driver
_mpi
::
read_noncontiguous_irregular
(
size_t
block_size
,
size_t
number_of_blocks
,
const
size_t
*
offsets
,
...
...
@@ -848,7 +848,7 @@ void MPI_io_driver::read_noncontiguous_irregular(
m_file_communicator
,
m_file
,
m_info
,
m_log
,
m_file_name
,
function_name
);
}
void
MPI_io
_driver
::
write_noncontiguous_irregular
(
void
IO
_driver
_mpi
::
write_noncontiguous_irregular
(
size_t
block_size
,
size_t
number_of_blocks
,
const
size_t
*
offsets
,
...
...
src/exseisdat/piol/operations/gather.cc
View file @
ebfe9044
...
...
@@ -8,7 +8,7 @@
#include
"exseisdat/piol/operations/gather.hh"
#include
"exseisdat/utils/decomposition/block_decomposition.hh"
#include
"exseisdat/utils/distributed_vector/
MPI_
Distributed_vector.hh"
#include
"exseisdat/utils/distributed_vector/Distributed_vector
_mpi
.hh"
namespace
exseis
{
namespace
piol
{
...
...
@@ -76,7 +76,7 @@ static utils::Distributed_vector<Gather_info> get_gathers(
size_t
sz
=
lline
.
size
()
-
start
;
size_t
offset
=
piol
->
comm
->
offset
(
sz
);
utils
::
MPI_
Distributed_vector
<
Gather_info
>
line
(
utils
::
Distributed_vector
_mpi
<
Gather_info
>
line
(
piol
->
comm
->
sum
(
sz
),
piol
->
comm
->
get_comm
());
for
(
size_t
i
=
0
;
i
<
sz
;
i
++
)
{
...
...
test/spectests/datampiioread.cc
View file @
ebfe9044
...
...
@@ -42,10 +42,10 @@ class MPI_Binary_file_Read : public Test {
void
make_mpiio
(
std
::
string
filename
,
const
MPI_io
_driver
::
Opt
&
opt
=
MPI_io
_driver
::
Opt
())
const
IO
_driver
_mpi
::
Opt
&
opt
=
IO
_driver
_mpi
::
Opt
())
{
piol
=
exseis
::
piol
::
ExSeis
::
make
();
file
=
std
::
make_shared
<
MPI_io
_driver
>
(
file
=
std
::
make_shared
<
IO
_driver
_mpi
>
(
piol
,
filename
,
FileMode
::
Read
,
opt
);
}
};
...
...
@@ -68,7 +68,7 @@ TEST_F(MPI_Binary_file_Read, Constructor)
piol
->
log
->
process_entries
();
EXPECT_NE
(
nullptr
,
file
)
<<
"file is null"
;
auto
mio
=
std
::
dynamic_pointer_cast
<
MPI_io
_driver
>
(
file
);
auto
mio
=
std
::
dynamic_pointer_cast
<
IO
_driver
_mpi
>
(
file
);
EXPECT_NE
(
nullptr
,
mio
)
<<
"MPI-IO file cast failed"
;
EXPECT_FALSE
(
mio
->
is_open
())
<<
"File was not opened"
;
...
...
@@ -124,7 +124,7 @@ TEST_F(MPI_Binary_file_Read, ZeroSizeReadOnLarge)
TEST_F
(
MPI_Binary_file_Read
,
OffsetsBlockingReadLarge
)
{
MPI_io
_driver
::
Opt
opt
;
IO
_driver
_mpi
::
Opt
opt
;
opt
.
max_size
=
magic_num1
;
make_mpiio
(
plarge_file
(),
opt
);
...
...
test/spectests/datampiiotest.hh
View file @
ebfe9044
...
...
@@ -7,7 +7,7 @@
#include
"tglobal.hh"
#include
"exseisdat/piol/configuration/ExSeis.hh"
#include
"exseisdat/piol/io_driver/
MPI_io
_driver.hh"
#include
"exseisdat/piol/io_driver/
IO
_driver
_mpi
.hh"
#include
"exseisdat/piol/segy/utils.hh"
#include
"exseisdat/utils/encoding/number_encoding.hh"
...
...
@@ -32,14 +32,14 @@ class MPIIOTest : public Test {
template
<
bool
WRITE
=
false
>
void
make_mpiio
(
std
::
string
name
,
const
MPI_io
_driver
::
Opt
&
ioopt
=
MPI_io
_driver
::
Opt
())
const
IO
_driver
_mpi
::
Opt
&
ioopt
=
IO
_driver
_mpi
::
Opt
())
{
if
(
m_data
!=
nullptr
)
{
m_data
.
reset
();
}
FileMode
mode
=
(
WRITE
?
FileMode
::
ReadWrite
:
FileMode
::
Read
);
m_data
=
std
::
make_shared
<
MPI_io
_driver
>
(
m_piol
,
name
,
mode
,
ioopt
);
m_data
=
std
::
make_shared
<
IO
_driver
_mpi
>
(
m_piol
,
name
,
mode
,
ioopt
);
}
void
make_test_sz
(
size_t
sz
)
...
...
test/spectests/filesegytest.hh
View file @
ebfe9044
...
...
@@ -14,7 +14,7 @@
#include
"exseisdat/piol/file/Output_file.hh"
#include
"exseisdat/piol/file/Output_file_segy.hh"
#include
"exseisdat/piol/file/object/ObjectSEGY.hh"
#include
"exseisdat/piol/io_driver/
MPI_io
_driver.hh"
#include
"exseisdat/piol/io_driver/
IO
_driver
_mpi
.hh"
#include
"exseisdat/piol/segy/utils.hh"
#include
"exseisdat/utils/communicator/Communicator_mpi.hh"
#include
"exseisdat/utils/encoding/character_encoding.hh"
...
...
@@ -798,7 +798,7 @@ struct FileWriteSEGYTest : public Test {
std
::
vector
<
unsigned
char
>
ho
=
std
::
vector
<
unsigned
char
>
(
segy
::
segy_binary_file_header_size
());
std
::
unique_ptr
<
Output_file
>
file
=
nullptr
;
std
::
shared_ptr
<
MPI_io
_driver
>
output_binary_file
;
std
::
shared_ptr
<
IO
_driver
_mpi
>
output_binary_file
;
std
::
unique_ptr
<
Input_file
>
readfile
;
~
FileWriteSEGYTest
()
{
Mock
::
VerifyAndClearExpectations
(
&
mock_object
);
}
...
...
test/spectests/objsegytest.hh
View file @
ebfe9044
...
...
@@ -9,7 +9,7 @@
#include
"exseisdat/piol/configuration/ExSeis.hh"
#include
"exseisdat/piol/file/object/ObjectInterface.hh"
#include
"exseisdat/piol/file/object/ObjectSEGY.hh"
#include
"exseisdat/piol/io_driver/
MPI_io
_driver.hh"
#include
"exseisdat/piol/io_driver/
IO
_driver
_mpi
.hh"
#include
"exseisdat/piol/segy/utils.hh"
#include
"exseisdat/utils/communicator/Communicator_mpi.hh"
#include
"exseisdat/utils/types/typedefs.hh"
...
...
@@ -68,7 +68,7 @@ class ObjTest : public Test {
delete
m_obj
;
}
auto
data
=
std
::
make_shared
<
MPI_io
_driver
>
(
auto
data
=
std
::
make_shared
<
IO
_driver
_mpi
>
(
m_piol
,
name
,
(
WRITE
?
FileMode
::
ReadWrite
:
FileMode
::
Read
));
m_piol
->
assert_ok
();
m_obj
=
new
ObjectSEGY
(
m_piol
,
name
,
data
);
...
...
test/spectests/settest.hh
View file @
ebfe9044
...
...
@@ -11,7 +11,7 @@
#include
"exseisdat/piol/file/Input_file_segy.hh"
#include
"exseisdat/piol/file/Output_file_segy.hh"
#include
"exseisdat/piol/file/object/ObjectSEGY.hh"
#include
"exseisdat/piol/io_driver/
MPI_io
_driver.hh"
#include
"exseisdat/piol/io_driver/
IO
_driver
_mpi
.hh"
#include
"exseisdat/utils/decomposition/block_decomposition.hh"
#include
<numeric>
...
...
util/extract-metadata.main.cc
View file @
ebfe9044
...
...
@@ -43,7 +43,7 @@
#include
"exseisdat/piol/configuration/ExSeis.hh"
#include
"exseisdat/piol/file/Input_file_segy.hh"
#include
"exseisdat/piol/io_driver/
MPI_io
_driver.hh"
#include
"exseisdat/piol/io_driver/
IO
_driver
_mpi
.hh"
#include
"exseisdat/piol/metadata/Trace_metadata.hh"
#include
"exseisdat/piol/metadata/rules/Rule.hh"
#include
"exseisdat/utils/decomposition/block_decomposition.hh"
...
...
@@ -171,7 +171,7 @@ int main(int argc, char* argv[])
// output CSV file.
auto
piol
=
ExSeis
::
make
();
const
Input_file_segy
input_file
(
piol
,
input_filename
);
MPI_io
_driver
output_file
(
piol
,
output_filename
,
FileMode
::
Write
);
IO
_driver
_mpi
output_file
(
piol
,
output_filename
,
FileMode
::
Write
);
// Build the header for the CSV file in the form
...
...
util/makerep.cc
View file @
ebfe9044
#include
"sglobal.hh"
#include
"exseisdat/piol/configuration/ExSeis.hh"
#include
"exseisdat/piol/io_driver/
MPI_io
_driver.hh"
#include
"exseisdat/piol/io_driver/
IO
_driver
_mpi
.hh"
#include
"exseisdat/piol/segy/utils.hh"
#include
"exseisdat/utils/types/MPI_type.hh"
...
...
@@ -301,8 +301,8 @@ int main(int argc, char** argv)
size_t
num_rank
=
piol
->
get_num_rank
();
MPI_io
_driver
in
(
piol
,
iname
,
FileMode
::
Read
);
MPI_io
_driver
out
(
piol
,
oname
,
FileMode
::
Write
);
IO
_driver
_mpi
in
(
piol
,
iname
,
FileMode
::
Read
);
IO
_driver
_mpi
out
(
piol
,
oname
,
FileMode
::
Write
);
piol
->
assert_ok
();
const
size_t
fsz
=
in
.
get_file_size
();
...
...