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

Compilation warning in AVXVec.h #36542

Closed
makortel opened this issue Dec 17, 2021 · 6 comments · Fixed by #42446
Closed

Compilation warning in AVXVec.h #36542

makortel opened this issue Dec 17, 2021 · 6 comments · Fixed by #42446

Comments

@makortel
Copy link
Contributor

The CMSSW_12_3_SKYLAKEAVX512_X_2021-12-16-2300 on slc7_amd64_gcc10 is warning

>> Compiling skylake-avx512 /data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/6b912c9f967e64a2e24246c58bc10cc5/opt/cmssw/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_3_SKYLAKEAVX512_X_2021-12-16-2300/src/TrackingTools/AnalyticalJacobians/src/JacobianCurvilinearToCartesian.cc
/data/cmsbld/jenkins/workspace/build-any-ib/w/slc7_amd64_gcc10/external/gcc/10.3.0-84898dea653199466402e67d73657f10/bin/c++ -c -DGNU_GCC -D_GNU_SOURCE -DEIGEN_DONT_PARALLELIZE -DTBB_USE_GLIBCXX_VERSION=100300 -DTBB_SUPPRESS_DEPRECATED_MESSAGES -DTBB_PREVIEW_RESUMABLE_TASKS=1 -DBOOST_SPIRIT_THREADSAFE -DPHOENIX_THREADSAFE -DBOOST_MATH_DISABLE_STD_FPCLASSIFY -DBOOST_UUID_RANDOM_PROVIDER_FORCE_POSIX -DCMSSW_GIT_HASH='CMSSW_12_3_SKYLAKEAVX512_X_2021-12-16-2300' -DPROJECT_NAME='CMSSW' -DPROJECT_VERSION='CMSSW_12_3_SKYLAKEAVX512_X_2021-12-16-2300' -I/data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/6b912c9f967e64a2e24246c58bc10cc5/opt/cmssw/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_3_SKYLAKEAVX512_X_2021-12-16-2300/src -I/data/cmsbld/jenkins/workspace/build-any-ib/w/slc7_amd64_gcc10/external/pcre/8.43-28d54724578a9006cf0dca75629374e3/include -isystem/data/cmsbld/jenkins/workspace/build-any-ib/w/slc7_amd64_gcc10/external/boost/1.75.0-d92e5fa723d0ea2c498d4ee58b805800/include -I/data/cmsbld/jenkins/workspace/build-any-ib/w/slc7_amd64_gcc10/external/bz2lib/1.0.6-86270889250d9cb8193d1963706a39cb/include -I/data/cmsbld/jenkins/workspace/build-any-ib/w/slc7_amd64_gcc10/external/gsl/2.6-0c1d3dda375c5665ae354318ba49dd7e/include -I/data/cmsbld/jenkins/workspace/build-any-ib/w/slc7_amd64_gcc10/external/libuuid/2.34-fe91b21b8e54a48f2d45894d9da65f14/include -isystem/data/cmsbld/jenkins/workspace/build-any-ib/w/slc7_amd64_gcc10/lcg/root/6.22.08-7a23d8c39de64086964b1f85b2a999a5/include -isystem/data/cmsbld/jenkins/workspace/build-any-ib/w/slc7_amd64_gcc10/external/tbb/v2021.4.0-948cf178e0e7563ed46ef2d4709d6819/include -I/data/cmsbld/jenkins/workspace/build-any-ib/w/slc7_amd64_gcc10/cms/vdt/0.4.0-4992e31c0940a149574c0e867a49cc88/include -I/data/cmsbld/jenkins/workspace/build-any-ib/w/slc7_amd64_gcc10/external/xz/5.2.5-d6fed2038c4e8d6e04531d1adba59f37/include -I/data/cmsbld/jenkins/workspace/build-any-ib/w/slc7_amd64_gcc10/external/zlib/1.2.11-71514f01d2850dfd0bcd391557259a58/include -I/data/cmsbld/jenkins/workspace/build-any-ib/w/slc7_amd64_gcc10/external/eigen/82dd3710dac619448f50331c1d6a35da673f764a-b8031725d6746d487cfe338415b1b618/include/eigen3 -I/data/cmsbld/jenkins/workspace/build-any-ib/w/slc7_amd64_gcc10/external/fmt/8.0.1-6d217bf36b9a6ba22d9ebe84cf34a21a/include -I/data/cmsbld/jenkins/workspace/build-any-ib/w/slc7_amd64_gcc10/external/md5/1.0.0-0440f43b57c5656322f7cd7a65f85771/include -I/data/cmsbld/jenkins/workspace/build-any-ib/w/slc7_amd64_gcc10/external/OpenBLAS/0.3.15-cbb9880f108e4d44b0cc589a0d462d4c/include -I/data/cmsbld/jenkins/workspace/build-any-ib/w/slc7_amd64_gcc10/external/tinyxml2/6.2.0-e1d93814e04028ebad1832c681e0a52d/include -O2 -pthread -pipe -Werror=main -Werror=pointer-arith -Werror=overlength-strings -Wno-vla -Werror=overflow -std=c++1z -ftree-vectorize -Wstrict-overflow -Werror=array-bounds -Werror=format-contains-nul -Werror=type-limits -fvisibility-inlines-hidden -fno-math-errno --param vect-max-version-for-alias-checks=50 -Xassembler --compress-debug-sections -msse3 -felide-constructors -fmessage-length=0 -Wall -Wno-non-template-friend -Wno-long-long -Wreturn-type -Wextra -Wpessimizing-move -Wclass-memaccess -Wno-cast-function-type -Wno-unused-but-set-parameter -Wno-ignored-qualifiers -Wno-deprecated-copy -Wno-unused-parameter -Wunused -Wparentheses -Wno-deprecated -Werror=return-type -Werror=missing-braces -Werror=unused-value -Werror=unused-label -Werror=address -Werror=format -Werror=sign-compare -Werror=write-strings -Werror=delete-non-virtual-dtor -Werror=strict-aliasing -Werror=narrowing -Werror=unused-but-set-variable -Werror=reorder -Werror=unused-variable -Werror=conversion-null -Werror=return-local-addr -Wnon-virtual-dtor -Werror=switch -fdiagnostics-show-option -Wno-unused-local-typedefs -Wno-attributes -Wno-psabi -Wno-error=unused-variable -DBOOST_DISABLE_ASSERTS -march=skylake-avx512  -fPIC  -MMD -MF tmp/slc7_amd64_gcc10/src/TrackingTools/AnalyticalJacobians/src/TrackingToolsAnalyticalJacobians/skylake-avx512/JacobianCurvilinearToCartesian.cc.d /data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/6b912c9f967e64a2e24246c58bc10cc5/opt/cmssw/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_3_SKYLAKEAVX512_X_2021-12-16-2300/src/TrackingTools/AnalyticalJacobians/src/JacobianCurvilinearToCartesian.cc -o tmp/slc7_amd64_gcc10/src/TrackingTools/AnalyticalJacobians/src/TrackingToolsAnalyticalJacobians/skylake-avx512/JacobianCurvilinearToCartesian.cc.o
In file included from /data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/6b912c9f967e64a2e24246c58bc10cc5/opt/cmssw/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_3_SKYLAKEAVX512_X_2021-12-16-2300/src/DataFormats/Math/interface/SSEVec.h:385,
                 from /data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/6b912c9f967e64a2e24246c58bc10cc5/opt/cmssw/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_3_SKYLAKEAVX512_X_2021-12-16-2300/src/DataFormats/Math/interface/SIMDVec.h:57,
                 from /data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/6b912c9f967e64a2e24246c58bc10cc5/opt/cmssw/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_3_SKYLAKEAVX512_X_2021-12-16-2300/src/DataFormats/GeometryVector/interface/Basic3DVector.h:4,
                 from /data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/6b912c9f967e64a2e24246c58bc10cc5/opt/cmssw/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_3_SKYLAKEAVX512_X_2021-12-16-2300/src/DataFormats/GeometryVector/interface/PV3DBase.h:4,
                 from /data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/6b912c9f967e64a2e24246c58bc10cc5/opt/cmssw/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_3_SKYLAKEAVX512_X_2021-12-16-2300/src/DataFormats/GeometryVector/interface/Point3DBase.h:5,
                 from /data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/6b912c9f967e64a2e24246c58bc10cc5/opt/cmssw/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_3_SKYLAKEAVX512_X_2021-12-16-2300/src/DataFormats/GeometryVector/interface/GlobalPoint.h:5,
                 from /data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/6b912c9f967e64a2e24246c58bc10cc5/opt/cmssw/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_3_SKYLAKEAVX512_X_2021-12-16-2300/src/TrackingTools/AnalyticalJacobians/interface/AnalyticalCurvilinearJacobian.h:5,
                 from /data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/6b912c9f967e64a2e24246c58bc10cc5/opt/cmssw/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_3_SKYLAKEAVX512_X_2021-12-16-2300/src/TrackingTools/AnalyticalJacobians/src/AnalyticalCurvilinearJacobian.cc:1:
