RenderKit / ospray

An Open, Scalable, Portable, Ray Tracing Based Rendering Engine for High-Fidelity Visualization
http://ospray.org
Apache License 2.0
1.02k stars 186 forks source link

ospNewDevice("default"); dont work #287

Closed loppirob closed 5 years ago

loppirob commented 5 years ago

i linked to my visual studio 2015 c++ project: C:\ospray-1.7.2.windows\lib\ospray.lib and use all dll from C:\ospray-1.7.2.windows\bin

and try to initialize ospray by OSPDevice mydevice = ospNewDevice("default");

but as message is shown after : ospDeviceCommit(mydevice);

INITIALIZATION ERROR --> Could not find device of type: default.

If i link ospray.lib from ospray-1.3.0 and use 1.3 dll all works ok

why? what is wrong or changed in new version?

johguenther commented 5 years ago

This looks like a similar issue to #273: maybe an older installed embree.dll is loaded first? Basically some dynamic dependency (dll) could not be fulfilled.

Can you check whether the example programs (like ospExampleViewer.exe) in C:\ospray-1.7.2.windows\bin run out-of-the box? If yes, can you double-check that C:\ospray-1.7.2.windows\bin is early/first in PATH, or that all dlls (in particular ospray_module_ispc.dll and embree.dll) are copied into the Release folder?

loppirob commented 5 years ago

Yes, ospExampleViewer.exe run in the same path of my program. For testing i put my exe in C:\ospray-1.7.2.windows\bin but still not work, same message Mind that In C:\ospray-1.7.2.windows\bin embree.dll not exist, instead there is embree3.dll version 3.3.0

Inviato da Postahttps://go.microsoft.com/fwlink/?LinkId=550986 per Windows 10


