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

latest from CODA-OSS and NITRO #702

Merged
merged 55 commits into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
10eded0
latest from CODA-OSS and NITRO
Aug 21, 2023
1c1e440
Merge commit 'c57aa2691a9635f55f5c604723d61ee495c59ed2' into develop/…
Aug 21, 2023
c57aa26
Squashed 'externals/coda-oss/' changes from e87c32b4d..168cbae01
Aug 21, 2023
83ec173
Squashed 'externals/nitro/' changes from c8ecbe9ae..547d0aa9f
Aug 21, 2023
238a6fc
Merge commit '83ec173c23943efe4e24689aad8d744aad69749c' into develop/…
Aug 21, 2023
209b4e3
Merge branch 'main' into develop/sync_externals
Aug 21, 2023
40827a7
CRLF
Aug 21, 2023
62fc405
Merge branch 'main' into develop/sync_externals
Aug 25, 2023
e509306
latest from CODA-OSS and NITRO
Aug 25, 2023
8a996f2
Merge commit '9c6572a9e7ccc4d54e79a6f7ebc373b4414e7df9' into develop/…
Aug 25, 2023
9c6572a
Squashed 'externals/coda-oss/' changes from 168cbae01..22e050207
Aug 25, 2023
0584296
Merge commit '2928617bd4525f20316de415f07b6cf3d88e4878' into develop/…
Aug 25, 2023
2928617
Squashed 'externals/nitro/' changes from 547d0aa9f..e7ea728ec
Aug 25, 2023
e4b5c45
Merge branch 'main' into develop/sync_externals
Aug 28, 2023
02e1917
str::format changes from CODA-OSS
Aug 28, 2023
bbc8367
latest from CODA-OSS
Aug 28, 2023
cb1a2c9
Merge commit '6c23d5de45eadac47028f968db108e4161666aa1' into develop/…
Aug 28, 2023
6c23d5d
Squashed 'externals/coda-oss/' changes from 22e050207..bf7ae4a71
Aug 28, 2023
a2de0b5
Squashed 'externals/nitro/' changes from e7ea728ec..fc1f59799
Aug 28, 2023
48895c9
Merge commit 'a2de0b5279a6763f39f6f34536eb6f680e98d146' into develop/…
Aug 28, 2023
7de4dcf
Merge branch 'main' into develop/sync_externals
Aug 29, 2023
c4dcdba
toString() changes from CODA-OSS
Aug 29, 2023
69b0fb4
Merge commit 'd982f60807e49f64d019eb973639ba555e9d7942' into develop/…
Aug 29, 2023
d982f60
Squashed 'externals/coda-oss/' changes from bf7ae4a71..8dee6f7a6
Aug 29, 2023
8538e1d
Squashed 'externals/nitro/' changes from fc1f59799..72209535d
Aug 29, 2023
3441e80
Merge commit '8538e1d222d56604050582bd2b0f128dda51f925' into develop/…
Aug 29, 2023
6fbe8b8
Merge commit 'a5d077e25b3d48901ed9615ccec88e4aaebbfce3' into develop/…
Aug 29, 2023
a5d077e
Squashed 'externals/nitro/' changes from 72209535d..e488297c3
Aug 29, 2023
a4a755c
Merge branch 'main' into develop/sync_externals
Aug 29, 2023
baeaa33
latest from CODA-OSS and NITRO
Aug 29, 2023
4ee925c
Merge commit 'bb4f3dc0f7aeb187acf39d6cae5e96b711bb4dc8' into develop/…
Aug 29, 2023
bb4f3dc
Squashed 'externals/coda-oss/' changes from 8dee6f7a6..00e2dd928
Aug 29, 2023
369de34
Squashed 'externals/nitro/' changes from e488297c3..72cd86cbf
Aug 29, 2023
8cd5e77
Merge commit '369de34a1c027a68c3f7d35be60c091e828d6417' into develop/…
Aug 29, 2023
7a363b4
Merge branch 'main' into develop/sync_externals
Sep 12, 2023
a681ebd
latest from CODA-OSS
Sep 12, 2023
3cbdfb9
latest from NITRO
Sep 12, 2023
a9e87fd
Merge commit '5ab880228dfd4d6fd1b2b11630fd414b394d292b' into develop/…
Sep 12, 2023
5ab8802
Squashed 'externals/coda-oss/' changes from 00e2dd928..333b91024
Sep 12, 2023
a5674e7
Squashed 'externals/nitro/' changes from 72cd86cbf..49f6338d2
Sep 12, 2023
8abc353
Merge commit 'a5674e74433a563a11e4bbdaae3803673dff99f1' into develop/…
Sep 12, 2023
3c13778
build after CODA-OSS updates
Sep 12, 2023
a537665
Merge commit 'f12914abbb5d7014dd904fd6319a3edd5ba788cd' into develop/…
Sep 12, 2023
f12914a
Squashed 'externals/coda-oss/' changes from 333b91024..c92a55d7c
Sep 12, 2023
8041684
Squashed 'externals/nitro/' changes from 49f6338d2..e418beceb
Sep 12, 2023
3738c91
Merge commit '804168483daa854eafff59910e56704e1282ed40' into develop/…
Sep 12, 2023
669feb7
Merge branch 'main' into develop/sync_externals
Sep 27, 2023
a018099
latest from CODA-OSS
Sep 27, 2023
15e3d74
Merge commit '1ee90a9a723449a28da2ccb6ff615163c6283a13' into develop/…
Sep 27, 2023
1ee90a9
Squashed 'externals/coda-oss/' changes from c92a55d7c..369737085
Sep 27, 2023
aa3c088
Merge branch 'main' into develop/sync_externals
Oct 2, 2023
68bb88a
latest from CODA-OSS and NITRO
Oct 2, 2023
11d8ec2
Squashed 'externals/coda-oss/' changes from 369737085..95ff879ba
Oct 2, 2023
151eb4f
Merge commit '11d8ec293ed98a2fa5581b2317f3389e34565547' into develop/…
Oct 2, 2023
909d786
Merge branch 'main' into develop/sync_externals
Oct 2, 2023
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
10 changes: 6 additions & 4 deletions externals/coda-oss/.github/workflows/build_unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ jobs:
os: [windows-latest]
platform: [x64]
configuration: [Debug] # Debug turns on more compiler warnings
name: ${{ matrix.os }}-msbuild
avx: [AVX2, AVX512F]
name: ${{ matrix.os }}-${{ matrix.avx }}-msbuild
runs-on: ${{ matrix.os }}

