Community
cancel
Showing results for 
Search instead for 
Did you mean: 
P__Robert
Beginner
37 Views

Heterogeneous Offload for Marching Cubes and Mesh Export

Greetings,

We seek advice and collaborators as the project is GPLv3 and on GITHUB.

There exists a parallel Open MP segment within the Marching Cubes class header of Mandelbulber.

https://github.com/buddhi1980/mandelbulber2/commit/ff41f86bdcbda397d27e159a0e5995a1ef75c2c0.patch

Will this codebase benefit from usage of the Shared-memory Model (_Cilk_shared/_Cilk_offload)?

Is it possible to offload this Open MP segment with #pragma offload Data Transfer Mechanism?

KNC Continuous Integration Output build logs are available on Appveyor. Reference:

https://ci.appveyor.com/project/buddhi1980/mandelbulber2/build/1.0.1.0.0.7.329-master/job/64eubmuvmc...

Thanks!

coast

 

C:\projects\mandelbulber2\mandelbulber2\src\mesh_export.cpp(93): warning #3335: offload features on this platform currently require that RTTI be disabled

                                operator()(double x, double y, double z, double *colorIndex) const

                                ^

C:\projects\mandelbulber2\mandelbulber2\src\mesh_export.cpp(103): warning #2570: function has not been declared with compatible "target" attribute

                                double dist = CalculateDistance(*params, *fractals, distanceIn, &distanceOut);

                                              ^

C:\projects\mandelbulber2\mandelbulber2\src\mesh_export.cpp(110): warning #2570: function has not been declared with compatible "target" attribute

                                Compute<fractal::calcModeColouring>(*fractals, fractIn, &fractOut);

                                ^

C:\projects\mandelbulber2\mandelbulber2\src\marchingcubes.h(135): warning #2596: length modifier must be specified for pointer variable "voxelBuffer"

  #pragma offload target(mic) inout(voxelBuffer) inout(colorBuffer) nocopy(f)

                                                 ^

          detected during instantiation of "void mc::marching_cubes<coord_type,vector3,formula,progressFtor>(const vector3 &, const vector3 &, size_t={unsigned __int64}, size_t={unsigned __int64}, size_t={unsigned __int64}, formula, double, std::vector<double, std::allocator<double>> &, std::vector<size_t={unsigned __int64}, std::allocator<size_t={unsigned __int64}>> &, bool *, progressFtor, std::vector<double, std::allocator<double>> &) [with coord_type=double, vector3=double [3],

                    formula=FormulaFtor, progressFtor=ProgressFtor]" at line 161 of "C:\projects\mandelbulber2\mandelbulber2\src\mesh_export.cpp"

C:\projects\mandelbulber2\mandelbulber2\src\marchingcubes.h(135): warning #2596: length modifier must be specified for pointer variable "colorBuffer"

  #pragma offload target(mic) inout(voxelBuffer) inout(colorBuffer) nocopy(f)

                                                                    ^

          detected during instantiation of "void mc::marching_cubes<coord_type,vector3,formula,progressFtor>(const vector3 &, const vector3 &, size_t={unsigned __int64}, size_t={unsigned __int64}, size_t={unsigned __int64}, formula, double, std::vector<double, std::allocator<double>> &, std::vector<size_t={unsigned __int64}, std::allocator<size_t={unsigned __int64}>> &, bool *, progressFtor, std::vector<double, std::allocator<double>> &) [with coord_type=double, vector3=double [3],

                    formula=FormulaFtor, progressFtor=ProgressFtor]" at line 161 of "C:\projects\mandelbulber2\mandelbulber2\src\mesh_export.cpp"

morph.cpp

[ 41%] Building CXX object CMakeFiles/mandelbulber2.dir/C_/projects/mandelbulber2/mandelbulber2/src/multi_val.cpp.obj

icc: command line remark #10148: option '-Ob2' not supported

multi_val.cpp

