Git Product home page Git Product logo

Comments (7)

jeffamstutz avatar jeffamstutz commented on June 20, 2024

Hi Cameron, thanks for the report!

OpenMP is not well supported on MSVC (only OpenMP 2.0), so I am not surprised by this error. I (or someone) needs to rewrite the example device threading to use an alternative tasking system than OpenMP for the sake of better Windows support. Admittedly, the example device was developed entirely on Linux (where OpenMP is trivial to find) and we do not (yet) have Windows CI.

However, we do want to fully support Windows! Could you try commenting out this line to see if removing OpenMP support at least gets you past this issue? If that at least unblocks you, I will add logic to not find OpenMP when building on Windows as a short-term workaround.

from anari-sdk.

kingc8 avatar kingc8 commented on June 20, 2024

Hi Jefferson,

Thanks very much, commenting that out seems to have improved the compilation on Windows.

This is the remaining result, I have removed the Warnings.

6>C:\Users\Cameron\Downloads\ANARI-SDK-main\examples\simple\anariTutorial.c(13,10): fatal error C1083: Cannot open include file: 'alloca.h': No such file or directory 8>C:\Users\Cameron\Downloads\ANARI-SDK-main\examples\example_device\scene\bvh/BVH.h(66,33): error C2338: BVH::Node is too big! 8>C:\Users\Cameron\Downloads\ANARI-SDK-main\examples\example_device\scene\bvh/BVH.h(66,33): error C2338: BVH::Node is too big! 8>C:\Users\Cameron\Downloads\ANARI-SDK-main\examples\example_device\scene\bvh/BVH.h(66,33): error C2338: BVH::Node is too big! 10>LINK : fatal error LNK1181: cannot open input file '..\..\Release\anari_utilities.lib' 11>LINK : fatal error LNK1181: cannot open input file '..\..\Release\anari_utilities.lib' 8>C:\Users\Cameron\Downloads\ANARI-SDK-main\examples\example_device\scene\bvh/BVH.h(66,33): error C2338: BVH::Node is too big! 8>C:\Users\Cameron\Downloads\ANARI-SDK-main\examples\example_device\scene\bvh/BVH.h(66,33): error C2338: BVH::Node is too big! 8>C:\Users\Cameron\Downloads\ANARI-SDK-main\examples\example_device\scene\bvh/BVH.h(66,33): error C2338: BVH::Node is too big! 8>C:\Users\Cameron\Downloads\ANARI-SDK-main\examples\example_device\scene\bvh/BVH.h(66,33): error C2338: BVH::Node is too big! 8>C:\Users\Cameron\Downloads\ANARI-SDK-main\examples\example_device\renderer\Renderer.cpp(20,51): error C7555: use of designated initializers requires at least '/std:c++20' 8>C:\Users\Cameron\Downloads\ANARI-SDK-main\examples\example_device\scene\bvh/BVH.h(66,33): error C2338: BVH::Node is too big! 8>C:\Users\Cameron\Downloads\ANARI-SDK-main\examples\example_device\scene\bvh/BVH.h(66,33): error C2338: BVH::Node is too big! 8>C:\Users\Cameron\Downloads\ANARI-SDK-main\examples\example_device\scene\bvh/BVH.h(66,33): error C2338: BVH::Node is too big! 8>C:\Users\Cameron\Downloads\ANARI-SDK-main\examples\example_device\scene\bvh/BVH.h(66,33): error C2338: BVH::Node is too big! 8>C:\Users\Cameron\Downloads\ANARI-SDK-main\examples\example_device\scene\bvh/BVH.h(66,33): error C2338: BVH::Node is too big! 8>C:\Users\Cameron\Downloads\ANARI-SDK-main\examples\example_device\scene\bvh/BVH.h(66,33): error C2338: BVH::Node is too big! 8>C:\Users\Cameron\Downloads\ANARI-SDK-main\examples\example_device\scene\bvh/BVH.h(66,33): error C2338: BVH::Node is too big! 8>C:\Users\Cameron\Downloads\ANARI-SDK-main\examples\example_device\scene\bvh/BVH.h(66,33): error C2338: BVH::Node is too big! 8>C:\Users\Cameron\Downloads\ANARI-SDK-main\examples\example_device\scene\bvh/BVH.h(66,33): error C2338: BVH::Node is too big! 8>C:\Users\Cameron\Downloads\ANARI-SDK-main\examples\example_device\scene\bvh/BVH.h(66,33): error C2338: BVH::Node is too big! 12>LINK : fatal error LNK1181: cannot open input file '..\..\Release\anari_library_example.lib'