steps:
Expand All @@ -68,7 +69,7 @@ jobs:
ls env:
mkdir out
cd out
cmake .. -DCMAKE_INSTALL_PREFIX=install\${{ matrix.platform }}-${{ matrix.configuration }} -DENABLE_PYTHON=OFF
cmake .. -DCMAKE_INSTALL_PREFIX=install\${{ matrix.platform }}-${{ matrix.configuration }} -DENABLE_PYTHON=OFF -DENABLE_${{ matrix.avx }}=ON
- name: build
run: |
cd out
Expand Down Expand Up @@ -131,14 +132,15 @@ jobs:
matrix:
os: [ubuntu-latest]
configuration: [Debug, Release]
name: ${{ matrix.os }}-${{ matrix.configuration }}-CMake
avx: [AVX2, AVX512F]
name: ${{ matrix.os }}-${{ matrix.configuration }}-${{ matrix.avx }}-CMake
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: configure
run: |
mkdir out && cd out
cmake .. -DENABLE_PYTHON=OFF -DENABLE_ASAN=ON
cmake .. -DENABLE_PYTHON=OFF -DENABLE_ASAN=ON -DENABLE_${{ matrix.avx }}=ON
- name: build
run: |
cd out
Expand Down
11 changes: 0 additions & 11 deletions externals/coda-oss/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,8 @@ if (${CMAKE_PROJECT_NAME} STREQUAL coda-oss)
if (MSVC)
add_compile_options(/WX) # warnings as errors
add_compile_options(/MP) # multi-processor compile

if (ENABLE_ASAN)
# https://docs.microsoft.com/en-us/cpp/sanitizers/asan?view=msvc-160
add_compile_options(/fsanitize=address)
endif()
elseif (UNIX)
add_compile_options(-Werror) # warnings as errors

if (ENABLE_ASAN)
# https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html
add_compile_options(-fsanitize=address)
add_link_options(-fsanitize=address)
endif()
endif()

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
Expand Down
37 changes: 37 additions & 0 deletions externals/coda-oss/cmake/CodaBuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,22 @@ macro(coda_initialize_build)
# This should probably be replaced by GenerateExportHeader
#set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD TRUE)

if (ENABLE_ASAN)
# https://docs.microsoft.com/en-us/cpp/sanitizers/asan?view=msvc-160
add_compile_options(/fsanitize=address)
endif()

# Note SSE2 is implicitly enabled for x64 builds.
if (ENABLE_AVX2 AND (NOT ENABLE_AVX512F))
# https://learn.microsoft.com/en-us/cpp/build/reference/arch-x86?view=msvc-170
add_compile_options(/arch:AVX2)
endif()
if (ENABLE_AVX512F)
# https://learn.microsoft.com/en-us/cpp/build/reference/arch-x86?view=msvc-170
add_compile_options(/arch:AVX512)
endif()

