mitsuba-renderer / mitsuba3

Mitsuba 3: A Retargetable Forward and Inverse Renderer
https://www.mitsuba-renderer.org/
Other
2.09k stars 246 forks source link

"mitsuba.exe" is not responding #1373

Closed free7187 closed 1 week ago

free7187 commented 2 weeks ago

Summary

I have locally cloned the latest Mitsuba repository, compiled it, and successfully generated the corresponding mitsuba.exe . However, it's strange that when I run mitsuba.exe in the command prompt, it doesn't respond, even though I can call the compiled Mitsuba through Python:

import sys
sys.path.insert(0, "./mitsuba3/build/Release/python")
import mitsuba as mi
import drjit as dr 
...

But calling it through Python seems a bit odd and inefficient. I would like to know how to resolve the issue of mitsuba.exe not responding.

Additionally, I'm sorry I can't provide information from python -m mitsuba.sys_info. When I run this command, I encounter the following error:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "D:\hch\experiment\3d_face\nb_bssrdf\mitsuba3\build\Release\python\mitsuba\python\sys_info.py", line 97, in <module>
    llvm_version = dr.llvm_version()
                   ^^^^^^^^^^^^^^^
AttributeError: module 'drjit' has no attribute 'llvm_version'
merlinND commented 2 weeks ago

Hello @free7187,

First of all, please note that the current master branch is still under heavy development. You can clone & build the latest release tag (v3.5.2) to be safer.

That being said, I don't think that mitsuba.exe should hang even on master. What command are you running exactly? For example, mitsuba.exe -h should display the help without issues.

By compiling in debug mode and launching mitsuba.exe in a debugger, you should be able to pause execution to find out where the program is hanging.

merlinND commented 2 weeks ago

@njroussel I can reproduce the issue with python -m mitsuba.sys_info locally, perhaps the script needs to be adapted to some drjit-side changes?

njroussel commented 2 weeks ago

Hi

I've updated/fixed the script in https://github.com/mitsuba-renderer/mitsuba3/commit/8402793871ce23ebc484cb147ce939fd63abee0e.

free7187 commented 2 weeks ago

@merlinND Thanks for your help. After the modification, I can now get the following system information:

System information:

  OS: Windows-10
  CPU: Intel64 Family 6 Model 183 Stepping 1, GenuineIntel
  GPU: NVIDIA GeForce RTX 4090
  Python: 3.11.4 (tags/v3.11.4:d2340ef, Jun  7 2023, 05:45:37) [MSC v.1934 64 bit (AMD64)]
  NVidia driver: 560.94
  CUDA: 11.8.89
  LLVM: 15.-1.-1

  Dr.Jit: 0.4.2
  Mitsuba: 3.5.0
     Is custom build? False
     Compiled with: MSVC 19.36.32535.0
     Variants:
        scalar_rgb
        scalar_spectral
        cuda_ad_rgb
        cuda_ad_spectral
        cuda_spectral
        llvm_ad_rgb
        llvm_ad_spectral

But there is something weird. I know this might sound odd, but I don't think the above information reflects the correct version of Mitsuba I’m currently using. One piece of evidence is that my Dr.Jit includes the file .\include\drjit\python.h, but when I look at the code in Dr.Jit’s tags v0.4.2, this file is not included there.

merlinND commented 2 weeks ago

Hello @free7187,

I don't see anything shocking in the system information above. I think the way to troubleshoot this will be to build in debug mode, start mitsuba.exe, wait for it to "hang", pause the debugger and report the stack trace.

A couple more questions:

  1. What is the exact command that you run which results in the hang?
  2. Does mitsuba.exe -h prints the help text without hanging?
free7187 commented 1 week ago

I resolved my bug; the issue was that there were no drjit-extra.dll and drjit-core.dll files in my build\Release folder, but they were present in the python folder. After copying them over, the program ran smoothly.

njroussel commented 1 week ago

Thanks for reporting that, I'll have a look at why those libraries aren't copied to the right place.