|
C++ mpi module for stochmagnet_main Package
|
This class manges the reading & writing in one file. More...
#include <MPI_IOFile.h>


Public Member Functions | |
| MPI_IOFile () | |
| create a root environment | |
| virtual | ~MPI_IOFile (void) |
| destroy | |
| virtual tMemSize | getMemorySize () const override |
| return the memory size of the class | |
| void | setFileName (const tString &fn) |
| set the file name More... | |
| const tString & | getFileName () const |
| get the filename More... | |
| const tMPIError & | getError () const |
| get the error of the last instruction | |
| tMPIError | setView (const MPI_View &view) |
| set the view More... | |
| tMPIError | setView (const tMPIIOIndex &index, const MPI_View &view) |
| set the view More... | |
| tBoolean | open (const MPI_Environment &env, const tMPIIOMode &mode) |
| open the file for the environment More... | |
| tBoolean | close () |
| close the file | |
| template<typename T > | |
| tBoolean | writeAt (const tMPIIOIndex &pos, const std::valarray< T > &values, tMPIStatus &status) |
| write the value at individual core by explicit file cursor position with blocking action More... | |
| template<typename T > | |
| tBoolean | iWriteAt (const tMPIIOIndex &pos, const std::valarray< T > &values, tMPIStatus &status) |
| write the value at individual core by explicit file cursor position non blocking action More... | |
| template<typename T > | |
| tBoolean | writeAll (const std::valarray< T > &values, tMPIStatus &status) |
| write the value at shared core by explicit file cursor position with blocking action More... | |
| tBoolean | writeOrdered (const tString &str) |
| write the value at shared core by explicit file cursor position with blocking action More... | |
| template<typename T > | |
| tBoolean | writeOrdered (const std::valarray< T > &values) |
| write the value at shared core by explicit file cursor position with blocking action More... | |
| template<typename T > | |
| tBoolean | allWriteAt (const tMPIIOIndex &pos, const std::valarray< T > &values, tMPIStatus &status) |
| write the value at shared core by explicit file cursor position with blocking action More... | |
| template<typename T > | |
| tBoolean | iAllWriteAt (const tMPIIOIndex &pos, const std::valarray< T > &values, tMPIStatus &status) |
| write the value at shared core by explicit file cursor position non blocking action More... | |
| template<typename T > | |
| tBoolean | readAt (const tMPIIOIndex &pos, std::valarray< T > &values, tMPIStatus &status) |
| read the value at individual core by epplicit file cursor position with blocking action More... | |
| template<typename T > | |
| tBoolean | iReadAt (const tMPIIOIndex &pos, std::valarray< T > &values, tMPIRequest &request) |
| read the value at individual core by explicit file cursor position with none blocking action More... | |
| template<typename T > | |
| tBoolean | read (const tMPICount &n, T *values, tMPIStatus &status) |
| read the value at individual core by implplicit file cursor position with blocking action More... | |
| template<typename T > | |
| tBoolean | iRead (const tMPICount &n, T *values, tMPIRequest &request) |
| read the value at individual core by implicit file cursor position with blocking action More... | |
| template<typename T > | |
| tBoolean | allReadAt (const tMPIIOIndex &pos, std::valarray< T > &values, tMPIStatus &status) |
| read the value at explicit shared position with blocking action More... | |
| template<typename T > | |
| tBoolean | iAllReadAt (const tMPIIOIndex &pos, std::valarray< T > &values, tMPIRequest &request) |
| read the value at explicit shared position with none blocking action More... | |
| template<typename T > | |
| tBoolean | allRead (const tMPICount &n, T *values, tMPIStatus &status) |
| read the value at implicit shared position with blocking action More... | |
| template<typename T > | |
| tBoolean | allRead (std::valarray< T > &values, tMPIStatus &status) |
| read the value at implicit shared position with blocking action More... | |
| template<typename T > | |
| tBoolean | iAllRead (const tMPICount &n, T *values, tMPIRequest &request) |
| read the value at implicit shared position with none blocking action More... | |
| template<typename T > | |
| tBoolean | sharedRead (const tMPICount &n, T *values, tMPIStatus &status) |
| read the value at implicit shared position and all the core execute the action randomly with blocking action. The shared cursor move at each call. More... | |
| template<typename T > | |
| tBoolean | iSharedRead (const tMPICount &n, T *values, tMPIRequest &request) |
| read the value at implicit shared position and all the core execute the action randomly with blocking action. The shared cursor move at each call. More... | |
| template<typename T > | |
| tBoolean | orderedRead (const tMPICount &n, T *values, tMPIStatus &status) |
| read the value at implicit shared position and all the core execute the action with respect of there core id with blocking action. The shared cursor move at each call. More... | |
| template<typename T > | |
| tBoolean | orderedRead (std::valarray< T > &values, tMPIStatus &status) |
| read the value at implicit shared position and all the core execute the action with respect of there core id with blocking action. The shared cursor move at each call. More... | |
| template<typename T > | |
| tBoolean | iOrderedRead (const tMPICount &n, T *values, tMPIRequest &request) |
| read the value at implicit shared position and all the core execute the action with respect of there core id with non blocking action More... | |
| tBoolean | getCorePosition (tMPIIOIndex &pos) |
| tBoolean | setCorePosition (const tMPIIOIndex &pos) |
| tBoolean | setCorePositionToEnd () |
| tBoolean | moveCorePosition (const tMPIIOIndex &dis) |
| tBoolean | moveFromEndCorePosition (const tMPIIOIndex &dis) |
| tBoolean | getEnvironmentPosition (tMPIIOIndex &pos) |
| get th eposition of the pointer of the file shared by all core of the environment More... | |
| tBoolean | setEnvironmentPosition (const tMPIIOIndex &pos) |
| get th eposition of the pointer of the file shared by all core of the environment More... | |
| tBoolean | setEnvironmentPositionToEnd () |
| tBoolean | moveEnvironmentPosition (const tMPIIOIndex &dis) |
| tBoolean | moveFromEndEnvironmentPosition (const tMPIIOIndex &dis) |
| tBoolean | getSize (tMPIIOIndex &s) const |
| get the size of the file More... | |
| void | setErrorMode (const tMPIErrorMode &mode) |
| set the error mode More... | |
| tString | printError () const |
| print Error More... | |
Public Member Functions inherited from CORE_Object | |
| template<class T > | |
| std::shared_ptr< T > | getSharedPointer () |
| return the shared pointer for this More... | |
| template<class T > | |
| std::shared_ptr< const T > | getConstSharedPointer () const |
| return a const shared pointer for this More... | |
| virtual tMemSize | getContentsMemorySize () const |
| return nthe memory size of the included associations More... | |
| template<class T > | |
| tBoolean | isInstanceOf () const |
| test if the clas T is an instance of this class More... | |
| tString | getClassName () const |
| return the name of the class More... | |
| tString | getPointerString () const |
| retrun the pointer of the class as a string More... | |
| tString | getIdentityString () const |
| retrun the string identification of the class More... | |
| virtual tString | toString () const |
| return the string representation of the object node More... | |
Static Public Member Functions | |
| static CORE_UniquePointer< MPI_IOFile > | New () |
| create a new instance of class within an unique pointer More... | |
| static tBoolean | Open (const MPI_Environment &env, const tString &fn, const tMPIIOMode &mode, tMPIIOFile &fdesc) |
| open the file for the environment More... | |
| static tMPIError | Close (tMPIIOFile &f) |
| close the file More... | |
Static Public Member Functions inherited from CORE_Object | |
| static tBoolean | EnableMemoryStack (const tBoolean &isMemoryChecked) |
| enable the memory stack More... | |
| static void | EnableMemoryStack () |
| enable the memory stack | |
| static void | DisableMemoryStack () |
| disable the memory stack | |
| static tBoolean | IsMemoryStackEnabled () |
| return trur if the memory stack is enabled | |
| static tString | MemoryStackToString () |
| get the memory stack in string More... | |
| static tIndex | GetRegisteredClassesNumber () |
| get the memory stack in string More... | |
Static Public Attributes | |
| static const tMPIIOMode | READ_ONLY =MPI_MODE_RDONLY |
| read only mode | |
| static const tMPIIOMode | WRITE_ONLY =MPI_MODE_WRONLY |
| write only mode | |
| static const tMPIIOMode | READ_WRITE =MPI_MODE_RDWR |
| read and write mode | |
| static const tMPIIOMode | CREATE =MPI_MODE_CREATE |
| file creation tag | |
| static const tMPIErrorMode | FATAL_ERROR =MPI_ERRORS_ARE_FATAL |
| fatal error tag | |
| static const tMPIErrorMode | RETURN_ERROR =MPI_ERRORS_RETURN |
| return error tag | |
Additional Inherited Members | |
Protected Member Functions inherited from MPI_Object | |
| MPI_Object (void) | |
| create | |
| virtual | ~MPI_Object (void) |
| destroy | |
Protected Member Functions inherited from CORE_Object | |
| CORE_Object () | |
| build an instance of the object | |
| virtual | ~CORE_Object () |
| destroy the instance of object std | |
This class manges the reading & writing in one file.
A file can by managed by individualy operation with explicit individual file cursor position:
A file can by managed by individualy operation with implicit inidividual file cursor moving position by core:
A file can be read by by individualy operation with shared file shared cursor moving position
A file can by managed by shared operation with explicit file shared cursor moving position by core:
A file can by managed by shared operation with implicit file shared cursor moving position by core:
There is a corresponding version with none blocking acces with the method by adding i before the method name:
The explicit setting & getting individual core position are done with the methods:
The explicit setting & getting shared environment position are done with the methods:
An example of using :
|
inline |
read the value at implicit shared position with blocking action
| T | : type of value to read |
| [in] | n | : number of values to read |
| [out] | values | : values to read |
| [out] | status | status of the reading |
The acces are ordered with respect of the id of the core. This method is more efficient. An example:
|
inline |
read the value at implicit shared position with blocking action
| [out] | values | : values to read |
| [out] | status | status of the reading |
The acces are ordered with respect of the id of the core. This method is more efficient. An example:
|
inline |
read the value at explicit shared position with blocking action
| T | : type of value to read |
| [in] | pos | pos of the file to read |
| [out] | values | : values to read |
| [out] | status | status of the read |
The acces are ordered with respect of the id of the core. This method is more efficient. An example:
|
inline |
write the value at shared core by explicit file cursor position with blocking action
| T | : type of value to write |
| [in] | pos | pos of the file to write |
| [in] | values | : values to write |
| [out] | status | status of the writing |
An example: \imag html ioWriteAt.jpg
|
inlinestatic |
close the file
| [in] | f | file to close |
|
inline |
get th eposition of the pointer of the file shared by all core of the environment
| [out] | pos | environment position of the cursor on file |
|
inline |
get the filename
|
inline |
get the size of the file
| [out] | s | size of the file |
|
inline |
read the value at implicit shared position with none blocking action
| T | : type of value to read |
| [in] | n | : number of values to read |
| [out] | values | : values to read |
| [out] | status | status of the reading see MPI_IOFile::allRead() |
|
inline |
read the value at explicit shared position with none blocking action
| T | : type of value to read |
| [in] | pos | pos of the file to read |
| [out] | values | : values to read |
| [out] | status | status of the read |
Same metod as MPI_IOFile::allReadAt()
|
inline |
write the value at shared core by explicit file cursor position non blocking action
| T | : type of value to write |
| [in] | pos | pos of the file to write |
| [in] | values | : values to write |
| [out] | status | status of the writing |
the same method as EMM_FileIO::writeAt()
|
inline |
read the value at implicit shared position and all the core execute the action with respect of there core id with non blocking action
| T | : type of value to read |
| [in] | n | : number of values to read |
| [out] | values | : values to read |
| [out] | request | request of the reading |
|
inline |
read the value at individual core by implicit file cursor position with blocking action
| [in] | n | : number of values to read |
| [out] | values | : values to read with sufficient memory size |
| [out] | status | status of the writing |
Same method as EMM_IOFile::read()
|
inline |
read the value at individual core by explicit file cursor position with none blocking action
| T | : type of value to read |
| [in] | pos | pos of the file to read |
| [in] | values | : values to read |
| [out] | request | status of the reading |
Same method as EMM_IOFile::readAt()
|
inline |
read the value at implicit shared position and all the core execute the action randomly with blocking action. The shared cursor move at each call.
| T | : type of value to read |
| [in] | n | : number of values to read |
| [out] | values | : values to read |
| [out] | status | status of the reading |
The acces are ordered with respect of the id of the core. This method is more efficient. An example:
|
inline |
write the value at individual core by explicit file cursor position non blocking action
| T | : type of value to write |
| [in] | pos | pos of the file to write |
| [in] | values | : values to write |
| [out] | status | status of the writing |
the same method as EMM_FileIO::writeAt()
|
inlinestatic |
create a new instance of class within an unique pointer
|
inline |
open the file for the environment
| [in] | env | environment of the process |
| [in] | mode | : mod of opening |
|
inlinestatic |
open the file for the environment
| [in] | env | environment of the process |
| [in] | fn | : name of the file |
| [in] | mode | : mod of opening |
| [out] | fdesc | : file descriptor |
|
inline |
read the value at implicit shared position and all the core execute the action with respect of there core id with blocking action. The shared cursor move at each call.
| T | : type of value to read |
| [in] | n | : number of values to read |
| [out] | values | : values to read |
| [out] | status | status of the reading |
The acces are ordered with respect of the id of the core. This method is more efficient. An example:
|
inline |
read the value at implicit shared position and all the core execute the action with respect of there core id with blocking action. The shared cursor move at each call.
| T | : type of value to read |
| [out] | values | : values to read |
| [out] | status | status of the reading |
The acces are ordered with respect of the id of the core. This method is more efficient. An example:
|
inline |
print Error
|
inline |
read the value at individual core by implplicit file cursor position with blocking action
| T | : type of value to read |
| [in] | n | : number of values to read |
| [out] | values | : values to read with sufficient memory size |
| [out] | status | status of the writing |
an example
|
inline |
read the value at individual core by epplicit file cursor position with blocking action
| T | : type of value to read |
| [in] | pos | pos of the file to read |
| [out] | values | : values to read |
| [out] | statius | : status of readind |
an example
|
inline |
get th eposition of the pointer of the file shared by all core of the environment
| [out] | pos | environment position of the cursor on file |
|
inline |
set the error mode
| [in] | mode | error mode |
|
inline |
set the file name
| [in] | fn | : name of the file |
|
inline |
set the view
| [in] | view | view to set at first element |
|
inline |
set the view
| [in] | index | : index to start the view |
| [in] | view | view to set at index element |
|
inline |
read the value at implicit shared position and all the core execute the action randomly with blocking action. The shared cursor move at each call.
| T | : type of value to read |
| [in] | n | : number of values to read |
| [out] | values | : values to read |
| [out] | status | status of the reading |
The acces are ordered with respect of the id of the core. This method is more efficient. An example:
|
inline |
write the value at shared core by explicit file cursor position with blocking action
| T | : type of value to write |
| [in] | values | : values to write |
| [out] | status | status of the writing |
An example: \imag html ioWriteAt.jpg
|
inline |
write the value at individual core by explicit file cursor position with blocking action
| T | : type of value to write |
| [in] | pos | pos of the file to write |
| [in] | values | : values to write |
| [out] | status | status of the writing |
An example: \imag html ioWriteAt.jpg
|
inline |
write the value at shared core by explicit file cursor position with blocking action
| T | : type of value to write |
| [in] | values | : values to write |
An example: \imag html ioWriteAt.jpg
|
inline |
write the value at shared core by explicit file cursor position with blocking action
| [in] | str | : values to write |
An example: \imag html ioWriteAt.jpg