Many thanks and kind regards,

Cameron

from anari-sdk.

jeffamstutz avatar jeffamstutz commented on June 20, 2024

I've pushed the OpenMP CMake logic workaround and removed the static assert which was failing (seemed unnecessary). Could you retry latest main?

from anari-sdk.

kingc8 avatar kingc8 commented on June 20, 2024

Hi Jefferson,

Redownloaded main and compiled, it's looking better.

`6>C:\Users\Cameron\Downloads\ANARI-SDK-main\examples\simple\anariTutorial.c(13,10): fatal error C1083: Cannot open include file: 'alloca.h': No such file or directory
11>LINK : fatal error LNK1181: cannot open input file '....\Release\anari_utilities.lib'
10>LINK : fatal error LNK1181: cannot open input file '....\Release\anari_utilities.lib'
8>C:\Users\Cameron\Downloads\ANARI-SDK-main\examples\example_device\renderer\Renderer.cpp(20,51): error C7555: use of designated initializers requires at least '/std:c++20'
12>LINK : fatal error LNK1181: cannot open input file '....\Release\anari_library_example.lib'

...
8>Done building project "anari_library_example.vcxproj" -- FAILED.
12>------ Build started: Project: anariTutorialDirectLink, Configuration: Release x64 ------
12>Building Custom Rule C:/Users/Cameron/Downloads/ANARI-SDK-main/examples/direct_linking/CMakeLists.txt
12>anariTutorialDirectLink.c
12>LINK : fatal error LNK1181: cannot open input file '....\Release\anari_library_example.lib'
12>Done building project "anariTutorialDirectLink.vcxproj" -- FAILED.
13>------ Build started: Project: ALL_BUILD, Configuration: Release x64 ------T
13>Building Custom Rule C:/Users/Cameron/Downloads/ANARI-SDK-main/CMakeLists.txt
========== Build: 8 succeeded, 5 failed, 0 up-to-date, 0 skipped ==========`

Thank you for the quick feedback!

Kind regards,,

Cameron

from anari-sdk.

jeffamstutz avatar jeffamstutz commented on June 20, 2024

Just pushed an update to just use plain malloc() for the anariTutorial app...hopefully we are close!

from anari-sdk.

kingc8 avatar kingc8 commented on June 20, 2024

Pulled down a fresh main.
It seems like it's only the memory allocation header that needs a pre-processor statement,

Windows will look for:
#include <malloc.h>
Others:
#include <alloca.h>

Somehow Cmake should hint that the generated project should use C++20 standard.

Something like:

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_BUILD_TYPE debug)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++20")

I'm manually stepping through anari, anari_library_example.. etc,. to add the c++20 parameter.

Thank you for your awesome work!

Kind regards,

Cameron

from anari-sdk.

kingc8 avatar kingc8 commented on June 20, 2024

Its better.

13>LINK : fatal error LNK1181: cannot open input file '....\Release\anari_utilities.lib'
13>Done building project "anari_library_example.vcxproj" -- FAILED.
17>------ Rebuild All started: Project: anariTutorialDirectLink, Configuration: Release x64 ------
17>Building Custom Rule C:/Users/Cameron/Downloads/ANARI-SDK-main/examples/direct_linking/CMakeLists.txt
17>anariTutorialDirectLink.c
17>LINK : fatal error LNK1181: cannot open input file '....\Release\anari_library_example.lib'
17>Done building project "anariTutorialDirectLink.vcxproj" -- FAILED.
18>------ Rebuild All started: Project: ALL_BUILD, Configuration: Release x64 ------
18>Building Custom Rule C:/Users/Cameron/Downloads/ANARI-SDK-main/CMakeLists.txt
19>------ Skipped Rebuild All: Project: INSTALL, Configuration: Release x64 ------
19>Project not selected to build for this solution configuration
========== Rebuild All: 9 succeeded, 4 failed, 6 skipped ==========

-I appreciate you're tweaking all this from a Linux based codebase.

Many thanks,

Cameron

from anari-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.