[ 42%] Building CXX object CMakeFiles/mandelbulber2.dir/C_/projects/mandelbulber2/mandelbulber2/src/my_ui_loader.cpp.obj

C:/projects/mandelbulber2/mandelbulber2/src/mesh_export.cpp(93): warning #3335: *MIC* offload features on this platform currently require that RTTI be disabled

                                operator()(double x, double y, double z, double *colorIndex) const

                                ^

C:/projects/mandelbulber2/mandelbulber2/src/mesh_export.cpp(103): warning #2570: *MIC* function has not been declared with compatible "target" attribute

                                double dist = CalculateDistance(*params, *fractals, distanceIn, &distanceOut);

                                              ^

C:/projects/mandelbulber2/mandelbulber2/src/mesh_export.cpp(110): warning #2570: *MIC* function has not been declared with compatible "target" attribute

                                Compute<fractal::calcModeColouring>(*fractals, fractIn, &fractOut);

                                ^

C:/projects/mandelbulber2/mandelbulber2/src/marchingcubes.h(135): warning #2596: *MIC* length modifier must be specified for pointer variable "voxelBuffer"

  #pragma offload target(mic) inout(voxelBuffer) inout(colorBuffer) nocopy(f)

                                                 ^

          detected during instantiation of "void mc::marching_cubes<coord_type,vector3,formula,progressFtor>(const vector3 &, const vector3 &, size_t={unsigned long}, size_t={unsigned long}, size_t={unsigned long}, formula, double, std::vector<double, std::allocator<double>> &, std::vector<size_t={unsigned long}, std::allocator<std::_Bit_type={unsigned long}>> &, bool *, progressFtor, std::vector<double, std::allocator<double>> &) [with coord_type=double, vector3=double [3], formula=FormulaFtor,

                    progressFtor=ProgressFtor]" at line 161 of "C:/projects/mandelbulber2/mandelbulber2/src/mesh_export.cpp"

C:/projects/mandelbulber2/mandelbulber2/src/marchingcubes.h(135): warning #2596: *MIC* length modifier must be specified for pointer variable "colorBuffer"

  #pragma offload target(mic) inout(voxelBuffer) inout(colorBuffer) nocopy(f)

                                                                    ^

          detected during instantiation of "void mc::marching_cubes<coord_type,vector3,formula,progressFtor>(const vector3 &, const vector3 &, size_t={unsigned long}, size_t={unsigned long}, size_t={unsigned long}, formula, double, std::vector<double, std::allocator<double>> &, std::vector<size_t={unsigned long}, std::allocator<std::_Bit_type={unsigned long}>> &, bool *, progressFtor, std::vector<double, std::allocator<double>> &) [with coord_type=double, vector3=double [3], formula=FormulaFtor,

                    progressFtor=ProgressFtor]" at line 161 of "C:/projects/mandelbulber2/mandelbulber2/src/mesh_export.cpp"

my_ui_loader.cpp

[ 42%] Building CXX object CMakeFiles/mandelbulber2.dir/C_/projects/mandelbulber2/mandelbulber2/src/netrender.cpp.obj

 

...

...

 

[100%] Linking CXX executable mandelbulber2.exe

C:\Users\appveyor\AppData\Local\Temp\1\2968196MIC66.o:(.qtversion[qt_version_tag]+0x0): undefined reference to `qt_version_tag'

C:\Users\appveyor\AppData\Local\Temp\1\2968196MIC66.o: In function `FormulaFtor::operator()(double, double, double, double*) const':

mesh_export.cpp:(.text._ZNK11FormulaFtorclEdddPd[_ZNK11FormulaFtorclEdddPd]+0x37): undefined reference to `CVector3::CVector3()'

mesh_export.cpp:(.text._ZNK11FormulaFtorclEdddPd[_ZNK11FormulaFtorclEdddPd]+0x80): undefined reference to `CVector3::CVector3(CVector3 const&)'