endif()

# Unix/Linux specific options
Expand All @@ -173,6 +189,27 @@ macro(coda_initialize_build)
-D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64
)

if (ENABLE_ASAN)
# https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html
add_compile_options(-fsanitize=address)
add_link_options(-fsanitize=address)
endif()

# Note SSE2 is implicitly enabled for x64 builds.
if (ENABLE_AVX2 AND (NOT ENABLE_AVX512F))
# https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html
# It doesn't look like GCC has a specific option for AVX2;
# other projects use "haswell"
add_compile_options(-march=haswell)
endif()
if (ENABLE_AVX512F)
# https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html
# It doesn't look like GCC has a specific option for AVX512F;
# other projects use "native" which isn't quite correct.'
add_compile_options(-march=native)
endif()

endif()

# all targets should be installed using this export set
Expand Down
44 changes: 44 additions & 0 deletions externals/coda-oss/modules/c++/avx/unittests/test_m256.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
#include <std/cstddef>

#include <sys/Conf.h>
#include <sys/AbstractOS.h>
#include <avx/extractf.h>
#include <config/compiler_extensions.h>

TEST_CASE(extractf)
{
Expand All @@ -49,8 +51,50 @@ TEST_CASE(extractf)
*/
TEST_SUCCESS;
}

TEST_CASE(test_getSIMDInstructionSet)
{
// This is the reverse of getSIMDInstructionSet(): it uses the macros to generate a value.
constexpr auto simdInstructionSet = sys::getSIMDInstructionSet();
#if __AVX512F__
static_assert(simdInstructionSet == sys::SIMDInstructionSet::AVX512F, "getSIMDInstructionSet()");
#elif __AVX2__
static_assert(simdInstructionSet == sys::SIMDInstructionSet::AVX2, "getSIMDInstructionSet()");
#else
static_assert(simdInstructionSet == sys::SIMDInstructionSet::SSE2, "getSIMDInstructionSet()");
#endif

CODA_OSS_disable_warning_push
#if _MSC_VER
#pragma warning(disable: 4127) // conditional expression is constant
#endif

switch (sys::getSIMDInstructionSet()) // run-time value
{
case sys::SIMDInstructionSet::SSE2:
{
TEST_ASSERT(simdInstructionSet == sys::SIMDInstructionSet::SSE2);
break;
}
case sys::SIMDInstructionSet::AVX2:
{
TEST_ASSERT(simdInstructionSet == sys::SIMDInstructionSet::AVX2);
break;
}
case sys::SIMDInstructionSet::AVX512F:
{
TEST_ASSERT(simdInstructionSet == sys::SIMDInstructionSet::AVX512F);
break;
}
default:
{
TEST_FAIL;
}
}
CODA_OSS_disable_warning_pop
}

TEST_MAIN(
TEST_CHECK(extractf);
TEST_CHECK(test_getSIMDInstructionSet);
)
10 changes: 8 additions & 2 deletions externals/nitro/modules/c/nrt/unittests/test_buffer_adapter.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ TEST_CASE(testReadInBounds)
{
TEST_ASSERT(output[ii] == (char)1);
}

nrt_IOInterface_destruct(&reader);
}

TEST_CASE(testReadPastEnd)
Expand All @@ -63,6 +65,8 @@ TEST_CASE(testReadPastEnd)
nrt_IOInterface_seek(reader, 8, NRT_SEEK_SET, &error);
success = nrt_IOInterface_read(reader, output, sizeof(output), &error);
TEST_ASSERT(!success);

nrt_IOInterface_destruct(&reader);
}

TEST_CASE(testReadOutOfBounds)
Expand All @@ -82,6 +86,8 @@ TEST_CASE(testReadOutOfBounds)
TEST_ASSERT(success != 0);
success = nrt_IOInterface_read(reader, output, sizeof(output), &error);
TEST_ASSERT(!success);

nrt_IOInterface_destruct(&reader);
}

TEST_CASE(testWriteOutOfBounds)
Expand All @@ -99,11 +105,11 @@ TEST_CASE(testWriteOutOfBounds)
TEST_ASSERT(success != 0);
success = nrt_IOInterface_write(writer, input, 4, &error);
TEST_ASSERT(!success);

nrt_IOInterface_destruct(&writer);
}

TEST_MAIN(
(void) argc;
(void) argv;
CHECK(testReadInBounds);
CHECK(testReadPastEnd);
CHECK(testReadOutOfBounds);
Expand Down