mitsuba2 icon indicating copy to clipboard operation
mitsuba2 copied to clipboard

Set asmjit to be linked statically on Windows

Open Microno95 opened this issue 2 years ago • 0 comments

Description

Fixes the issue of loading mitsuba in python on Windows when loading separate modules that depend on a different version of asmjit. Windows does not support loading of multiple versions of a shared library within one process.

Fixes #411

asmjit is statically compiled whenever mitsuba is compiled under Windows.

Testing

Tested that both pytorch and mitsuba can now be imported simultaneously in python on Windows, specifically python 3.8 with pytorch==1.9.0.

Code successfully compiles for all non-double and non-polarized modes on Windows and Ubuntu 20.04. I am unable to compile double modes regardless of the changes in this PR hence I could not test them.

Checklist:

  • [x] My code follows the style guidelines of this project
  • [x] My changes generate no new warnings
  • [x] My code also compiles for gpu_* and packet_* variants. If you can't test this, please leave below
  • [x] I have commented my code
  • [x] I have made corresponding changes to the documentation
  • [x] I have added tests that prove my fix is effective or that my feature works
  • [x] I cleaned the commit history and removed any "Merge" commits
  • [x] I give permission that the Mitsuba 2 project may redistribute my contributions under the terms of its license

Notes:

All but 171 tests passed on Ubuntu, many of the errors were one of the following:

  • [Sampler] Assertion "m_sample_index < (m_sample_count / m_samples_per_wavefront)" failed in...
  • TypeError: unsupported operand type(s) for &: 'enoki.dynamic.Vector3m' and 'enoki.scalar.Vector3m'
  • Error while loading "<string>" (near line 1, col 1): could not instantiate shape plugin of type "ply"

Similar failures in Windows. Of note, the test in src/samplers/tests/test_orthogonal.py::test02_orthogonal_wavefront gave the error Windows fatal exception: stack overflow.

Microno95 avatar Aug 04 '21 20:08 Microno95