2018-03-23 21:08 CET

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001477Orfeo Toolbox (OTB)Generalpublic2017-11-13 14:50
Assigned To 
PlatformWindowsOSOS Version
Summary0001477: OpenMP flag on windows crashes classification app
DescriptionClassification tests are crashing when application exists. This happen only when openmp is activated.

[1] https://dash.orfeo-toolbox.org/viewTest.php?onlyfailed&buildid=288158

[2] https://dash.orfeo-toolbox.org/viewTest.php?onlyfailed&buildid=288129

The sad part is this failure is random. See the "next" build on the page and you see less tests are failing.

the problem comes from usage of openmp in machinelearning where the module has neither executable nor shared library. As a result of this no openmp flags are added. But if you add them globally on windows, otbApplicationLaunchercommandline and all exe's activate openmp and this result in random crash.
see CMAKE's C & CXX FLAGS in build notes
At this point, I think activation of openmp exposes those bugs in the code and needs to be fixed.
Additional InformationVoila, here is the commit that added openmp

It's been an year since this one. So I guess the bug is around for a long time.

see warnings when using shark with openmp
this means SHARK_PARALLEL_FOR is not using openmp even though shark.so is created with that flag. I suspect this can lead to undefined behaviour

In windows, MSVC is good enough to link with openmp if there is openmp flag enabled and the code uses some #pragma omp. This exposes those failing test.

-as-needed flag enabled by default by recent ubuntu versions result in binaries linked without openmp.
Hence we don't see a failing test and bug is well hidden. Thanks Ubuntu. Good job!
TagsNo tags attached.
Attached Files


There are no notes attached to this issue.

-Issue History
Date Modified Username Field Change
2017-11-13 14:50 gpasero New Issue
+Issue History