mesh_export.cpp:(.text._ZNK11FormulaFtorclEdddPd[_ZNK11FormulaFtorclEdddPd]+0xa7): undefined reference to `sDistanceIn::sDistanceIn(CVector3, double, bool)'

mesh_export.cpp:(.text._ZNK11FormulaFtorclEdddPd[_ZNK11FormulaFtorclEdddPd]+0xc9): undefined reference to `CalculateDistance(cParamRender const&, cNineFractals const&, sDistanceIn const&, sDistanceOut*, sRenderData*)'

mesh_export.cpp:(.text._ZNK11FormulaFtorclEdddPd[_ZNK11FormulaFtorclEdddPd]+0xeb): undefined reference to `CVector3::CVector3(CVector3 const&)'

mesh_export.cpp:(.text._ZNK11FormulaFtorclEdddPd[_ZNK11FormulaFtorclEdddPd]+0xf8): undefined reference to `sFractalColoring::sFractalColoring()'

mesh_export.cpp:(.text._ZNK11FormulaFtorclEdddPd[_ZNK11FormulaFtorclEdddPd]+0x135): undefined reference to `sFractalIn::sFractalIn(CVector3, int, int, sCommonParams const&, int, sFractalColoring const&)'

mesh_export.cpp:(.text._ZNK11FormulaFtorclEdddPd[_ZNK11FormulaFtorclEdddPd]+0x146): undefined reference to `sFractalOut::sFractalOut()'

mesh_export.cpp:(.text._ZNK11FormulaFtorclEdddPd[_ZNK11FormulaFtorclEdddPd]+0x15d): undefined reference to `void Compute<(fractal::enumCalculationMode)1>(cNineFractals const&, sFractalIn const&, sFractalOut*)'

C:\Users\appveyor\AppData\Local\Temp\1\2968196MIC66.o: In function `L__ZN2mc14marching_cubesIdA3_d11FormulaFtor12ProgressFtorEEvRKT0_S6_mmmT1_dRSt6vectorIdSaIdEERS8_ImSaImEEPbT2_SB__138__par_loop1_2.0':

mesh_export.cpp:(.text._ZN2mc14marching_cubesIdA3_d11FormulaFtor12ProgressFtorEEvRKT0_S6_mmmT1_dRSt6vectorIdSaIdEERS8_ImSaImEEPbT2_SB_[_ZN2mc14marching_cubesIdA3_d11FormulaFtor12ProgressFtorEEvRKT0_S6_mmmT1_dRSt6vectorIdSaIdEERS8_ImSaImEEPbT2_SB_]+0x63d): undefined reference to `CVector3::CVector3()'

mesh_export.cpp:(.text._ZN2mc14marching_cubesIdA3_d11FormulaFtor12ProgressFtorEEvRKT0_S6_mmmT1_dRSt6vectorIdSaIdEERS8_ImSaImEEPbT2_SB_[_ZN2mc14marching_cubesIdA3_d11FormulaFtor12ProgressFtorEEvRKT0_S6_mmmT1_dRSt6vectorIdSaIdEERS8_ImSaImEEPbT2_SB_]+0x680): undefined reference to `CVector3::CVector3(CVector3 const&)'

mesh_export.cpp:(.text._ZN2mc14marching_cubesIdA3_d11FormulaFtor12ProgressFtorEEvRKT0_S6_mmmT1_dRSt6vectorIdSaIdEERS8_ImSaImEEPbT2_SB_[_ZN2mc14marching_cubesIdA3_d11FormulaFtor12ProgressFtorEEvRKT0_S6_mmmT1_dRSt6vectorIdSaIdEERS8_ImSaImEEPbT2_SB_]+0x69f): undefined reference to `sDistanceIn::sDistanceIn(CVector3, double, bool)'

mesh_export.cpp:(.text._ZN2mc14marching_cubesIdA3_d11FormulaFtor12ProgressFtorEEvRKT0_S6_mmmT1_dRSt6vectorIdSaIdEERS8_ImSaImEEPbT2_SB_[_ZN2mc14marching_cubesIdA3_d11FormulaFtor12ProgressFtorEEvRKT0_S6_mmmT1_dRSt6vectorIdSaIdEERS8_ImSaImEEPbT2_SB_]+0x6c2): undefined reference to `CalculateDistance(cParamRender const&, cNineFractals const&, sDistanceIn const&, sDistanceOut*, sRenderData*)'

