From 0bdff210fe1f5daaa52540487b47139492037472 Mon Sep 17 00:00:00 2001 From: Thomas-Otavio Peulen Date: Thu, 1 Feb 2024 18:26:45 +0100 Subject: [PATCH 1/5] Build commits to develop --- .github/workflows/conda-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/conda-build.yml b/.github/workflows/conda-build.yml index a9b294a..fb36e1e 100644 --- a/.github/workflows/conda-build.yml +++ b/.github/workflows/conda-build.yml @@ -3,7 +3,7 @@ name: Build Conda Recipe on: push: branches: - - development # You can change this to the branch you want to trigger on + - develop # You can change this to the branch you want to trigger on jobs: build-linux: From 62d95fda6b9149f1559ab62ff8f8ef8e3e846898 Mon Sep 17 00:00:00 2001 From: Thomas-Otavio Peulen Date: Thu, 1 Feb 2024 18:50:13 +0100 Subject: [PATCH 2/5] Remove py3.11 build --- .github/workflows/conda-build.yml | 2 +- conda-recipe/meta.yaml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/conda-build.yml b/.github/workflows/conda-build.yml index fb36e1e..565f9d6 100644 --- a/.github/workflows/conda-build.yml +++ b/.github/workflows/conda-build.yml @@ -13,7 +13,7 @@ jobs: fail-fast: false matrix: os: ["ubuntu-latest", "macos-latest", "windows-latest"] - python-version: ["3.8", "3.11"] + python-version: ["3.8", "3.10"] steps: - name: Checkout Repository uses: actions/checkout@v2 diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index 6c759f0..6af2827 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -38,7 +38,6 @@ requirements: - python - {{ pin_compatible('imp', max_pin='x.x') }} - boost-cpp -# - libmongoc - pandas - mdtraj - tqdm From e01037d55e2a33732927010edbff97cb5ad526e2 Mon Sep 17 00:00:00 2001 From: Thomas-Otavio Peulen Date: Sat, 3 Feb 2024 18:19:08 +0100 Subject: [PATCH 3/5] Remove old code --- CMakeLists.txt | 5 ----- 1 file changed, 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f9b3f51..7019668 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -72,11 +72,6 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) imp_build_module(${CMAKE_SOURCE_DIR} bff) -# # libmongoc -# ########################### -# FIND_PACKAGE (mongoc-1.0 1.7 REQUIRED) -# LINK_LIBRARIES (mongo::mongoc_shared) - else() INCLUDE(ModuleBuild.cmake) endif() From 5348c471c7bd4c16856000e0d243b3355fc6c567 Mon Sep 17 00:00:00 2001 From: Thomas-Otavio Peulen Date: Sat, 3 Feb 2024 18:19:23 +0100 Subject: [PATCH 4/5] Clean up and add AVX option --- Setup.cmake | 44 +++++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/Setup.cmake b/Setup.cmake index bff712e..ea31531 100644 --- a/Setup.cmake +++ b/Setup.cmake @@ -1,21 +1,27 @@ # SIMD ########################### -IF(NOT APPLE) - IF(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64") - SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/dependency) - INCLUDE(simd) - IF(${AVX_FOUND}) - MESSAGE("BUILD WITH SIMD") - ADD_DEFINITIONS(-DWITH_AVX) - IF (MSVC) - # https://devblogs.microsoft.com/cppblog/simd-extension-to-c-openmp-in-visual-studio/ - # /Oi is for intrinsics - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:AVX /Oi") - ELSE(MSVC) - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mavx -mfma") - ENDIF (MSVC) - ELSE(${AVX_FOUND}) - UNSET(WITH_AVX) - ENDIF(${AVX_FOUND}) - ENDIF() -ENDIF() + +option(WITH_AVX "Enable AVX support" OFF) + +if (WITH_AVX AND NOT APPLE AND CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64") + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/dependency) + include(simd) + + if (${AVX_FOUND}) + message("BUILD WITH SIMD") + add_definitions(-DWITH_AVX) + + if (MSVC) + # https://devblogs.microsoft.com/cppblog/simd-extension-to-c-openmp-in-visual-studio/ + # /Oi is for intrinsics + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:AVX /Oi") + else (MSVC) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mavx -mfma") + endif (MSVC) + else (${AVX_FOUND}) + unset(WITH_AVX) + endif (${AVX_FOUND}) +else () + # AVX only on x86_64 and not on Apple + unset(WITH_AVX) +endif() \ No newline at end of file From 011f60c892e59a4ea9564446540b41421c1441ca Mon Sep 17 00:00:00 2001 From: Thomas-Otavio Peulen Date: Sat, 3 Feb 2024 18:32:30 +0100 Subject: [PATCH 5/5] Add option to build without AVX --- Setup.cmake | 1 + conda-recipe/bld.bat | 1 + conda-recipe/build.sh | 2 +- conda-recipe/meta.yaml | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Setup.cmake b/Setup.cmake index ea31531..6fd1929 100644 --- a/Setup.cmake +++ b/Setup.cmake @@ -23,5 +23,6 @@ if (WITH_AVX AND NOT APPLE AND CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64") endif (${AVX_FOUND}) else () # AVX only on x86_64 and not on Apple + message("BUILD WITHOUT SIMD") unset(WITH_AVX) endif() \ No newline at end of file diff --git a/conda-recipe/bld.bat b/conda-recipe/bld.bat index b01de11..7410518 100644 --- a/conda-recipe/bld.bat +++ b/conda-recipe/bld.bat @@ -29,6 +29,7 @@ cmake -G Ninja .. ^ -DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%" ^ -DCMAKE_INSTALL_LIBDIR=bin ^ -DCMAKE_INSTALL_PYTHONDIR="%SP_DIR%" ^ + -DWITH_AVX=OFF ^ -DCMAKE_CXX_FLAGS="/DBOOST_ALL_DYN_LINK /EHsc /DWIN32 /DMSMPI_NO_DEPRECATE_20 /bigobj /DBOOST_ZLIB_BINARY=kernel32" if errorlevel 1 exit 1 diff --git a/conda-recipe/build.sh b/conda-recipe/build.sh index 64454cd..0546ff3 100644 --- a/conda-recipe/build.sh +++ b/conda-recipe/build.sh @@ -2,7 +2,7 @@ mkdir build cd build -cmake .. -DCMAKE_BUILD_TYPE=Release -G Ninja -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_PREFIX_PATH=$PREFIX -DCMAKE_INSTALL_PREFIX=$PREFIX +cmake .. -DCMAKE_BUILD_TYPE=Release -G Ninja -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_PREFIX_PATH=$PREFIX -DCMAKE_INSTALL_PREFIX=$PREFIX -DWITH_AVX=OFF ninja install -k 0 -j 4 # Copy examples diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index 6af2827..306f544 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -1,4 +1,4 @@ -{% set version = "0.14.2" %} +{% set version = "0.14.3" %} package: name: imp.bff