Skip to content

Commit

Permalink
Merge pull request #2419 from JasonRuonanWang/json-pgi
Browse files Browse the repository at this point in the history
let ssc use pgi compiler
  • Loading branch information
JasonRuonanWang authored Aug 11, 2020
2 parents 4710c51 + 8b67cef commit c5c1699
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cmake/DetectOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ endif()

# SSC
# SSC currently breaks the PGI compiler
if(NOT (CMAKE_CXX_COMPILER_ID STREQUAL "PGI") AND NOT MSVC)
if(NOT MSVC)
if(ADIOS2_HAVE_MPI)
if(ADIOS2_USE_SSC STREQUAL AUTO)
set(ADIOS2_HAVE_SSC TRUE)
Expand Down
6 changes: 1 addition & 5 deletions source/adios2/engine/ssc/SscHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,7 @@ size_t TotalDataSize(const Dims &dims, DataType type, const ShapeID &shapeId)
{
return GetTypeSize(type);
}
else
{
throw(std::runtime_error("ShapeID not supported"));
}
return 0;
throw(std::runtime_error("ShapeID not supported"));
}

size_t TotalDataSize(const BlockVec &bv)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11410,6 +11410,14 @@ class serializer
}
}

template<typename NumberType, detail::enable_if_t<
std::is_same<NumberType, number_unsigned_t>::value, int> = 0>
bool is_negative_integer(NumberType x) { return false; }

template<typename NumberType, detail::enable_if_t<
std::is_same<NumberType, number_integer_t>::value, int> = 0>
bool is_negative_integer(NumberType x) { return x<0; }

/*!
@brief dump an integer

Expand All @@ -11432,7 +11440,7 @@ class serializer
return;
}

const bool is_negative = std::is_same<NumberType, number_integer_t>::value and not (x >= 0); // see issue #755
const bool is_negative = is_negative_integer(x); // see issue #755
std::size_t i = 0;

while (x != 0)
Expand Down

0 comments on commit c5c1699

Please sign in to comment.