Skip to content
Draft
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
6 changes: 2 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,8 @@ builtin_openui5=ON
builtin_pcre=OFF
builtin_tbb=OFF
builtin_unuran=OFF
builtin_vc=OFF
builtin_vdt=OFF
builtin_veccore=OFF
builtin_veccore=ON
builtin_xrootd=OFF
builtin_xxhash=OFF
builtin_zeromq=ON
Expand Down Expand Up @@ -97,9 +96,8 @@ tmva=ON
unfold=ON
unuran=ON
uring=OFF
vc=OFF
vdt=ON
veccore=OFF
veccore=ON
vecgeom=OFF
webgui=ON
win_broken_tests=OFF
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/root-ci-config/buildconfig/mac14.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ builtin_openssl=ON
builtin_pcre=ON
builtin_tbb=ON
builtin_unuran=ON
builtin_vc=ON
builtin_vdt=ON
builtin_veccore=ON
builtin_xrootd=ON
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/root-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
INCREMENTAL: ${{ !contains(github.event.pull_request.labels.*.name, 'clean build') && !matrix.platform == 'mac15' && !matrix.platform == 'mac26'}}
GITHUB_PR_ORIGIN: ${{ github.event.pull_request.head.repo.clone_url }}
OVERRIDES: ${{ join( matrix.overrides, ' ') }}
run: |

Check failure on line 159 in .github/workflows/root-ci.yml

View workflow job for this annotation

GitHub Actions / lint-action-files

"github.event.pull_request.head.ref" is potentially untrusted. avoid using it directly in inline scripts. instead, pass it through an environment variable. see https://docs.github.com/en/actions/reference/security/secure-use#good-practices-for-mitigating-script-injection-attacks for more details
[ -d "${VIRTUAL_ENV_DIR}" ] && source ${VIRTUAL_ENV_DIR}/bin/activate
echo "Python is now $(which python3) $(python3 --version)"
src/.github/workflows/root-ci-config/build_root.py \
Expand Down Expand Up @@ -286,7 +286,7 @@
INCREMENTAL: ${{ !contains(github.event.pull_request.labels.*.name, 'clean build') }}
GITHUB_PR_ORIGIN: ${{ github.event.pull_request.head.repo.clone_url }}
shell: cmd
run: "C:\\setenv.bat ${{ matrix.target_arch }} &&

Check failure on line 289 in .github/workflows/root-ci.yml

View workflow job for this annotation

GitHub Actions / lint-action-files

"github.event.pull_request.head.ref" is potentially untrusted. avoid using it directly in inline scripts. instead, pass it through an environment variable. see https://docs.github.com/en/actions/reference/security/secure-use#good-practices-for-mitigating-script-injection-attacks for more details
python .github/workflows/root-ci-config/build_root.py
--buildtype ${{ matrix.config }}
--platform windows10
Expand Down Expand Up @@ -402,7 +402,7 @@
- image: alma9
is_special: true
property: march_native
overrides: ["CMAKE_BUILD_TYPE=RelWithDebInfo", "CMAKE_CXX_FLAGS=-march=native", "CMAKE_C_FLAGS=-march=native", "builtin_zlib=ON", "builtin_zstd=ON"]
overrides: ["CMAKE_BUILD_TYPE=RelWithDebInfo", "CMAKE_CXX_FLAGS=-march=native", "CMAKE_C_FLAGS=-march=native", "builtin_zlib=ON", "builtin_zstd=ON", "builtin_veccore=ON", "veccore=ON"]
- image: alma10
is_special: true
property: arm64
Expand All @@ -428,7 +428,7 @@
- self-hosted
- linux
- ${{ matrix.architecture == null && 'x64' || matrix.architecture }}
- ${{ matrix.extra-runs-on == null && 'cpu' || matrix.extra-runs-on }}

Check failure on line 431 in .github/workflows/root-ci.yml

View workflow job for this annotation

GitHub Actions / lint-action-files

property "extra-runs-on" is not defined in object type {architecture: string; cmake_generator: string; image: string; is_special: bool; overrides: array<string>; property: string}

Check failure on line 431 in .github/workflows/root-ci.yml

View workflow job for this annotation

GitHub Actions / lint-action-files

property "extra-runs-on" is not defined in object type {architecture: string; cmake_generator: string; image: string; is_special: bool; overrides: array<string>; property: string}

name: |
${{ matrix.image }} ${{ matrix.property }}
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
33 changes: 29 additions & 4 deletions cmake/modules/RootBuildOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ 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)")
Expand Down Expand Up @@ -180,7 +179,6 @@ 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")
Expand Down Expand Up @@ -253,7 +251,6 @@ 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)
Expand Down Expand Up @@ -295,7 +292,6 @@ 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)
Expand Down Expand Up @@ -415,6 +411,35 @@ if(DEFINED rpath)
"") # empty line at the end to make the deprecation message more visible
endif()

foreach(opt vc builtin_vc)
if(${opt})
message(DEPRECATION ">>> Option '${opt}' is deprecated and ignored."
"ROOT now uses std::simd for the vectorized TFormula and TMath classes when available (Clang or GCC >= 9)."
"Using this option will result in configuration errors in ROOT 6.42.")
endif()
endforeach()

