Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
wrapper.hpp File Reference
#include "shambase/aliases_float.hpp"
#include "shambase/aliases_int.hpp"
#include "shamcomm/mpi.hpp"
#include <unordered_map>
#include <string>
#include <vector>
Include dependency graph for wrapper.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  shamcomm
 namespace for communication related stuff

Functions

void shamcomm::mpi::register_time (std::string timername, f64 time)
 Register a timer value.
f64 shamcomm::mpi::get_timer (std::string timername)
 get a timer value
const std::unordered_map< std::string, f64 > & shamcomm::mpi::get_timers ()
 return all internal timers
const std::vector< std::string > & shamcomm::mpi::get_possible_keys ()
 return all possible keys for the internal timers
void shamcomm::mpi::Allreduce (const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
 MPI wrapper for MPI_Allreduce.
void shamcomm::mpi::Allgather (const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm)
 MPI wrapper for MPI_Allgather.
void shamcomm::mpi::Allgatherv (const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int displs[], MPI_Datatype recvtype, MPI_Comm comm)
 MPI wrapper for MPI_Allgatherv.
void shamcomm::mpi::Isend (const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request)
 MPI wrapper for MPI_Isend.
void shamcomm::mpi::Irecv (void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Request *request)
 MPI wrapper for MPI_Irecv.
void shamcomm::mpi::Exscan (const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
 MPI wrapper for MPI_Exscan.
void shamcomm::mpi::Wait (MPI_Request *request, MPI_Status *status)
 MPI wrapper for MPI_Wait.
void shamcomm::mpi::Waitall (int count, MPI_Request array_of_requests[], MPI_Status *array_of_statuses)
 MPI wrapper for MPI_Waitall.
void shamcomm::mpi::Barrier (MPI_Comm comm)
 MPI wrapper for MPI_Barrier.
void shamcomm::mpi::Probe (int source, int tag, MPI_Comm comm, MPI_Status *status)
 MPI wrapper for MPI_Probe.
void shamcomm::mpi::Recv (void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Status *status)
 MPI wrapper for MPI_Recv.
void shamcomm::mpi::Get_count (const MPI_Status *status, MPI_Datatype datatype, int *count)
 MPI wrapper for MPI_Get_count.
void shamcomm::mpi::Send (const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm)
 MPI wrapper for MPI_Send.
void shamcomm::mpi::File_set_view (MPI_File fh, MPI_Offset disp, MPI_Datatype etype, MPI_Datatype filetype, const char *datarep, MPI_Info info)
 MPI wrapper for MPI_File_set_view.
void shamcomm::mpi::Type_size (MPI_Datatype type, int *size)
 MPI wrapper for MPI_Type_size.
void shamcomm::mpi::File_write_all (MPI_File fh, const void *buf, int count, MPI_Datatype datatype, MPI_Status *status)
 MPI wrapper for MPI_File_write_all.
void shamcomm::mpi::File_write (MPI_File fh, const void *buf, int count, MPI_Datatype datatype, MPI_Status *status)
 MPI wrapper for MPI_File_write.
void shamcomm::mpi::File_read (MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status)
 MPI wrapper for MPI_File_read.
void shamcomm::mpi::File_write_at (MPI_File fh, MPI_Offset offset, const void *buf, int count, MPI_Datatype datatype, MPI_Status *status)
 MPI wrapper for MPI_File_write_at.
void shamcomm::mpi::File_read_at (MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype, MPI_Status *status)
 MPI wrapper for MPI_File_read_at.
void shamcomm::mpi::File_close (MPI_File *fh)
 MPI wrapper for MPI_File_close.
void shamcomm::mpi::File_open (MPI_Comm comm, const char *filename, int amode, MPI_Info info, MPI_File *fh)
 MPI wrapper for MPI_File_open.
void shamcomm::mpi::Test (MPI_Request *request, int *flag, MPI_Status *status)
 MPI wrapper for MPI_Test.
void shamcomm::mpi::Gather (const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm)
 MPI wrapper for MPI_Gather.
void shamcomm::mpi::Gatherv (const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int displs[], MPI_Datatype recvtype, int root, MPI_Comm comm)
 MPI wrapper for MPI_Gatherv.

Detailed Description

Author
Timothée David–Cléris (tim.s.nosp@m.hamr.nosp@m.ock@p.nosp@m.roto.nosp@m.n.me)

Definition in file wrapper.hpp.

Function Documentation

◆ Allgather()

void shamcomm::mpi::Allgather ( const void * sendbuf,
int sendcount,
MPI_Datatype sendtype,
void * recvbuf,
int recvcount,
MPI_Datatype recvtype,
MPI_Comm comm )

MPI wrapper for MPI_Allgather.

Definition at line 133 of file wrapper.cpp.

◆ Allgatherv()

void shamcomm::mpi::Allgatherv ( const void * sendbuf,
int sendcount,
MPI_Datatype sendtype,
void * recvbuf,
const int recvcounts[],
const int displs[],
MPI_Datatype recvtype,
MPI_Comm comm )

MPI wrapper for MPI_Allgatherv.

Definition at line 149 of file wrapper.cpp.

◆ Allreduce()

void shamcomm::mpi::Allreduce ( const void * sendbuf,
void * recvbuf,
int count,
MPI_Datatype datatype,
MPI_Op op,
MPI_Comm comm )

MPI wrapper for MPI_Allreduce.

Definition at line 119 of file wrapper.cpp.

◆ Barrier()

void shamcomm::mpi::Barrier ( MPI_Comm comm)

MPI wrapper for MPI_Barrier.

Definition at line 194 of file wrapper.cpp.

◆ Exscan()

void shamcomm::mpi::Exscan ( const void * sendbuf,
void * recvbuf,
int count,
MPI_Datatype datatype,
MPI_Op op,
MPI_Comm comm )

MPI wrapper for MPI_Exscan.

Definition at line 166 of file wrapper.cpp.

◆ File_close()

void shamcomm::mpi::File_close ( MPI_File * fh)

MPI wrapper for MPI_File_close.

Definition at line 305 of file wrapper.cpp.

◆ File_open()

void shamcomm::mpi::File_open ( MPI_Comm comm,
const char * filename,
int amode,
MPI_Info info,
MPI_File * fh )

MPI wrapper for MPI_File_open.

Definition at line 312 of file wrapper.cpp.

◆ File_read()

void shamcomm::mpi::File_read ( MPI_File fh,
void * buf,
int count,
MPI_Datatype datatype,
MPI_Status * status )

MPI wrapper for MPI_File_read.

Definition at line 272 of file wrapper.cpp.

◆ File_read_at()

void shamcomm::mpi::File_read_at ( MPI_File fh,
MPI_Offset offset,
void * buf,
int count,
MPI_Datatype datatype,
MPI_Status * status )

MPI wrapper for MPI_File_read_at.

Definition at line 292 of file wrapper.cpp.

◆ File_set_view()

void shamcomm::mpi::File_set_view ( MPI_File fh,
MPI_Offset disp,
MPI_Datatype etype,
MPI_Datatype filetype,
const char * datarep,
MPI_Info info )

MPI wrapper for MPI_File_set_view.

Definition at line 236 of file wrapper.cpp.

◆ File_write()

void shamcomm::mpi::File_write ( MPI_File fh,
const void * buf,
int count,
MPI_Datatype datatype,
MPI_Status * status )

MPI wrapper for MPI_File_write.

Definition at line 264 of file wrapper.cpp.

◆ File_write_all()

void shamcomm::mpi::File_write_all ( MPI_File fh,
const void * buf,
int count,
MPI_Datatype datatype,
MPI_Status * status )

MPI wrapper for MPI_File_write_all.

Definition at line 256 of file wrapper.cpp.

◆ File_write_at()

void shamcomm::mpi::File_write_at ( MPI_File fh,
MPI_Offset offset,
const void * buf,
int count,
MPI_Datatype datatype,
MPI_Status * status )

MPI wrapper for MPI_File_write_at.

Definition at line 279 of file wrapper.cpp.

◆ Gather()

void shamcomm::mpi::Gather ( const void * sendbuf,
int sendcount,
MPI_Datatype sendtype,
void * recvbuf,
int recvcount,
MPI_Datatype recvtype,
int root,
MPI_Comm comm )

MPI wrapper for MPI_Gather.

Definition at line 326 of file wrapper.cpp.

◆ Gatherv()

void shamcomm::mpi::Gatherv ( const void * sendbuf,
int sendcount,
MPI_Datatype sendtype,
void * recvbuf,
const int recvcounts[],
const int displs[],
MPI_Datatype recvtype,
int root,
MPI_Comm comm )

MPI wrapper for MPI_Gatherv.

Definition at line 342 of file wrapper.cpp.

◆ Get_count()

void shamcomm::mpi::Get_count ( const MPI_Status * status,
MPI_Datatype datatype,
int * count )

MPI wrapper for MPI_Get_count.

Definition at line 222 of file wrapper.cpp.

◆ get_possible_keys()

const std::vector< std::string > & shamcomm::mpi::get_possible_keys ( )

return all possible keys for the internal timers

Definition at line 60 of file wrapper.cpp.

◆ get_timer()

f64 shamcomm::mpi::get_timer ( std::string timername)

get a timer value

Definition at line 44 of file wrapper.cpp.

◆ get_timers()

const std::unordered_map< std::string, f64 > & shamcomm::mpi::get_timers ( )

return all internal timers

Definition at line 46 of file wrapper.cpp.

◆ Irecv()

void shamcomm::mpi::Irecv ( void * buf,
int count,
MPI_Datatype datatype,
int source,
int tag,
MPI_Comm comm,
MPI_Request * request )

MPI wrapper for MPI_Irecv.

Definition at line 102 of file wrapper.cpp.

◆ Isend()

void shamcomm::mpi::Isend ( const void * buf,
int count,
MPI_Datatype datatype,
int dest,
int tag,
MPI_Comm comm,
MPI_Request * request )

MPI wrapper for MPI_Isend.

Definition at line 85 of file wrapper.cpp.

◆ Probe()

void shamcomm::mpi::Probe ( int source,
int tag,
MPI_Comm comm,
MPI_Status * status )

MPI wrapper for MPI_Probe.

Definition at line 201 of file wrapper.cpp.

◆ Recv()

void shamcomm::mpi::Recv ( void * buf,
int count,
MPI_Datatype datatype,
int source,
int tag,
MPI_Comm comm,
MPI_Status * status )

MPI wrapper for MPI_Recv.

Definition at line 208 of file wrapper.cpp.

◆ register_time()

void shamcomm::mpi::register_time ( std::string timername,
f64 time )

Register a timer value.

Definition at line 33 of file wrapper.cpp.

◆ Send()

void shamcomm::mpi::Send ( const void * buf,
int count,
MPI_Datatype datatype,
int dest,
int tag,
MPI_Comm comm )

MPI wrapper for MPI_Send.

Definition at line 229 of file wrapper.cpp.

◆ Test()

void shamcomm::mpi::Test ( MPI_Request * request,
int * flag,
MPI_Status * status )

MPI wrapper for MPI_Test.

Definition at line 319 of file wrapper.cpp.

◆ Type_size()

void shamcomm::mpi::Type_size ( MPI_Datatype type,
int * size )

MPI wrapper for MPI_Type_size.

Definition at line 249 of file wrapper.cpp.

◆ Wait()

void shamcomm::mpi::Wait ( MPI_Request * request,
MPI_Status * status )

MPI wrapper for MPI_Wait.

Definition at line 180 of file wrapper.cpp.

◆ Waitall()

void shamcomm::mpi::Waitall ( int count,
MPI_Request array_of_requests[],
MPI_Status * array_of_statuses )

MPI wrapper for MPI_Waitall.

Definition at line 187 of file wrapper.cpp.