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

[INFRA] Add IntelLLVM CI #3225

Merged
merged 3 commits into from
Jan 30, 2024
Merged
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
7 changes: 7 additions & 0 deletions .github/workflows/ci_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ jobs:
build: unit
build_type: Release

- name: "IntelLLVM"
compiler: "intel"
build: unit
build_type: Release
cxx_flags: "-fp-model=strict"

steps:
- name: Checkout SeqAn3
uses: actions/checkout@v4
Expand All @@ -84,6 +90,7 @@ jobs:
ccache_size: 75M

- name: Install CMake
if: contains(matrix.compiler, 'intel') == false
uses: seqan/actions/setup-cmake@main
with:
cmake: 3.16.9
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/ci_misc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ jobs:
build_type: Release
test_threads: 1 # snippets create and delete files and some separate tests create/delete the same files

- name: "Snippet IntelLLVM"
compiler: "intel"
build: snippet
build_type: Release
test_threads: 1 # snippets create and delete files and some separate tests create/delete the same files
cxx_flags: "-fp-model=strict"

- name: "Performance clang17 libc++"
compiler: "clang-17"
build: performance
Expand All @@ -61,6 +68,13 @@ jobs:
build_type: Release
test_threads: 2

- name: "Performance IntelLLVM"
compiler: "intel"
build: performance
build_type: Release
test_threads: 2
cxx_flags: "-fp-model=strict"

- name: "Header clang17 libc++"
compiler: "clang-17"
build: header
Expand Down Expand Up @@ -96,6 +110,7 @@ jobs:
fetch-depth: 1

- name: Install CMake
if: contains(matrix.compiler, 'intel') == false
uses: seqan/actions/setup-cmake@main
with:
cmake: 3.16.9
Expand Down
20 changes: 11 additions & 9 deletions include/seqan3/io/detail/magic_header.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
#pragma once

#include <array>
#include <bit>
#include <span>
#include <string>
#include <type_traits>
#include <vector>

#include <seqan3/core/detail/template_inspection.hpp>
#include <seqan3/utility/concept.hpp>
#include <seqan3/utility/detail/to_little_endian.hpp>
#include <seqan3/utility/type_pack/traits.hpp>

namespace seqan3::detail
Expand Down Expand Up @@ -97,14 +97,16 @@ struct bgzf_compression
static_assert(std::equality_comparable_with<char_t, char>,
"The given char type of the span must be comparable with char.");

return (header[0] == magic_header[0] && // GZ_ID1
header[1] == magic_header[1] && // GZ_ID2
header[2] == magic_header[2] && // GZ_CM
(header[3] & magic_header[3]) != 0 && // FLG_FEXTRA
to_little_endian(*reinterpret_cast<uint16_t const *>(&header[10])) == magic_header[10] && // BGZF_ID1
header[12] == magic_header[12] && // BGZF_ID2
header[13] == magic_header[13] && // BGZF_SLEN
to_little_endian(*reinterpret_cast<uint16_t const *>(&header[14])) == magic_header[14]); // BGZF_XLEN
static constexpr auto id1_pos = std::endian::native == std::endian::little ? 10 : 11;

return (header[0] == magic_header[0] && // GZ_ID1
header[1] == magic_header[1] && // GZ_ID2
header[2] == magic_header[2] && // GZ_CM
(header[3] & magic_header[3]) != 0 && // FLG_FEXTRA
header[id1_pos] == magic_header[10] && // BGZF_ID1
header[12] == magic_header[12] && // BGZF_ID2
header[13] == magic_header[13] && // BGZF_SLEN
header[id1_pos + 4] == magic_header[14]); // BGZF_XLEN
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ void seqan2_affine_dna4_parallel(benchmark::State & state)
BENCHMARK_TEMPLATE(seqan2_affine_dna4_parallel, score)->UseRealTime();
#endif // SEQAN3_HAS_SEQAN2

// Crashes with libc++
#if defined(SEQAN3_HAS_SEQAN2) && defined(_OPENMP) && !defined(_LIBCPP_VERSION)
// Crashes with libc++ or IntelLLVM
#if defined(SEQAN3_HAS_SEQAN2) && defined(_OPENMP) && !defined(_LIBCPP_VERSION) && !defined(__INTEL_LLVM_COMPILER)
template <typename result_t>
void seqan2_affine_dna4_omp_for(benchmark::State & state)
{
Expand Down Expand Up @@ -199,7 +199,7 @@ void seqan2_affine_dna4_omp_for(benchmark::State & state)

BENCHMARK_TEMPLATE(seqan2_affine_dna4_omp_for, score)->UseRealTime();
BENCHMARK_TEMPLATE(seqan2_affine_dna4_omp_for, trace)->UseRealTime();
#endif // defined(SEQAN3_HAS_SEQAN2) && defined(_OPENMP) && !defined(_LIBCPP_VERSION)
#endif // defined(SEQAN3_HAS_SEQAN2) && defined(_OPENMP) && !defined(_LIBCPP_VERSION) && !defined(__INTEL_LLVM_COMPILER)

// ============================================================================
// instantiate tests
Expand Down
4 changes: 3 additions & 1 deletion test/seqan3-test.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ cmake_minimum_required (VERSION 3.10)
# require SeqAn3 package
find_package (SeqAn3 REQUIRED HINTS ${CMAKE_CURRENT_LIST_DIR}/../build_system)

include (CheckCXXCompilerFlag)
include (CheckCXXSourceCompiles)
include (FindPackageHandleStandardArgs)
include (FindPackageMessage)
Expand Down Expand Up @@ -80,7 +81,8 @@ if (NOT TARGET seqan3::test::performance)
# std::views::join is experimental in libc++
target_compile_definitions (seqan3_test_performance INTERFACE _LIBCPP_ENABLE_EXPERIMENTAL)

if (SEQAN3_BENCHMARK_ALIGN_LOOPS)
check_cxx_compiler_flag ("-falign-loops=32" SEQAN3_HAS_FALIGN_LOOPS)
if (SEQAN3_BENCHMARK_ALIGN_LOOPS AND SEQAN3_HAS_FALIGN_LOOPS)
target_compile_options (seqan3_test_performance INTERFACE "-falign-loops=32")
endif ()

Expand Down
Loading