dilevin / osprayplot

MATLAB Interface to Intel's Ospray Visualization Toolkit
5 stars 0 forks source link

Doesn't work on Windows: Invalid MEX file #1

Open rarora7777 opened 4 years ago

rarora7777 commented 4 years ago

Result of running osprayplot_test

Warning: The following error was caught while executing 'osprayplot_handle' class
destructor:
Invalid MEX-file 'D:\dev\osprayplot\osprayplot_mex.mexw64': The specified module could
not be found.

Error in osprayplot_handle/delete (line 79)
            this.cpp_ptr = osprayplot_mex('del', this.cpp_ptr);

Error in osprayplot_handle (line 65)
            this.cpp_ptr = osprayplot_mex('new');

Error in ospraytsurf (line 15)
            f.ospray = osprayplot_handle;

Error in ospray_test (line 1)
f = figure; p = ospraytsurf(F,V); 
> In osprayplot_handle (line 65)
  In ospraytsurf (line 15)
  In ospray_test (line 1) 
Invalid MEX-file 'D:\dev\osprayplot\osprayplot_mex.mexw64': The specified module could
not be found.

Error in osprayplot_handle (line 65)
            this.cpp_ptr = osprayplot_mex('new');

Error in ospraytsurf (line 15)
            f.ospray = osprayplot_handle;

Error in ospray_test (line 1)
f = figure; p = ospraytsurf(F,V);

Running MATLAB R2020a on Windows 10 version 1909. Compiled using VS2019 (MSVC v142).

rarora7777 commented 4 years ago

Made some progress: Turns out I was not able to run Intel's own OSPRay example as well. I realized I had another version of TBB on the path which was superseding the TBB built as part of OSPRay. After fixing that issue, I am now able to run Intel's example, but opsrayplot still fails with a different error:

#ospray: INITIALIZATION ERROR --> could not open module lib ospray_module_ispc: The specified procedure could not be found.

#ospray: INITIALIZATION ERROR --> could not open module lib ospray_module_denoiser: The specified module could not be found.

Could not load denoiser 
#ospray: INITIALIZATION ERROR --> could not open module lib ospray_module_ispc: The specified procedure could not be found.

#ospray: INITIALIZATION ERROR --> null handle provided to ospDeviceCommit
dilevin commented 4 years ago

This is due to the fact that ospray loads compiled modules dynamically. I think the fix will be to make sure that the directory containing libospray_module_ispc.dll is in your PATH environment variable.

rarora7777 commented 4 years ago

I already made sure that it is. It's in the environment PATH as well as MATLAB path. :(