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 issues in Win + VS #62

Open
MotivaCG opened this issue Sep 15, 2021 · 3 comments
Open

Compilation issues in Win + VS #62

MotivaCG opened this issue Sep 15, 2021 · 3 comments

Comments

@MotivaCG
Copy link

MotivaCG commented Sep 15, 2021

Lots of issues with OpenMP like

Error C3031 'Atb': variable in 'reduction' clause must have scalar arithmetic type fusion D:\cilantro_src\include\cilantro\registration\transform_estimation.hpp 266

or

Severity Code Description Project File Line Suppression State
Error C3001 'declare': expected an OpenMP directive name flat_convex_hull D:\cilantro_src\include\cilantro\core\covariance.hpp 52

or

Severity Code Description Project File Line Suppression State
Error C3016 'i': index variable in OpenMP 'for' statement must have signed integral type fusion D:\cilantro_src\include\cilantro\core\space_transformations.hpp 186

or

Severity Code Description Project File Line Suppression State
Error C3036 'max': invalid operator token in OpenMP 'reduction' clause non_rigid_icp D:\cilantro_src\include\cilantro\registration\icp_warp_field_combined_metric_sparse.hpp 171

@yoavmil
Copy link

yoavmil commented Jan 16, 2022

Yep, same errors for me. I think it has to do with MSVC not supporting latest OpenMP.

@josefgraus
Copy link

Any workaround for this? I just ran into this using Visual Studio 17 2022 version 193.

@josefgraus
Copy link

Actually, I pretty quickly figured out a way to at least compile it.

Turn off ENABLE_NON_DETERMINISTIC_PARALLELISM. CMakeLists.txt snippet:

set(ENABLE_NON_DETERMINISTIC_PARALLELISM OFF)
add_subdirectory(cilantro)

Add an MSVC flag to use openmp:llvm. More CMakeLists.txt lines:

if(MSVC)
  set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "/openmp:llvm")
endif()

Good luck!

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

No branches or pull requests

3 participants