[med-svn] [seqan2] 01/01: New upstream version 2.4.0~rc1+dfsg
Michael Crusoe
misterc-guest at moszumanska.debian.org
Tue Jan 30 11:03:08 UTC 2018
This is an automated email from the git hooks/post-receive script.
misterc-guest pushed a commit to annotated tag upstream/2.4.0_rc1+dfsg
in repository seqan2.
commit 638483111097352179724a2d79f57b9bb96b9a0e
Author: Michael R. Crusoe <michael.crusoe at gmail.com>
Date: Tue Jan 30 02:57:24 2018 -0800
New upstream version 2.4.0~rc1+dfsg
---
include/seqan/bam_io/read_bam.h | 2 +-
include/seqan/simd/simd_base.h | 4 ++--
include/seqan/simd/simd_base_seqan_interface.h | 4 ++--
include/seqan/simd/simd_base_umesimd_impl.h | 16 +++++++++++++--
include/seqan/stream/iostream_bgzf.h | 23 ++++++++++++++++++---
include/seqan/stream/stream_compressor.h | 10 +++++++++
tests/align/test_align_simd_base.h | 9 ++++++--
.../test_align_parallel_wavefront_alignment.h | 4 ++--
.../test_align_wavefront_alignment_scheduler.h | 1 -
tests/simd/test_simd_vector.h | 4 +++-
util/cmake/SeqAnSimdUtility.cmake | 24 ++++++----------------
11 files changed, 67 insertions(+), 34 deletions(-)
diff --git a/include/seqan/bam_io/read_bam.h b/include/seqan/bam_io/read_bam.h
index 12c81c2..652abce 100644
--- a/include/seqan/bam_io/read_bam.h
+++ b/include/seqan/bam_io/read_bam.h
@@ -267,7 +267,7 @@ readRecord(BamAlignmentRecord & record,
TQualIter qitEnd = end(record.qual, Standard());
for (TQualIter qit = begin(record.qual, Standard()); qit != qitEnd;)
*qit++ = '!' + *it++;
- if (!empty(record.qual) && (record.qual[0] - '!') == '\xff')
+ if (!empty(record.qual) && static_cast<char>(record.qual[0] - '!') == '\xff')
clear(record.qual);
// tags
diff --git a/include/seqan/simd/simd_base.h b/include/seqan/simd/simd_base.h
index 4bb8ed2..72d2bb4 100644
--- a/include/seqan/simd/simd_base.h
+++ b/include/seqan/simd/simd_base.h
@@ -195,9 +195,9 @@ clearVector(TSimdVector & vector);
* c[i] = a;
* ```
*/
-template <typename TSimdVector>
+template <typename TSimdVector, typename TValue>
inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
-createVector(typename Value<TSimdVector>::Type const x);
+createVector(TValue const x);
/**
* ```
diff --git a/include/seqan/simd/simd_base_seqan_interface.h b/include/seqan/simd/simd_base_seqan_interface.h
index 7f2537a..fc11215 100644
--- a/include/seqan/simd/simd_base_seqan_interface.h
+++ b/include/seqan/simd/simd_base_seqan_interface.h
@@ -89,9 +89,9 @@ clearVector(TSimdVector & vector)
// Function createVector()
// --------------------------------------------------------------------------
-template <typename TSimdVector>
+template <typename TSimdVector, typename TValue>
inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
-createVector(typename Value<TSimdVector>::Type const x)
+createVector(TValue const x)
{
typedef typename Value<TSimdVector>::Type TIVal;
return _createVector<TSimdVector>(x, SimdParams_<sizeof(TSimdVector), sizeof(TSimdVector) / sizeof(TIVal)>());
diff --git a/include/seqan/simd/simd_base_umesimd_impl.h b/include/seqan/simd/simd_base_umesimd_impl.h
index fe4319a..588815d 100644
--- a/include/seqan/simd/simd_base_umesimd_impl.h
+++ b/include/seqan/simd/simd_base_umesimd_impl.h
@@ -352,9 +352,21 @@ clearVector(TSimdVector & vector)
// Function createVector()
// --------------------------------------------------------------------------
-template <typename TSimdVector>
+template <typename TSimdVector, typename TValue>
+inline SEQAN_FUNC_ENABLE_IF(And<Is<SimdMaskVectorConcept<TSimdVector>>,
+ Not<Is<SimdVectorConcept<TSimdVector>>>>, TSimdVector)
+createVector(TValue const x)
+{
+ return TSimdVector(static_cast<bool>(x));
+}
+
+// --------------------------------------------------------------------------
+// Function createVector()
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector, typename TValue>
inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
-createVector(typename Value<TSimdVector>::Type const x)
+createVector(TValue const x)
{
return TSimdVector(x);
}
diff --git a/include/seqan/stream/iostream_bgzf.h b/include/seqan/stream/iostream_bgzf.h
index 4cf3a0e..7e554a1 100644
--- a/include/seqan/stream/iostream_bgzf.h
+++ b/include/seqan/stream/iostream_bgzf.h
@@ -339,6 +339,7 @@ public:
std::mutex cs;
std::condition_variable readyEvent;
bool ready;
+ bool bgzfEofMarker;
DecompressionJob() :
inputBuffer(BGZF_MAX_BLOCK_SIZE, 0),
@@ -347,7 +348,8 @@ public:
size(0),
cs(),
readyEvent(),
- ready(true)
+ ready(true),
+ bgzfEofMarker(false)
{}
// TODO(rrahn): Do we need a copy constructor for the decompression job.
@@ -358,7 +360,8 @@ public:
size(other.size),
cs(),
readyEvent(),
- ready(other.ready)
+ ready(other.ready),
+ bgzfEofMarker(other.bgzfEofMarker)
{}
};
@@ -403,6 +406,7 @@ public:
{
std::lock_guard<std::mutex> scopedLock(streamBuf->serializer.lock);
+ job.bgzfEofMarker = false;
if (streamBuf->serializer.error != NULL)
return;
@@ -444,6 +448,14 @@ public:
(char*)&job.inputBuffer[0] + BGZF_BLOCK_HEADER_LENGTH,
tailLen);
+ // Check if end-of-file marker is set
+ if (memcmp(reinterpret_cast<uint8_t const *>(&job.inputBuffer[0]),
+ reinterpret_cast<uint8_t const *>(&BGZF_END_OF_FILE_MARKER[0]),
+ 28) == 0)
+ {
+ job.bgzfEofMarker = true;
+ }
+
if (!streamBuf->serializer.istream.good())
{
streamBuf->serializer.fileOfs = -1;
@@ -589,10 +601,15 @@ public:
&job.buffer[0] + MAX_PUTBACK, // read position
&job.buffer[0] + (MAX_PUTBACK + size)); // end of buffer
- if (job.size == -1)
+ // The end of the bgzf file is reached, either if there was an error, or if the
+ // end-of-file marker was reached, while the uncompressed block had zero size.
+ if (job.size == -1 || (job.size == 0 && job.bgzfEofMarker))
return EOF;
else if (job.size > 0)
return Tr::to_int_type(*this->gptr()); // return next character
+
+ throw IOError("BGZF: Invalid end condition in decompression. "
+ "Most likely due to an empty bgzf block without end-of-file marker.");
}
}
diff --git a/include/seqan/stream/stream_compressor.h b/include/seqan/stream/stream_compressor.h
index 9eaa158..205bb35 100644
--- a/include/seqan/stream/stream_compressor.h
+++ b/include/seqan/stream/stream_compressor.h
@@ -61,6 +61,16 @@ struct Pager;
// Classes
// ============================================================================
+// Special end-of-file marker defined by the BGZF compression format.
+// See: https://samtools.github.io/hts-specs/SAMv1.pdf
+static constexpr std::array<uint8_t, 28> BGZF_END_OF_FILE_MARKER {{0x1f, 0x8b, 0x08, 0x04,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xff, 0x06, 0x00,
+ 0x42, 0x43, 0x02, 0x00,
+ 0x1b, 0x00, 0x03, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00}};
+
template <typename TAlgTag>
struct Compress;
diff --git a/tests/align/test_align_simd_base.h b/tests/align/test_align_simd_base.h
index 149da57..0c6c8d2 100644
--- a/tests/align/test_align_simd_base.h
+++ b/tests/align/test_align_simd_base.h
@@ -178,9 +178,14 @@ void testAlignSimd(TFunctor const &,
SEQAN_ASSERT_EQ(length(scores), length(alignments));
// Check correctness of alignments using sequential alignment.
- auto zipRes = makeZipView(scores, alignments);
- for (auto res : zipRes)
+ // NOTE(rrahn): There seems to be a bug with the intel compiler and the zipView.
+ // The following works without running into the problem, but we need to investigate the issue at some point.
+ auto itBeg = makeZipIterator(begin(scores, seqan::Standard()), begin(alignments, seqan::Standard()));
+ auto itEnd = makeZipIterator(end(scores, seqan::Standard()), end(alignments, seqan::Standard()));
+
+ for (auto it = itBeg; it != itEnd; ++it)
{
+ auto res = *it;
typename std::decay<decltype(std::get<1>(res))>::type goldAlign;
resize(rows(goldAlign), 2);
assignSource(row(goldAlign, 0), source(row(std::get<1>(res), 0)));
diff --git a/tests/align_parallel/test_align_parallel_wavefront_alignment.h b/tests/align_parallel/test_align_parallel_wavefront_alignment.h
index 0f40da6..933f726 100644
--- a/tests/align_parallel/test_align_parallel_wavefront_alignment.h
+++ b/tests/align_parallel/test_align_parallel_wavefront_alignment.h
@@ -161,8 +161,8 @@ SEQAN_DEFINE_TEST(test_align_parallel_wavefront_multiple_global_alignment_simd)
}
ExecutionPolicy<WavefrontAlignment<>, Vectorial> execPolicy;
- setNumThreads(execPolicy, 4);
- setParallelAlignments(execPolicy, 8);
+ setNumThreads(execPolicy, 2);
+ setParallelAlignments(execPolicy, 4);
setBlockSize(execPolicy, 56);
using TDPSettings = DPSettings<Score<int, Simple>, test_align_parallel::DPTestConfig>;
diff --git a/tests/align_parallel/test_align_wavefront_alignment_scheduler.h b/tests/align_parallel/test_align_wavefront_alignment_scheduler.h
index 01cbc0d..61f797a 100644
--- a/tests/align_parallel/test_align_wavefront_alignment_scheduler.h
+++ b/tests/align_parallel/test_align_wavefront_alignment_scheduler.h
@@ -200,7 +200,6 @@ SEQAN_DEFINE_TEST(test_align_parallel_wavefront_alignment_scheduler_async_with_e
test_align_parallel::RaiiEvent event;
TInnerTask task = [&]()
{
- if (calledIds[id] > 0)
{
std::lock_guard<std::mutex> lck(mutexSetBool);
isRecycled = true;
diff --git a/tests/simd/test_simd_vector.h b/tests/simd/test_simd_vector.h
index 7e6ea54..579e6b1 100644
--- a/tests/simd/test_simd_vector.h
+++ b/tests/simd/test_simd_vector.h
@@ -76,7 +76,9 @@ inline void test_matrix_transpose()
// std::cout << std::endl;
// for(int i=0;i<DIM;++i)
// print(std::cout, tmp[i]) << std::endl;
-
+#if defined(__x86_64__) || defined(__amd64__)
+ _mm_empty(); // Fixes icpc warning #13203: No EMMS instruction before call to function
+#endif // defined(__x86_64__) || defined(__amd64__)
for (int i = 0; i < ROWS; ++i)
for (int j = 0; j < COLS; ++j)
SEQAN_ASSERT_EQ(tmp[i][j], random[j * ROWS + i]);
diff --git a/util/cmake/SeqAnSimdUtility.cmake b/util/cmake/SeqAnSimdUtility.cmake
index 87adb3c..01c5816 100644
--- a/util/cmake/SeqAnSimdUtility.cmake
+++ b/util/cmake/SeqAnSimdUtility.cmake
@@ -549,10 +549,13 @@ macro(add_simd_platform_tests target)
if (COMPILER_CLANG)
# clang 4.x
- if (NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.0) AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0) AND (";${SEQAN_SIMD_COMPILER_SUPPORTS_SEQANSIMD};" MATCHES ";avx512_skx;"))
+ if (NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.0.2) AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0) AND (";${SEQAN_SIMD_COMPILER_SUPPORTS_SEQANSIMD};" MATCHES ";avx512_skx;"))
message(AUTHOR_WARNING "Clang 4.x; reevaluate if AVX512_skx (seqan-simd only) binaries are working. "
"An earlier version had an Internal Compiler Error (https://llvm.org/bugs/show_bug.cgi?id=31731), "
"which was fixed, the produced binaries might work now. (clang 5.0 is known to work)")
+ elseif ((CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 3.9) AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.0.2))
+ simd_list_version_greater(seqansimd_compile_blacklist avx512_knl)
+ set(reason_for_disabled_test "Clang 4.0.x produces executables that fail the basic vector test `test_simd_vector`")
# clang =3.9.0
elseif (NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.9) AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.9.1)
# Build the executables, but don't execute them, because clang <= 3.9.x
@@ -576,29 +579,14 @@ macro(add_simd_platform_tests target)
simd_list_version_greater(seqansimd_test_blacklist sse4)
set(reason_for_disabled_test "Clang 3.7.x produces executables that fail the basic vector test `test_simd_vector`")
endif()
- elseif (COMPILER_LINTEL)
- # icc >=17.0.0, <=17.0.4
- if (NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 17.0.0) AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 17.0.5)
- ## seqan-simd:
- # all: icc 17.0.x fails test cases [test_align_simd_*]:
- # SimdAlignTestCommon_Linear_Align type parameter [...] FAILED
- # SimdAlignTestCommon_Linear_Score type parameter [...] FAILED
- if (NOT ("${target}" MATCHES "test_simd_vector"))
- set(seqansimd_test_blacklist ${SEQAN_SIMD_SUPPORTED_EXTENSIONS})
- set(reason_for_disabled_test "Intel compiler 17.0.{0-4} produces executables that fail complex tests like `[test_align_simd_*]`")
- endif()
- # icc >=17.0.5
- elseif (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 17.0.4)
- message(AUTHOR_WARNING "Intel compiler >=17.0.5 reevaluate if [test_align_simd_*] can be compiled.")
- endif()
endif()
- if(COMPILER_GCC AND DEFINED ENV{TRAVIS} AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0.0)
+ if(COMPILER_GCC AND DEFINED ENV{TRAVIS} AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0.0)
# Disable avx2,avx512_knl,... on travis, because sometimes gcc 5.x and 6.x crashes
simd_list_version_greater(_travis_compile_blacklist sse4)
set(seqansimd_compile_blacklist ${seqansimd_compile_blacklist} ${_travis_compile_blacklist})
set(umesimd_compile_blacklist ${umesimd_compile_blacklist} ${_travis_compile_blacklist})
- message(STATUS "Don't compile ${seqansimd_compile_blacklist} on travis, because gcc<=6.x crashes occasionally")
+ message(STATUS "Don't compile ${seqansimd_compile_blacklist} on travis, because gcc<=8.x crashes occasionally")
endif()
# detect simd support by try-compile and try-run
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/seqan2.git
More information about the debian-med-commit
mailing list