Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run ADIOS2 CI without test reruns #4355

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/dashboard/adios_common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ endif()
if((CMAKE_VERSION VERSION_GREATER 3.16.20191201 ) AND
(ADIOS_TEST_REPEAT GREATER 0) AND
NOT "REPEAT" IN_LIST CTEST_TEST_ARGS)
list(APPEND CTEST_TEST_ARGS REPEAT "UNTIL_PASS:${ADIOS_TEST_REPEAT}")
list(APPEND CTEST_TEST_ARGS REPEAT "UNTIL_FAIL:${ADIOS_TEST_REPEAT}")
endif()

list(APPEND CTEST_UPDATE_NOTES_FILES "${CMAKE_CURRENT_LIST_FILE}")
Expand Down
16 changes: 15 additions & 1 deletion source/adios2/toolkit/transport/file/FilePOSIX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -414,13 +414,18 @@ void FilePOSIX::Read(char *buffer, size_t size, size_t start)
{
auto lf_Read = [&](char *buffer, size_t size) {
size_t backoff_ns = 20;
std::cout << "Start Read of size " << size << " Start " << start << std::endl;
if (start != MaxSizeT)
std::cout << "Start is MaxSizeT" << std::endl;
while (size > 0)
{
ProfilerStart("read");
errno = 0;
const auto readSize = read(m_FileDescriptor, buffer, size);
m_Errno = errno;
ProfilerStop("read");
std::cout << "read of " << size << " returned " << readSize << ", errno " << errno
<< std::endl;

if (readSize == -1)
{
Expand All @@ -435,6 +440,7 @@ void FilePOSIX::Read(char *buffer, size_t size, size_t start)
}
else if (readSize == 0)
{
std::cout << "ReadSize zero fail on eof is " << m_FailOnEOF << std::endl;
if (m_FailOnEOF)
{
// we got an EOF on data that *should* be present,
Expand All @@ -445,6 +451,7 @@ void FilePOSIX::Read(char *buffer, size_t size, size_t start)
// this as a real failure and throw an exception.
std::this_thread::sleep_for(std::chrono::nanoseconds(backoff_ns));
backoff_ns *= 2;
std::cout << "failure backoff_ns now " << backoff_ns << std::endl;
if (std::chrono::nanoseconds(backoff_ns) > std::chrono::seconds(30))
helper::Throw<std::ios_base::failure>(
"Toolkit", "transport::file::FilePOSIX", "Read",
Expand All @@ -458,6 +465,7 @@ void FilePOSIX::Read(char *buffer, size_t size, size_t start)
std::this_thread::sleep_for(std::chrono::nanoseconds(backoff_ns));
constexpr size_t backoff_limit = 500 * 1000 * 1000;
backoff_ns *= 2;
std::cout << "wait_forever backoff_ns now " << backoff_ns << std::endl;
if (backoff_ns > backoff_limit)
backoff_ns = backoff_limit;
}
Expand All @@ -466,6 +474,7 @@ void FilePOSIX::Read(char *buffer, size_t size, size_t start)
buffer += readSize;
size -= readSize;
}
std::cout << "Returning with size " << size << std::endl;
};

WaitForOpen();
Expand Down Expand Up @@ -527,7 +536,7 @@ void FilePOSIX::Flush()
#if (_POSIX_C_SOURCE >= 199309L || _XOPEN_SOURCE >= 500)
fdatasync(m_FileDescriptor);
#else
fsync(m_FileDescriptor)
fsync(m_FileDescriptor);
#endif
#endif
}
Expand All @@ -538,6 +547,11 @@ void FilePOSIX::Close()
ProfilerStart("close");
errno = 0;
const int status = close(m_FileDescriptor);
#if (_POSIX_C_SOURCE >= 199309L || _XOPEN_SOURCE >= 500)
fdatasync(m_FileDescriptor);
#else
fsync(m_FileDescriptor);
#endif
m_Errno = errno;
ProfilerStop("close");

Expand Down
Loading