Skip to content
Open
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
2 changes: 1 addition & 1 deletion .ci/copy_headers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -ex
mkdir ../build
cd ../build
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -Dall=On -Dtesting=On -Dx11=Off -Dalien=Off \
-Dcuda=Off -Dtmva-gpu=Off -Dveccore=Off ../root
-Dcuda=Off -Dtmva-gpu=Off ../root
# We need to prebuild a minimal set of targets which are responsible for header copy
# or generation.
make -j4 move_headers intrinsics_gen clang-tablegen-targets ClangDriverOptions \
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/root-ci-config/buildconfig/global.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ builtin_openui5=ON
builtin_pcre=OFF
builtin_tbb=OFF
builtin_unuran=OFF
builtin_vc=OFF
builtin_vdt=OFF
builtin_veccore=OFF
builtin_xrootd=OFF
builtin_xxhash=OFF
builtin_zeromq=ON
Expand Down Expand Up @@ -97,9 +95,7 @@ tmva=ON
unfold=ON
unuran=ON
uring=OFF
vc=OFF
vdt=ON
veccore=OFF
vecgeom=OFF
webgui=ON
win_broken_tests=OFF
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ builtin_pcre=ON
builtin_tbb=ON
builtin_unuran=ON
builtin_vdt=ON
builtin_veccore=ON
builtin_xrootd=ON
builtin_xxhash=ON
builtin_zeromq=ON
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/root-ci-config/buildconfig/mac14.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ builtin_openssl=ON
builtin_pcre=ON
builtin_tbb=ON
builtin_unuran=ON
builtin_vc=ON
builtin_vdt=ON
builtin_veccore=ON
builtin_xrootd=ON
builtin_xxhash=ON
builtin_zeromq=ON
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/root-ci-config/buildconfig/mac15.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ builtin_pcre=ON
builtin_tbb=ON
builtin_unuran=ON
builtin_vdt=ON
builtin_veccore=ON
builtin_xrootd=ON
builtin_xxhash=ON
builtin_zeromq=ON
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/root-ci-config/buildconfig/mac26.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ builtin_pcre=ON
builtin_tbb=ON
builtin_unuran=ON
builtin_vdt=ON
builtin_veccore=ON
builtin_xrootd=ON
builtin_xxhash=ON
builtin_zeromq=ON
Expand Down
14 changes: 14 additions & 0 deletions README/ReleaseNotes/v640/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,20 @@ This change affects the following classes: `TFile`, `TMapFile`, `TMemFile`, `TD

## Math

### Migration from Vc to `std::simd`

ROOT has migrated its internal SIMD usage from **Vc** to `std::simd` where applicable.

This change affects:
* The vectorized backend of **TFormula** and **TMath** interfaces that are available via VecCore when building ROOT with `veccore=ON`.
* Users who instantiate the GenVector classes with Vc SIMD types like `Vc::double_v`. If you rely on these types, your code must be update to use `std::simd` instead.

* On **Windows and Apple silicon platforms**, this change has no practical impact: Vc-based SIMD via VecCore was not supported by ROOT on these platforms, and ROOT will also not try to use `std::simd` now on these platforms.

* TFormula and TMath attempt to use `std::simd` when compiled with **Clang** (any supported version) or **GCC ≥ 9**. On other compilers or configurations, SIMD support is disabled. This affects in particular the default compiler on RHEL/AlmaLinux 8 (GCC 8.5).

* As a consequence of this migration, the build options **vc** and **builtin_vc** are now deprecated and ignored. Their usage will cause CMake configuration errors starting from ROOT 6.42.

## RooFit

## RDataFrame
Expand Down
16 changes: 8 additions & 8 deletions cmake/modules/RootBuildOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,7 @@ ROOT_BUILD_OPTION(builtin_pcre OFF "Build bundled copy of PCRE")
ROOT_BUILD_OPTION(builtin_png OFF "Build bundled copy of libpng")
ROOT_BUILD_OPTION(builtin_tbb OFF "Build TBB internally (requires network)")
ROOT_BUILD_OPTION(builtin_unuran OFF "Build bundled copy of unuran")
ROOT_BUILD_OPTION(builtin_vc OFF "Build Vc internally (requires network)")
ROOT_BUILD_OPTION(builtin_vdt OFF "Build VDT internally (requires network)")
ROOT_BUILD_OPTION(builtin_veccore OFF "Build VecCore internally (requires network)")
ROOT_BUILD_OPTION(builtin_xrootd OFF "Build XRootD internally (requires network)")
ROOT_BUILD_OPTION(builtin_xxhash OFF "Build bundled copy of xxHash")
ROOT_BUILD_OPTION(builtin_zeromq OFF "Build ZeroMQ internally (requires network)")
Expand Down Expand Up @@ -180,9 +178,7 @@ ROOT_BUILD_OPTION(unfold OFF "Enable the unfold package [GPL]")
ROOT_BUILD_OPTION(unuran OFF "Enable support for UNURAN (package for generating non-uniform random numbers) [GPL]")
ROOT_BUILD_OPTION(uring OFF "Enable support for io_uring (requires liburing and Linux kernel >= 5.1)")
ROOT_BUILD_OPTION(use_gsl_cblas ON "Use the CBLAS library from GSL instead of finding a more optimized BLAS library automatically with FindBLAS (the GSL CBLAS is less performant but more portable)")
ROOT_BUILD_OPTION(vc OFF "Enable support for Vc (SIMD Vector Classes for C++)")
ROOT_BUILD_OPTION(vdt ON "Enable support for VDT (fast and vectorisable mathematical functions)")
ROOT_BUILD_OPTION(veccore OFF "Enable support for VecCore SIMD abstraction library")
ROOT_BUILD_OPTION(vecgeom OFF "Enable support for VecGeom vectorized geometry library")
ROOT_BUILD_OPTION(webgui ON "Build Web-based UI components of ROOT")
ROOT_BUILD_OPTION(win_broken_tests OFF "Enable broken tests on Windows")
Expand Down Expand Up @@ -253,9 +249,7 @@ if(all)
set(tmva-pymva_defvalue ON)
set(tmva-rmva_defvalue ON)
set(unuran_defvalue ON)
set(vc_defvalue ON)
set(vdt_defvalue ON)
set(veccore_defvalue ON)
set(vecgeom_defvalue ON)
set(x11_defvalue ON)
set(xml_defvalue ON)
Expand Down Expand Up @@ -295,9 +289,7 @@ if(builtin_all)
set(builtin_png_defvalue ON)
set(builtin_tbb_defvalue ON)
# set(builtin_unuran_defvalue ON) (GPL)
set(builtin_vc_defvalue ON)
set(builtin_vdt_defvalue ON)
set(builtin_veccore_defvalue ON)
set(builtin_xrootd_defvalue ON)
set(builtin_xxhash_defvalue ON)
set(builtin_zeromq_defvalue ON)
Expand Down Expand Up @@ -415,6 +407,14 @@ if(DEFINED rpath)
"") # empty line at the end to make the deprecation message more visible
endif()

foreach(opt vc builtin_vc veccore builtin_veccore)
if(${opt})
message(DEPRECATION ">>> Option '${opt}' is deprecated and ignored."
"ROOT now uses std::experimental::simd for the vectorized TFormula and TMath classes when available (on Linux when compiling with C++20 or higher)."
"Using this option will result in configuration errors in ROOT 6.42.")
endif()
endforeach()

foreach(opt minuit2_mpi)
if(${opt})
message(WARNING "The option '${opt}' can only be used to minimise thread-safe functions in Minuit2. It cannot be used for Histogram/Graph fitting and for RooFit. If you want to use Minuit2 with MPI support, it is better to build Minuit2 as a standalone library.")
Expand Down
12 changes: 4 additions & 8 deletions cmake/modules/RootConfiguration.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -365,20 +365,16 @@ if(cocoa)
else()
set(hascocoa undef)
endif()
if(vc)
set(hasvc define)
else()
set(hasvc undef)
endif()
if(vdt)
set(hasvdt define)
else()
set(hasvdt undef)
endif()
if(veccore)
set(hasveccore define)
# Assume std::experimental::simd is available on Linux if we build with C++20 on Linux
if(WIN32 OR APPLE OR CMAKE_CXX_STANDARD LESS 20)
set(hasstdsimd undef)
else()
set(hasveccore undef)
set(hasstdsimd define)
endif()
if(dataframe)
set(hasdataframe define)
Expand Down
194 changes: 0 additions & 194 deletions cmake/modules/SearchInstalledSoftware.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1365,194 +1365,6 @@ if(builtin_tbb)
set(TBB_TARGET TBB)
endif()

#---Check for Vc---------------------------------------------------------------------
if(builtin_vc)
unset(Vc_FOUND)
unset(Vc_FOUND CACHE)
set(vc ON CACHE BOOL "Enabled because builtin_vc requested (${vc_description})" FORCE)
elseif(vc)
if(fail-on-missing)
find_package(Vc 1.4.4 CONFIG QUIET REQUIRED)
else()
find_package(Vc 1.4.4 CONFIG QUIET)
if(NOT Vc_FOUND)
message(STATUS "Vc library not found, support for it disabled.")
message(STATUS "Please enable the option 'builtin_vc' to build Vc internally.")
set(vc OFF CACHE BOOL "Disabled because Vc not found (${vc_description})" FORCE)
endif()
endif()
if(Vc_FOUND)
set_property(DIRECTORY APPEND PROPERTY INCLUDE_DIRECTORIES ${Vc_INCLUDE_DIR})
BUILD_ROOT_INCLUDE_PATH("${Vc_INCLUDE_DIR}")
endif()
endif()

if(vc AND NOT Vc_FOUND)
ROOT_CHECK_CONNECTION_AND_DISABLE_OPTION("vc")
endif()

if(vc AND NOT Vc_FOUND)
set(Vc_VERSION "1.4.4")
set(Vc_PROJECT "Vc-${Vc_VERSION}")
set(Vc_SRC_URI "${lcgpackages}/${Vc_PROJECT}.tar.gz")
set(Vc_DESTDIR "${CMAKE_BINARY_DIR}/externals")
set(Vc_ROOTDIR "${Vc_DESTDIR}/${CMAKE_INSTALL_PREFIX}")
set(Vc_LIBNAME "${CMAKE_STATIC_LIBRARY_PREFIX}Vc${CMAKE_STATIC_LIBRARY_SUFFIX}")
set(Vc_LIBRARY "${Vc_ROOTDIR}/lib/${Vc_LIBNAME}")

ExternalProject_Add(VC
URL ${Vc_SRC_URI}
URL_HASH SHA256=5933108196be44c41613884cd56305df320263981fe6a49e648aebb3354d57f3
BUILD_IN_SOURCE 0
BUILD_BYPRODUCTS ${Vc_LIBRARY}
LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1 LOG_OUTPUT_ON_FAILURE 1
CMAKE_ARGS -G ${CMAKE_GENERATOR}
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-DCMAKE_CXX_FLAGS=${ROOT_EXTERNAL_CXX_FLAGS}
-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
INSTALL_COMMAND env DESTDIR=${Vc_DESTDIR} ${CMAKE_COMMAND} --build . --target install
TIMEOUT 600
)

set(VC_TARGET Vc)
set(Vc_LIBRARIES Vc)
set(Vc_INCLUDE_DIR ${Vc_ROOTDIR}/include)
set(Vc_CMAKE_MODULES_DIR ${Vc_ROOTDIR}/lib/cmake/Vc)

add_library(VcExt STATIC IMPORTED)
set_property(TARGET VcExt PROPERTY IMPORTED_LOCATION ${Vc_LIBRARY})
add_dependencies(VcExt VC)

add_library(Vc INTERFACE)
target_include_directories(Vc SYSTEM BEFORE INTERFACE $<BUILD_INTERFACE:${Vc_INCLUDE_DIR}>)
target_link_libraries(Vc INTERFACE VcExt)

find_package_handle_standard_args(Vc
FOUND_VAR Vc_FOUND
REQUIRED_VARS Vc_INCLUDE_DIR Vc_LIBRARIES Vc_CMAKE_MODULES_DIR
VERSION_VAR Vc_VERSION)

# FIXME: This is a workaround to let ROOT find the headers at runtime if
# they are in the build directory. This is necessary until we decide how to
# treat externals with headers used by ROOT
if(NOT EXISTS ${CMAKE_BINARY_DIR}/include/Vc)
if (NOT EXISTS ${CMAKE_BINARY_DIR}/include)
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/include)
endif()
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
${Vc_INCLUDE_DIR}/Vc ${CMAKE_BINARY_DIR}/include/Vc)
endif()
# end of workaround

install(DIRECTORY ${Vc_ROOTDIR}/ DESTINATION ".")
endif()

if(Vc_FOUND)
# Missing from VcConfig.cmake
set(Vc_INCLUDE_DIRS ${Vc_INCLUDE_DIR})
endif()

#---Check for VecCore--------------------------------------------------------------------
if(builtin_veccore)
unset(VecCore_FOUND)
unset(VecCore_FOUND CACHE)
set(veccore ON CACHE BOOL "Enabled because builtin_veccore requested (${veccore_description})" FORCE)
elseif(veccore)
if(vc)
set(VecCore_COMPONENTS Vc)
endif()
if(fail-on-missing)
find_package(VecCore 0.4.2 CONFIG QUIET REQUIRED COMPONENTS ${VecCore_COMPONENTS})
else()
find_package(VecCore 0.4.2 CONFIG QUIET COMPONENTS ${VecCore_COMPONENTS})
if(NOT VecCore_FOUND)
ROOT_CHECK_CONNECTION("veccore=OFF")
if(NO_CONNECTION)
message(STATUS "VecCore not found and no internet connection, disabling the 'veccore' option")
set(veccore OFF CACHE BOOL "Disabled because not found and No internet connection" FORCE)
else()
message(STATUS "VecCore not found, switching on 'builtin_veccore' option.")
set(builtin_veccore ON CACHE BOOL "Enabled because veccore requested and not found externally (${builtin_veccore_description})" FORCE)
endif()
endif()
endif()
if(VecCore_FOUND)
set_property(DIRECTORY APPEND PROPERTY INCLUDE_DIRECTORIES ${VecCore_INCLUDE_DIRS})
endif()
endif()

if(builtin_veccore)
ROOT_CHECK_CONNECTION_AND_DISABLE_OPTION("builtin_veccore")
endif()

if(builtin_veccore)
set(VecCore_VERSION "0.8.2")
set(VecCore_PROJECT "VecCore-${VecCore_VERSION}")
set(VecCore_SRC_URI "${lcgpackages}/${VecCore_PROJECT}.tar.gz")
set(VecCore_DESTDIR "${CMAKE_BINARY_DIR}/externals")
set(VecCore_ROOTDIR "${VecCore_DESTDIR}/${CMAKE_INSTALL_PREFIX}")

ExternalProject_Add(VECCORE
URL ${VecCore_SRC_URI}
URL_HASH SHA256=1268bca92acf00acd9775f1e79a2da7b1d902733d17e283e0dd5e02c41ac9666
BUILD_IN_SOURCE 0
LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1 LOG_OUTPUT_ON_FAILURE 1
CMAKE_ARGS -G ${CMAKE_GENERATOR}
-DBUILD_TESTING=OFF
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-DCMAKE_CXX_FLAGS=${ROOT_EXTERNAL_CXX_FLAGS}
-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
INSTALL_COMMAND env DESTDIR=${VecCore_DESTDIR} ${CMAKE_COMMAND} --build . --target install
TIMEOUT 600
)

set(VECCORE_TARGET VecCore)
set(VecCore_LIBRARIES VecCore)
list(APPEND VecCore_INCLUDE_DIRS ${VecCore_ROOTDIR}/include)

add_library(VecCore INTERFACE)
target_include_directories(VecCore SYSTEM INTERFACE $<BUILD_INTERFACE:${VecCore_ROOTDIR}/include>)
add_dependencies(VecCore VECCORE)

if (Vc_FOUND)
set(VecCore_Vc_FOUND True)
set(VecCore_Vc_DEFINITIONS -DVECCORE_ENABLE_VC)
set(VecCore_Vc_INCLUDE_DIR ${Vc_INCLUDE_DIR})
set(VecCore_Vc_LIBRARIES ${Vc_LIBRARIES})

set(VecCore_DEFINITIONS ${VecCore_Vc_DEFINITIONS})
list(APPEND VecCore_INCLUDE_DIRS ${VecCore_Vc_INCLUDE_DIR})
set(VecCore_LIBRARIES ${VecCore_LIBRARIES} ${Vc_LIBRARIES})
target_link_libraries(VecCore INTERFACE ${Vc_LIBRARIES})
endif()

find_package_handle_standard_args(VecCore
FOUND_VAR VecCore_FOUND
REQUIRED_VARS VecCore_INCLUDE_DIRS VecCore_LIBRARIES
VERSION_VAR VecCore_VERSION)

# FIXME: This is a workaround to let ROOT find the headers at runtime if
# they are in the build directory. This is necessary until we decide how to
# treat externals with headers used by ROOT
if(NOT EXISTS ${CMAKE_BINARY_DIR}/include/VecCore)
if (NOT EXISTS ${CMAKE_BINARY_DIR}/include)
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/include)
endif()
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
${VecCore_ROOTDIR}/include/VecCore ${CMAKE_BINARY_DIR}/include/VecCore)
endif()
# end of workaround

install(DIRECTORY ${VecCore_ROOTDIR}/ DESTINATION ".")
endif()

if(builtin_vdt)
ROOT_CHECK_CONNECTION_AND_DISABLE_OPTION("builtin_vdt")
endif()
Expand Down Expand Up @@ -1626,12 +1438,6 @@ endif()
if (vecgeom)
message(STATUS "Looking for VecGeom")
find_package(VecGeom 1.2 CONFIG)
if(builtin_veccore)
message(WARNING "ROOT must be built against the VecCore installation that was used to build VecGeom; builtin_veccore cannot be used. Option VecGeom will be disabled.")
set(vecgeom OFF CACHE BOOL "Disabled because non-builtin VecGeom specified but its VecCore cannot be found" FORCE)
elseif(builtin_veccore AND fail-on-missing)
message(SEND_ERROR "ROOT must be built against the VecCore installation that was used to build VecGeom; builtin_veccore cannot be used. Ensure that builtin_veccore option is OFF.")
endif()
if(NOT VecGeom_FOUND )
if(fail-on-missing)
message(SEND_ERROR "VecGeom not found. Ensure that the installation of VecGeom is in the CMAKE_PREFIX_PATH")
Expand Down
9 changes: 1 addition & 8 deletions config/RConfigure.in
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@
#@hasxft@ R__HAS_XFT /**/
#@hasclad@ R__HAS_CLAD /**/
#@hascocoa@ R__HAS_COCOA /**/
#@hasvc@ R__HAS_VC /**/
#@hasvdt@ R__HAS_VDT /**/
#@hasveccore@ R__HAS_VECCORE /**/
#@hasstdsimd@ R__HAS_STD_SIMD /**/
#@usecxxmodules@ R__USE_CXXMODULES /**/
#@uselibc++@ R__USE_LIBCXX /**/
#@has_found_attribute_always_inline@ R__HAS_ATTRIBUTE_ALWAYS_INLINE /**/
Expand All @@ -54,12 +53,6 @@
#@use_less_includes@ R__LESS_INCLUDES /**/
#define R__HARDWARE_INTERFERENCE_SIZE @hardwareinterferencesize@ /*Determined at CMake configure to be stable across all TUs*/

#if defined(R__HAS_VECCORE) && defined(R__HAS_VC)
#ifndef VECCORE_ENABLE_VC
#define VECCORE_ENABLE_VC
#endif
#endif

#@uselz4@ R__HAS_DEFAULT_LZ4 /**/
#@usezlib@ R__HAS_DEFAULT_ZLIB /**/
#@uselzma@ R__HAS_DEFAULT_LZMA /**/
Expand Down
Loading
Loading