mesh_export.cpp:(.text._ZN2mc14marching_cubesIdA3_d11FormulaFtor12ProgressFtorEEvRKT0_S6_mmmT1_dRSt6vectorIdSaIdEERS8_ImSaImEEPbT2_SB_[_ZN2mc14marching_cubesIdA3_d11FormulaFtor12ProgressFtorEEvRKT0_S6_mmmT1_dRSt6vectorIdSaIdEERS8_ImSaImEEPbT2_SB_]+0x6e4): undefined reference to `CVector3::CVector3(CVector3 const&)'

mesh_export.cpp:(.text._ZN2mc14marching_cubesIdA3_d11FormulaFtor12ProgressFtorEEvRKT0_S6_mmmT1_dRSt6vectorIdSaIdEERS8_ImSaImEEPbT2_SB_[_ZN2mc14marching_cubesIdA3_d11FormulaFtor12ProgressFtorEEvRKT0_S6_mmmT1_dRSt6vectorIdSaIdEERS8_ImSaImEEPbT2_SB_]+0x6f1): undefined reference to `sFractalColoring::sFractalColoring()'

mesh_export.cpp:(.text._ZN2mc14marching_cubesIdA3_d11FormulaFtor12ProgressFtorEEvRKT0_S6_mmmT1_dRSt6vectorIdSaIdEERS8_ImSaImEEPbT2_SB_[_ZN2mc14marching_cubesIdA3_d11FormulaFtor12ProgressFtorEEvRKT0_S6_mmmT1_dRSt6vectorIdSaIdEERS8_ImSaImEEPbT2_SB_]+0x723): undefined reference to `sFractalIn::sFractalIn(CVector3, int, int, sCommonParams const&, int, sFractalColoring const&)'

mesh_export.cpp:(.text._ZN2mc14marching_cubesIdA3_d11FormulaFtor12ProgressFtorEEvRKT0_S6_mmmT1_dRSt6vectorIdSaIdEERS8_ImSaImEEPbT2_SB_[_ZN2mc14marching_cubesIdA3_d11FormulaFtor12ProgressFtorEEvRKT0_S6_mmmT1_dRSt6vectorIdSaIdEERS8_ImSaImEEPbT2_SB_]+0x734): undefined reference to `sFractalOut::sFractalOut()'

mesh_export.cpp:(.text._ZN2mc14marching_cubesIdA3_d11FormulaFtor12ProgressFtorEEvRKT0_S6_mmmT1_dRSt6vectorIdSaIdEERS8_ImSaImEEPbT2_SB_[_ZN2mc14marching_cubesIdA3_d11FormulaFtor12ProgressFtorEEvRKT0_S6_mmmT1_dRSt6vectorIdSaIdEERS8_ImSaImEEPbT2_SB_]+0x74e): undefined reference to `void Compute<(fractal::enumCalculationMode)1>(cNineFractals const&, sFractalIn const&, sFractalOut*)'

LINK failed. with 1

jom: C:\projects\mandelbulber2\build-win\mandelbulber2.dir\Release\k1om\CMakeFiles\mandelbulber2.dir\build.make [mandelbulber2.exe] Error 2

jom: C:\projects\mandelbulber2\build-win\mandelbulber2.dir\Release\k1om\CMakeFiles\Makefile2 [CMakeFiles\mandelbulber2.dir\all] Error 2

jom: C:\projects\mandelbulber2\build-win\mandelbulber2.dir\Release\k1om\Makefile [all] Error 2

 

0 Kudos
0 Replies
Reply