foreach(opt veccore builtin_veccore)
# Disable VecCore if we don't support it for a given platform.
# We try to give clear explanations here in all distinct cases.
if(${opt})
if(WIN32)
message(WARNING "ROOT option '${opt}' will be disabled. Using VecCore on Windows is not supported by ROOT.")
set(${opt} OFF CACHE BOOL "Disabled because VecCore is not supported on Windows." FORCE)
elseif(APPLE AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
message(WARNING "ROOT option '${opt}' will be disabled. We don't support using VecCore on Apple with Intel hardware anymore.")
set(${opt} OFF CACHE BOOL "Disabled because VecCore is not supported on Apple with Intel hardware." FORCE)
elseif(APPLE)
message(WARNING "ROOT option '${opt}' will be disabled. We don't support using VecCore on Apple silicon, as std::simd is not available for Apple Clang and the old Vc backend also didn't support Apple silicon anyway.")
set(${opt} OFF CACHE BOOL "Disabled because VecCore is not supported on Apple silicon." FORCE)
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9)
message(WARNING "ROOT option '${opt}' will be disabled. GCC versions older than 9 do not provide std::simd, and the Vc backend of VecCore is not supported anymore by ROOT.")
set(${opt} OFF CACHE BOOL "Disabled because VecCore is not supported on GCC < 9." FORCE)
endif()
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
5 changes: 0 additions & 5 deletions cmake/modules/RootConfiguration.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -365,11 +365,6 @@ if(cocoa)
else()
set(hascocoa undef)
endif()
if(vc)
set(hasvc define)
else()
set(hasvc undef)
endif()
if(vdt)
set(hasvdt define)
else()
Expand Down
106 changes: 0 additions & 106 deletions cmake/modules/SearchInstalledSoftware.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1365,106 +1365,12 @@ 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()
Expand Down Expand Up @@ -1521,18 +1427,6 @@ if(builtin_veccore)
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
Expand Down
7 changes: 0 additions & 7 deletions config/RConfigure.in
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
#@hasxft@ R__HAS_XFT /**/
#@hasclad@ R__HAS_CLAD /**/
#@hascocoa@ R__HAS_COCOA /**/
#@hasvc@ R__HAS_VC /**/
#@hasvdt@ R__HAS_VDT /**/
#@hasveccore@ R__HAS_VECCORE /**/
#@usecxxmodules@ R__USE_CXXMODULES /**/
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
3 changes: 0 additions & 3 deletions core/clingutils/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,6 @@ set(clinginclude ${CMAKE_SOURCE_DIR}/interpreter/cling/include)
set(custom_modulemaps)
if (runtime_cxxmodules)
set(custom_modulemaps boost.modulemap tinyxml2.modulemap cuda.modulemap module.modulemap.build)
if(vc)
set(custom_modulemaps ${custom_modulemaps} vc.modulemap)
endif()

# We need to override the default modulemap because instead of producing a
# single std.pcm, produces hundreds of pcms. This changed with MacOSX14.4.sdk
Expand Down
3 changes: 0 additions & 3 deletions geom/vecgeom/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
############################################################################

include_directories(AFTER SYSTEM ${VECGEOM_INCLUDE_DIRS})
if ( Vc_FOUND )
include_directories( AFTER SYSTEM ${Vc_INCLUDE_DIRS})
endif()

ROOT_STANDARD_LIBRARY_PACKAGE(ConverterVG
HEADERS
Expand Down
6 changes: 1 addition & 5 deletions hist/hist/inc/Math/WrappedMultiTF1.h
Original file line number Diff line number Diff line change
Expand Up @@ -373,11 +373,7 @@ namespace ROOT {
// case of polynomial function (no parameter dependency) (case for dim = 1)
assert(fDim == 1);
if (ipar == 0) return 1.0;
#ifdef R__HAS_VECCORE
return vecCore::math::Pow(x[0], static_cast<T>(ipar));
#else
return std::pow(x[0], static_cast<int>(ipar));
#endif
return pow(x[0], static_cast<int>(ipar));
} else {
// case of general linear function (built in TFormula with ++ )
return GeneralLinearFunctionDerivation<T>::DoParameterDerivative(this, x, ipar);
Expand Down
2 changes: 1 addition & 1 deletion hist/hist/inc/TF1.h
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@ inline double TF1::EvalParVec(const Double_t *data, const Double_t *params)
// res = GetSave(x);
return TMath::SignalingNaN();
}
return vecCore::Get<ROOT::Double_v>(res, 0);
return res[0];
}
#endif

Expand Down
1 change: 0 additions & 1 deletion hist/hist/inc/TFormula.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ class TFormula : public TNamed
static Bool_t IsDefaultVariableName(const TString &name);
void ReplaceAllNames(TString &formula, std::map<TString, TString> &substitutions);
void FillParametrizedFunctions(std::map<std::pair<TString, Int_t>, std::pair<TString, TString>> &functions);
void FillVecFunctionsShurtCuts();
void ReInitializeEvalMethod();
std::string GetGradientFuncName() const {
return std::string(GetUniqueFuncName().Data()) + "_grad_1";
Expand Down
Loading
Loading