/data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/6b912c9f967e64a2e24246c58bc10cc5/opt/cmssw/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_3_SKYLAKEAVX512_X_2021-12-16-2300/src/DataFormats/Math/interface/private/AVXVec.h: In constructor 'mathSSE::Vec4<double>::Vec4(mathSSE::Vec2<double>, mathSSE::Vec2<double>)':
  /data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/6b912c9f967e64a2e24246c58bc10cc5/opt/cmssw/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_3_SKYLAKEAVX512_X_2021-12-16-2300/src/DataFormats/Math/interface/private/AVXVec.h:33:33: warning: '*<unknown>.mathSSE::Vec4<double>::vec' is used uninitialized in this function [-Wuninitialized]
    33 |       vec = _mm256_insertf128_pd(vec, ivec0.vec, 0);
      |             ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~

https://cmssdt.cern.ch/SDT/cgi-bin/buildlogs/slc7_amd64_gcc10/CMSSW_12_3_SKYLAKEAVX512_X_2021-12-16-2300/TrackingTools/AnalyticalJacobians

@cmsbuild
Copy link
Contributor

A new Issue was created by @makortel Matti Kortelainen.

@Dr15Jones, @perrotta, @dpiparo, @makortel, @smuzaffar, @qliphy can you please review it and eventually sign/assign? Thanks.

cms-bot commands are listed here

@makortel
Copy link
Contributor Author

assign reconstruction

FYI @VinInn

@cmsbuild
Copy link
Contributor

New categories assigned: reconstruction

@slava77,@jpata,@clacaputo you have been requested to review this Pull request/Issue and eventually sign? Thanks

@makortel
Copy link
Contributor Author

The warning is pointing to line 33 in this function

Vec4(Vec2<double> ivec0, Vec2<double> ivec1) {
vec = _mm256_insertf128_pd(vec, ivec0.vec, 0);
vec = _mm256_insertf128_pd(vec, ivec1.vec, 1);
}

@slava77
Copy link
Contributor

slava77 commented Dec 17, 2021

in this context, it's a false positive. Whatever vec was before entering this method, the result will be ivec1.vec ivec0.vec.

@slava77
Copy link
Contributor

slava77 commented Dec 17, 2021

perhaps it should just be replaced by _mm256_set_m128d(ivec1.vec, ivec0.vec);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants