-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only fail on EOF when we know it's OK
- Loading branch information
1 parent
ad97ac4
commit 7c6c62a
Showing
5 changed files
with
41 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,6 @@ | |
* | ||
* FileDescriptor.h wrapper of POSIX library functions for file I/O | ||
* | ||
* Created on: Oct 6, 2016 | ||
* Author: William F Godoy [email protected] | ||
*/ | ||
|
||
#ifndef ADIOS2_TOOLKIT_TRANSPORT_FILE_FILEDESCRIPTOR_H_ | ||
|
@@ -68,10 +66,13 @@ class FilePOSIX : public Transport | |
|
||
void MkDir(const std::string &fileName) final; | ||
|
||
void SetParameters(const Params ¶ms) final; | ||
|
||
private: | ||
/** POSIX file handle returned by Open */ | ||
int m_FileDescriptor = -1; | ||
int m_Errno = 0; | ||
bool m_FailOnEOF = false; // default to false for historic reasons | ||
bool m_IsOpening = false; | ||
std::future<int> m_OpenFuture; | ||
bool m_DirectIO = false; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,6 @@ | |
* | ||
* TransportMan.cpp | ||
* | ||
* Created on: May 23, 2017 | ||
* Author: William F Godoy [email protected] | ||
*/ | ||
|
||
#include "TransportMan.h" | ||
|
@@ -410,6 +408,14 @@ void TransportMan::ReadFile(char *buffer, const size_t size, const size_t start, | |
itTransport->second->Read(buffer, size, start); | ||
} | ||
|
||
void TransportMan::SetParameters(const Params ¶ms, const size_t transportIndex) | ||
{ | ||
auto itTransport = m_Transports.find(transportIndex); | ||
CheckFile(itTransport, | ||
", in call to SetParameters with index " + std::to_string(transportIndex)); | ||
itTransport->second->SetParameters(params); | ||
} | ||
|
||
void TransportMan::FlushFiles(const int transportIndex) | ||
{ | ||
if (transportIndex == -1) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,6 @@ | |
* | ||
* TransportMan.h : manages a vector of transports | ||
* | ||
* Created on: May 23, 2017 | ||
* Author: William F Godoy [email protected] | ||
*/ | ||
|
||
#ifndef ADIOS2_TOOLKIT_TRANSPORT_TRANSPORTMANAGER_H_ | ||
|
@@ -210,6 +208,13 @@ class TransportMan | |
*/ | ||
bool FileExists(const std::string &name, const Params ¶meters, const bool profile); | ||
|
||
/** | ||
* Set Transport Paramers | ||
* @param params | ||
* @param transportIndex | ||
*/ | ||
void SetParameters(const Params ¶ms, const size_t transportIndex = 0); | ||
|
||
protected: | ||
core::IO &m_IO; | ||
helper::Comm const &m_Comm; | ||
|