2018-12-10 07:09 CET

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001477Orfeo Toolbox (OTB)Generalpublic2017-11-13 14:50
Reportergpasero 
Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
StatusnewResolutionopen 
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
https://dash.orfeo-toolbox.org/viewNotes.php?buildid=288158
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
https://git.orfeo-toolbox.org/otb.git/commitdiff/3bb5727b232e7e30fc2b50d659eb69ff84f98635

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
https://dash.orfeo-toolbox.org/viewBuildError.php?type=1&buildid=288266
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

-Relationships
+Relationships

-Notes
There are no notes attached to this issue.
+Notes

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