Hi Peter,

Surprisingly I fixed it. In 3 easy steps :) I don't even know if all cores are used, but it does compile and start.

*Cherry-pick your 4 commits, fix conflicts*
0e19e394243f  Omp variable int and omp.h includes
82a46f59a410  Replace reduction by critical
3fc94be7814c  Add openmp dependency to AlgotihmsExt and MapperExt
75840ab56a34  Add openmp as external project

*Modify **MITK_OpenMP_Config.cmake**to look like
*

find_package(OpenMP REQUIRED)
if(OpenMP_CXX_FOUND)
    list(APPEND ALL_LIBRARIES ${OpenMP_CXX_LIBRARIES})
endif()

*Fix Classificaton/CLUtilities dependencies* and other simple ***clang * compilation errors
*Add "OpenMP|OpenMP_CXX".
*** We don't even use OpemMP there, but we use Eigen which uses OpenMP. I'm not sure what's the clean way to handle this. I just know that it fixes the problem.

My setup is:

 * macOS 10.13.6, XCode 10.0, Qt 5.11.1
 * brew install libomp cmake
 * cmake -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_TESTING:BOOL=OFF
   -DMITK_BUILD_ALL_PLUGINS:BOOL=ON -DMITK_USE_Vigra:BOOL=ON
   -DMITK_USE_MatchPoint:BOOL=ON -DGIT_EXECUTABLE:PATH=/usr/bin/git ..

I will test "port install libomp" and/or "libomp-devel" in the next days because I'm not really a homebrew user. I'll keep you updated.

Nil Goyette

Le 2018-10-09 à 13:40, Neher, Peter a écrit :
This is where I'm stuck. Didn't have the time to investigate further since I'm out of office for a while.

Peter

Am 09.10.2018 15:42 schrieb Nil Goyette <nil.goye...@usherbrooke.ca>:

    Hi Peter,

    What do you mean by "unsuccessful until now"? I tested
    T25191-v2018.04-beta, cherry-picking your 4 OpenMP commits and it's
    still unsuccessful. I have a list of undefined symbols, for example
    Undefined symbols for architecture x86_64:
       "___kmpc_critical", referenced from:
           _.omp_outlined..8 in mitkWeightedPointTransform.cpp

    Is this where you're stuck at? Or were you successful?

    Nil Goyette

    Le 2018-10-03 à 09:08, Neher, Peter a écrit :
    > Hi Nil,
    >
    > The trick is that we do not build MITK Diffusion for Mac, which
    is admittedly a rather poor solution. Apple Clang does not ship
    with openmp anymore. The branch you mentioned was a first try to
    fix this following this solution:
    https://iscinumpy.gitlab.io/post/omp-on-high-sierra/
    > Unfortunately unsuccessful until now. Feel free to check it out
    though. Since we don't have a mac developer working with
    diffusion, this issue is not well covered on our side.
    >
    > Peter
    >
    > -----Ursprüngliche Nachricht-----
    > Von: Nil Goyette <nil.goye...@usherbrooke.ca>
    > Gesendet: Mittwoch, 3. Oktober 2018 14:56
    > An: mitk-users@lists.sourceforge.net; Neher, Peter
    <p.ne...@dkfz-heidelberg.de>
    > Betreff: OpenMP
    >
    > Hi all, Peter,
    >
    > I'm trying to build MITK beta on macOS (all tools
    installed/upgraded with mac port) and it's failing in the
    DiffusionImaging module because of OpenMP.
    >
    >
    
.../Modules/DiffusionImaging/FiberTracking/Algorithms/itkStreamlineTrackingFilter.cpp:21:10:
    fatal error: 'omp.h' file not found #include <omp.h>
    >            ^~~~~~~
    >
    > What's the trick? Do you use a special flag? Does the T25420-Omp
    [1] branch fix this?
    >
    > Nil
    >
    >
    > [1] https://phabricator.mitk.org/source/mitk/browse/T25420-Omp/
    >



_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to