Da: Johannes Günther notifications@github.com Inviato: Friday, November 23, 2018 6:28:49 PM A: ospray/ospray Cc: loppirob; Author Oggetto: Re: [ospray/ospray] ospNewDevice("default"); dont work (#287)

This looks like a similar issue to #273https://github.com/ospray/ospray/issues/273: maybe an older installed embree.dll is loaded first? Basically some dynamic dependency (dll) could not be fulfilled.

Can you check whether the example programs (like ospExampleViewer.exe) in C:\ospray-1.7.2.windows\bin run out-of-the box? If yes, can you double-check that C:\ospray-1.7.2.windows\bin is early/first in PATH, or that all dlls (in particular ospray_module_ispc.dll and embree.dll) are copied into the Release folder?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/ospray/ospray/issues/287#issuecomment-441291535, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AXjNTTD8DpX3dH2PGnmkF1lYy9SNDJ41ks5uyDBRgaJpZM4Yw785.

loppirob commented 5 years ago

I make a simple program for testing but not work, same error:

int _tmain(int argc, _TCHAR* argv[]) { OSPDevice mydevice = ospNewDevice("default"); ospDeviceCommit(mydevice); ospSetCurrentDevice(mydevice);

Whats wrong?

Inviato da Postahttps://go.microsoft.com/fwlink/?LinkId=550986 per Windows 10


Da: Johannes Günther notifications@github.com Inviato: Friday, November 23, 2018 6:28:49 PM A: ospray/ospray Cc: loppirob; Author Oggetto: Re: [ospray/ospray] ospNewDevice("default"); dont work (#287)

This looks like a similar issue to #273https://github.com/ospray/ospray/issues/273: maybe an older installed embree.dll is loaded first? Basically some dynamic dependency (dll) could not be fulfilled.

Can you check whether the example programs (like ospExampleViewer.exe) in C:\ospray-1.7.2.windows\bin run out-of-the box? If yes, can you double-check that C:\ospray-1.7.2.windows\bin is early/first in PATH, or that all dlls (in particular ospray_module_ispc.dll and embree.dll) are copied into the Release folder?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/ospray/ospray/issues/287#issuecomment-441291535, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AXjNTTD8DpX3dH2PGnmkF1lYy9SNDJ41ks5uyDBRgaJpZM4Yw785.

loppirob commented 5 years ago

Maybe you can replicate the error with vc 2015 (or other compiler) and link C:\ospray-1.7.2.windows\lib\ospray.lib :

int _tmain(int argc, _TCHAR* argv[]) { OSPDevice mydevice = ospNewDevice("default"); ospDeviceCommit(mydevice); ospSetCurrentDevice(mydevice);

I run the program in the path with all your files inside bin directory (see the jpg attached)

Inviato da Postahttps://go.microsoft.com/fwlink/?LinkId=550986 per Windows 10


Da: Johannes Günther notifications@github.com Inviato: Friday, November 23, 2018 6:28:49 PM A: ospray/ospray Cc: loppirob; Author Oggetto: Re: [ospray/ospray] ospNewDevice("default"); dont work (#287)

This looks like a similar issue to #273https://github.com/ospray/ospray/issues/273: maybe an older installed embree.dll is loaded first? Basically some dynamic dependency (dll) could not be fulfilled.

Can you check whether the example programs (like ospExampleViewer.exe) in C:\ospray-1.7.2.windows\bin run out-of-the box? If yes, can you double-check that C:\ospray-1.7.2.windows\bin is early/first in PATH, or that all dlls (in particular ospray_module_ispc.dll and embree.dll) are copied into the Release folder?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/ospray/ospray/issues/287#issuecomment-441291535, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AXjNTTD8DpX3dH2PGnmkF1lYy9SNDJ41ks5uyDBRgaJpZM4Yw785.

loppirob commented 5 years ago

From dos i run this command inside your bin directory: ospexampleviewer --osp:device:default

The same error (see jpg attached).

I tryed this from all my PC, same error.

I cant solve this … can you help me?

Inviato da Postahttps://go.microsoft.com/fwlink/?LinkId=550986 per Windows 10


Da: Johannes Günther notifications@github.com Inviato: Friday, November 23, 2018 6:28:49 PM A: ospray/ospray Cc: loppirob; Author Oggetto: Re: [ospray/ospray] ospNewDevice("default"); dont work (#287)

This looks like a similar issue to #273https://github.com/ospray/ospray/issues/273: maybe an older installed embree.dll is loaded first? Basically some dynamic dependency (dll) could not be fulfilled.

Can you check whether the example programs (like ospExampleViewer.exe) in C:\ospray-1.7.2.windows\bin run out-of-the box? If yes, can you double-check that C:\ospray-1.7.2.windows\bin is early/first in PATH, or that all dlls (in particular ospray_module_ispc.dll and embree.dll) are copied into the Release folder?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/ospray/ospray/issues/287#issuecomment-441291535, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AXjNTTD8DpX3dH2PGnmkF1lYy9SNDJ41ks5uyDBRgaJpZM4Yw785.

johguenther commented 5 years ago

OK, I found the problem: contrary to the documentation the "default" device will currently only be found if the module "ispc" is loaded first. We will fix this in a future release, as a workaround now you can either

loppirob commented 5 years ago

Thanks for your patience, it now works perfectly

Inviato da Postahttps://go.microsoft.com/fwlink/?LinkId=550986 per Windows 10


Da: Johannes Günther notifications@github.com Inviato: Monday, November 26, 2018 11:05:03 AM A: ospray/ospray Cc: loppirob; Author Oggetto: Re: [ospray/ospray] ospNewDevice("default"); dont work (#287)

OK, I found the problem: contrary to the documentation the "default" device will currently only be found if the module "ispc" is loaded first. We will fix this in a future release, as a workaround now you can either

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/ospray/ospray/issues/287#issuecomment-441583635, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AXjNTbYEYcDjWfLtziL0H9sAmqwPxDqqks5uy7zPgaJpZM4Yw785.