Crash with some add-ons using OpenMP (conflict initializing) #125255

Closed
opened 2024-07-22 22:21:38 +02:00 by Erick-Phillips · 37 comments

EDIT since reporting, this looks to be a conflict with an add-ons use of OpenMP, not directly related to bevel ~ideasman42.

System Information
Operating system: MacOS 14.5
Graphics card: M3Max

Blender Version
Broken: 3.6.13, & 4.2
Worked: Neither

The second I hit CTRL + B and move the mouse to bevel an edge loop Blender immediately crashes before any visual representation of the bevel operation and goes straight to my desktop in both LTS versions of Blender.

Exact steps for others to reproduce the error

Add Cylinder

Select top or bottom edge loop

CTRL + B

move mouse

Crash straight to desktop

  • Also happens with mesh circle if I fill and extrude to be a cylinder shape (that's how it first started happening)

  • If I select all in edit mode and then bevel it works but that's not a fix

**EDIT** _since reporting, this looks to be a conflict with an add-ons use of OpenMP, not directly related to bevel ~ideasman42._ **System Information** Operating system: MacOS 14.5 Graphics card: M3Max **Blender Version** Broken: 3.6.13, & 4.2 Worked: Neither The second I hit CTRL + B and move the mouse to bevel an edge loop Blender immediately crashes before any visual representation of the bevel operation and goes straight to my desktop in both LTS versions of Blender. **Exact steps for others to reproduce the error** Add Cylinder Select top or bottom edge loop CTRL + B move mouse Crash straight to desktop - Also happens with mesh circle if I fill and extrude to be a cylinder shape (that's how it first started happening) - If I select all in edit mode and then bevel it works but that's not a fix
Erick-Phillips added the
Type
Report
Severity
Normal
Status
Needs Triage
labels 2024-07-22 22:21:39 +02:00
Member

Hi, thanks for the report. Unable to confirm the crash. Could you share crash logs?: https://docs.blender.org/manual/en/dev/troubleshooting/crash.html#macos

Hi, thanks for the report. Unable to confirm the crash. Could you share crash logs?: https://docs.blender.org/manual/en/dev/troubleshooting/crash.html#macos
Pratik Borhade added
Status
Needs Information from User
and removed
Status
Needs Triage
labels 2024-07-23 07:56:31 +02:00
Author

Hi, thanks for the report. Unable to confirm the crash. Could you share crash logs?: https://docs.blender.org/manual/en/dev/troubleshooting/crash.html#macos

> Hi, thanks for the report. Unable to confirm the crash. Could you share crash logs?: https://docs.blender.org/manual/en/dev/troubleshooting/crash.html#macos
Author

Just in case here is the issue happening:

Just in case here is the issue happening:

I can confirm that Blender also crashes to desktop in the same scenario on an Intel based machine.

System Information
Operating system: MacOS 14.5
Graphics card: AMD Radeon RX 6800 XT 16 GB

Blender Version
Broken: 4.2

Works as expected in Blender 4.1.1

I can confirm that Blender also crashes to desktop in the same scenario on an Intel based machine. System Information Operating system: MacOS 14.5 Graphics card: AMD Radeon RX 6800 XT 16 GB Blender Version Broken: 4.2 Works as expected in Blender 4.1.1
Member

Thanks, still unable to confirm. From logs, crash occurred during matrix calculation: adjust_the_cycle_or_chain() -> EIG_linear_solver_solve()
@Alaska hi, can you replicate this on mac?

Thanks, still unable to confirm. From logs, crash occurred during matrix calculation: `adjust_the_cycle_or_chain() -> EIG_linear_solver_solve()` @Alaska hi, can you replicate this on mac?
Member

I am personally unable to reproduce the issue in Blender 4.2.0.

Does the issue occur if you use default settings?

  1. Select from the top of Blender File -> Default -> Load Factory Settings
  2. Try and reproduce the issue.
I am personally unable to reproduce the issue in Blender 4.2.0. Does the issue occur if you use default settings? 1. Select from the top of Blender `File -> Default -> Load Factory Settings` 2. Try and reproduce the issue.
Author

Yes. It happens with Factory settings in both 3.6 and 4.2

Yes. It happens with Factory settings in both 3.6 and 4.2
Member

Maybe there's some issue in macOS 14.5? I'm still on 14.4. I'll try updating and see how it goes.

Maybe there's some issue in macOS 14.5? I'm still on 14.4. I'll try updating and see how it goes.
Member

Nope, updating to 14.5 didn't change the results for me.

@lichtwerk or @iss can you reproduce the issue on your Macs?

Nope, updating to 14.5 didn't change the results for me. @lichtwerk or @iss can you reproduce the issue on your Macs?
Member

Nope can't repro here

**System Information**
Operating system: macOS-14.5-arm64-arm-64bit 64 Bits
Graphics card: Metal API Apple M2 1.2
version: 4.2.0, branch: blender-v4.2-release, commit date: 2024-07-16 06:20, hash: `a51f293548ad`
Nope can't repro here ``` **System Information** Operating system: macOS-14.5-arm64-arm-64bit 64 Bits Graphics card: Metal API Apple M2 1.2 version: 4.2.0, branch: blender-v4.2-release, commit date: 2024-07-16 06:20, hash: `a51f293548ad` ```
Author

This is disappointing. It is weird that it's also happening in 3.6 LTS. Maybe it's limited to M3 or maybe I need to completely remove blender from my system and reinstall?

This is disappointing. It is weird that it's also happening in 3.6 LTS. Maybe it's limited to M3 or maybe I need to completely remove blender from my system and reinstall?
Member

You can try that but i don't think it would make any difference.
In 3.6, does it work with OpenGL backend? 🤔

You can try that but i don't think it would make any difference. In 3.6, does it work with OpenGL backend? 🤔
Author

No. Immediate crash.

No. Immediate crash.
Pratik Borhade added
Status
Needs Triage
and removed
Status
Needs Information from User
labels 2024-07-26 07:43:25 +02:00
Author

I just did a test and it's working fine in Blender 4.1. So I guess that's my fix for now.

I also tried multiple 3.6 versions including 3.6.0 and they all crash immediately.

I just did a test and it's working fine in Blender 4.1. So I guess that's my fix for now. I also tried multiple 3.6 versions including 3.6.0 and they all crash immediately.

No crash here as well with MacOS 14.5 and 5700 XT

No crash here as well with MacOS 14.5 and 5700 XT
Pratik Borhade changed title from Bevel in Edit Mode to Crash with Bevel tool 2024-08-01 08:06:02 +02:00
Pratik Borhade added the
Platform
macOS
label 2024-08-01 08:11:27 +02:00
Bart van der Braak added
Type
Bug
and removed
Type
Report
labels 2024-08-14 12:55:25 +02:00

Operating system: MacOS 15.0
Graphics card: M3Pro
Blender Version 4.1

Hi, relatively new to Blender, and having the same issue, was working fine until recently but now whenever I try to bevel an edge Blender immediately crashes.

Operating system: MacOS 15.0 Graphics card: M3Pro Blender Version 4.1 Hi, relatively new to Blender, and having the same issue, was working fine until recently but now whenever I try to bevel an edge Blender immediately crashes.
Member

@Shane-Murphy-4 Does the issue occur in 4.2? And if it does, can you share a crash log? https://docs.blender.org/manual/en/dev/troubleshooting/crash.html#macos

@Shane-Murphy-4 Does the issue occur in [4.2](https://www.blender.org/download)? And if it does, can you share a crash log? https://docs.blender.org/manual/en/dev/troubleshooting/crash.html#macos

@Alaska It occurs in 4.2 as well, I am attaching a crash log. Thank you.

@Alaska It occurs in 4.2 as well, I am attaching a crash log. Thank you.

Hello, I am experiencing the same issue. Strangely, the command works when I create a cube, for example, or even with Suzanne. However, as soon as I extrude something, Blender crashes immediately. I am attaching the crash log for reference.

On my Windows PC, I have the same add-ons and preferences, but no problems occur.

Oh, and when i use a bevel modifier it crashes too.

Hello, I am experiencing the same issue. Strangely, the command works when I create a cube, for example, or even with Suzanne. However, as soon as I extrude something, Blender crashes immediately. I am attaching the crash log for reference. On my Windows PC, I have the same add-ons and preferences, but no problems occur. Oh, and when i use a bevel modifier it crashes too.
Member

Thank you for sharing the information.

Considering we've now got 3 reports of the same issue, all with the same crash log, I believe we can confirm this issue. And since it is a crash, we should set it to high severity. Sadly it may not be fixed quickly as so far we haven't been able to confirm the issue.

Thank you for sharing the information. Considering we've now got 3 reports of the same issue, all with the same crash log, I believe we can confirm this issue. And since it is a crash, we should set it to high severity. Sadly it may not be fixed quickly as so far we haven't been able to confirm the issue.
Alaska added
Module
Modeling
Severity
High
Status
Confirmed
and removed
Severity
Normal
Status
Needs Triage
labels 2024-10-23 15:23:28 +02:00
Member

I tried it on Blender 4.2.3 (the LTS) on MacOS 15.0.1, on a Macbook Pro with M3 silicon. It didn't crash.

The crash log shows it crashing in the Eigen routine that is called when trying to optimize the offsets when "loop slide" is on. But when I tested, loop slide was on, so I don't know what is going on.

I tried it on Blender 4.2.3 (the LTS) on MacOS 15.0.1, on a Macbook Pro with M3 silicon. It didn't crash. The crash log shows it crashing in the Eigen routine that is called when trying to optimize the offsets when "loop slide" is on. But when I tested, loop slide was on, so I don't know what is going on.
Author

Seeing people start to confirm this issue. I just want to update that’s it’s still happens in 4.2.3 with M3max.

The current fix is using blender 4.1.0.

Seeing people start to confirm this issue. I just want to update that’s it’s still happens in 4.2.3 with M3max. The current fix is using blender 4.1.0.

It’s very strange. It doesn’t seem to be consistent under the same conditions.

I’m using an M2 Pro.

It’s very strange. It doesn’t seem to be consistent under the same conditions. I’m using an M2 Pro.
Member

Erick-Phillips: I have an M3max too (but MacOS 15.0.1), and can't make it crash. Does it happen for you on the current Alpha build? https://builder.blender.org/download/daily/

Erick-Phillips: I have an M3max too (but MacOS 15.0.1), and can't make it crash. Does it happen for you on the current Alpha build? https://builder.blender.org/download/daily/
Member

Looking at a similar crash dump in imagemagick, I wonder if the issue is similar to what is discussed there -- that MacOS has an open MP library dynamic library (libomp.dylib) and it has already initialized openMP when we try to do it again.
Erick-Phllips, perhaps you could try this:
when Blender is running, in a command window, type

ps x | grep Blender

There should be two lines of output. The first one (has Blender.app in it) starts is a process id, e.g., 34922. Next type

lsof -p 34922 | grep libomp.dynlib
(replace 34922 with your actual process id)
and report the results here.

Looking at a [similar crash dump in imagemagick]([url](https://github.com/ropensci/magick/issues/170)), I wonder if the issue is similar to what is discussed there -- that MacOS has an open MP library dynamic library (libomp.dylib) and it has already initialized openMP when we try to do it again. Erick-Phllips, perhaps you could try this: when Blender is running, in a command window, type ps x | grep Blender There should be two lines of output. The first one (has Blender.app in it) starts is a process id, e.g., 34922. Next type lsof -p 34922 | grep libomp.dynlib (replace 34922 with your actual process id) and report the results here.
Contributor

I don't have a Mac to check, but this issue is likely caused by the molecular + add-on, all the crash reports listed in this issue contain a library core.cpython-311-darwin.so UUID=93c964b4-c344-38a6-bdbc-ff9f8d748b9a from an add-on in their image list. This UUID matches with the library in version 1.17.20 of the add-on. This library contains a statically linked copy of OpenMP which conflicts with Blender's version. Somebody already reported this issue to the add-on before: u3dreal/molecular-plus#43, but it doesn't seem like it got properly addressed there.

I don't have a Mac to check, but this issue is likely caused by the [molecular +](https://github.com/u3dreal/molecular-plus) add-on, all the crash reports listed in this issue contain a library `core.cpython-311-darwin.so` `UUID=93c964b4-c344-38a6-bdbc-ff9f8d748b9a` from an add-on in their image list. This UUID matches with the library in version [1.17.20](https://github.com/u3dreal/molecular-plus/releases/tag/1.17.20) of the add-on. This library contains a statically linked copy of OpenMP which conflicts with Blender's version. Somebody already reported this issue to the add-on before: [u3dreal/molecular-plus#43](https://github.com/u3dreal/molecular-plus/issues/43), but it doesn't seem like it got properly addressed there.

I don't have a Mac to check, but this issue is likely caused by the molecular + add-on, all the crash reports listed in this issue contain a library core.cpython-311-darwin.so UUID=93c964b4-c344-38a6-bdbc-ff9f8d748b9a from an add-on in their image list. This UUID matches with the library in version 1.17.20 of the add-on. This library contains a statically linked copy of OpenMP which conflicts with Blender's version. Somebody already reported this issue to the add-on before: u3dreal/molecular-plus#43, but it doesn't seem like it got properly addressed there.

I just removed the Molecular + add-on and everything is working fine again, thanks so much!

> I don't have a Mac to check, but this issue is likely caused by the [molecular +](https://github.com/u3dreal/molecular-plus) add-on, all the crash reports listed in this issue contain a library `core.cpython-311-darwin.so` `UUID=93c964b4-c344-38a6-bdbc-ff9f8d748b9a` from an add-on in their image list. This UUID matches with the library in version [1.17.20](https://github.com/u3dreal/molecular-plus/releases/tag/1.17.20) of the add-on. This library contains a statically linked copy of OpenMP which conflicts with Blender's version. Somebody already reported this issue to the add-on before: [u3dreal/molecular-plus#43](https://github.com/u3dreal/molecular-plus/issues/43), but it doesn't seem like it got properly addressed there. I just removed the Molecular + add-on and everything is working fine again, thanks so much!
Author

It was molecular+. Thank you.

It was molecular+. Thank you.
Member

Thanks for tracking this down everyone. I will see if there's a way to check for this and use a workaround for bevel that avoids using the linear solver if this problem exists. But likely there are other areas of Blender that use openmp (e.g., I suspect motion matching), that will also fail under such circumstances,

Thanks for tracking this down everyone. I will see if there's a way to check for this and use a workaround for bevel that avoids using the linear solver if this problem exists. But likely there are other areas of Blender that use openmp (e.g., I suspect motion matching), that will also fail under such circumstances,
Campbell Barton changed title from Crash with Bevel tool to Crash with some add-ons using OpenMP (conflict initializing) 2024-10-29 23:34:31 +01:00
Campbell Barton added
Module
Platforms, Builds & Tests
and removed
Module
Modeling
labels 2024-10-29 23:37:03 +01:00

I think I just had the same problem, when I clicked "Solve Camera Motion" I got

cmolcore imported  v1.14.5
2024-11-10 12:48:41.486 Blender[5735:241248] +[IMKClient subclass]: chose IMKClient_Modern
2024-11-10 12:48:41.486 Blender[5735:241248] +[IMKInputSession subclass]: chose IMKInputSession_Modern
Read blend: "/Users/georg/Documents/Work/blender/423_camera_track/tracking.blend"
OMP: Error #15: Initializing libomp.dylib, but found libomp.a already initialized.
OMP: Hint This means that multiple copies of the OpenMP runtime have been linked into the program. That is dangerous, since it can degrade performance or cause incorrect results. The best thing to do is to ensure that only a single OpenMP runtime is linked into the process, e.g. by avoiding static linking of the OpenMP runtime in any library. As an unsafe, unsupported, undocumented workaround you can set the environment variable KMP_DUPLICATE_LIB_OK=TRUE to allow the program to continue to execute, but that may cause crashes or silently produce incorrect results. For more information, please see http://openmp.llvm.org/
Abort trap: 6

I uninstalled the molecular+ addon and the crash didn't occur any more after that.

I think I just had the same problem, when I clicked "Solve Camera Motion" I got ``` cmolcore imported v1.14.5 2024-11-10 12:48:41.486 Blender[5735:241248] +[IMKClient subclass]: chose IMKClient_Modern 2024-11-10 12:48:41.486 Blender[5735:241248] +[IMKInputSession subclass]: chose IMKInputSession_Modern Read blend: "/Users/georg/Documents/Work/blender/423_camera_track/tracking.blend" OMP: Error #15: Initializing libomp.dylib, but found libomp.a already initialized. OMP: Hint This means that multiple copies of the OpenMP runtime have been linked into the program. That is dangerous, since it can degrade performance or cause incorrect results. The best thing to do is to ensure that only a single OpenMP runtime is linked into the process, e.g. by avoiding static linking of the OpenMP runtime in any library. As an unsafe, unsupported, undocumented workaround you can set the environment variable KMP_DUPLICATE_LIB_OK=TRUE to allow the program to continue to execute, but that may cause crashes or silently produce incorrect results. For more information, please see http://openmp.llvm.org/ Abort trap: 6 ``` I uninstalled the molecular+ addon and the crash didn't occur any more after that.

@howardt I don't think we should be adding code that checks for potential conflicts. Bevel is one potential user of OpenMP. There are other usages in Blender (Mataflow, Bullet, Libmv, quadriflow). There might be other usages that are out of our control (in libraries we use in Blender). It will be very messy to add checks in all those places.

I also don't think it is solvable on Blender side. Maybe if OpenMP was linked statically we could hide symbols and that would have avoided the issue. But it could cause other issues (the things that the error message mentions). And the same issue with conflict could happen with other libraries.

Additionally, even if we find something we can do from Blender side to work around Molecular+ issues, if some other add-on pulls in another copy of OpenMP we'll be back to the original issue.

I don't see why OpenMP is a requirement for Molecular+. The only related call is see is the call for omp_set_max_active_levels(1). A commit message does not add clarity about why it is needed. From what I can see, there is nothing really essential and the OpenMP dependency can be removed form the add-on.

If i am missing something and the dependency is required, then there are few possible solutions:

  • Look maybe more built-in to a Python ways of multi-threading are a solution.
  • Maybe numpy can take care of some heavy calculations?
  • Find a way to use the same OpenMP runtime as Blender. It is unlikely OpenMP library will be removed from dependecnies any time soon.
  • Move the logic that does calculation and utilizes all those C interfaces etc to a separate process.

In any case, thanks everyone for the investigation. The issue needs to be reported to the Molecular+ repository. As long as it does the thing that is explicitly reported as very bad, we can not solve things form Blender side.

@howardt I don't think we should be adding code that checks for potential conflicts. Bevel is one potential user of OpenMP. There are other usages in Blender (Mataflow, Bullet, Libmv, quadriflow). There might be other usages that are out of our control (in libraries we use in Blender). It will be very messy to add checks in all those places. I also don't think it is solvable on Blender side. Maybe if OpenMP was linked statically we could hide symbols and that would have avoided the issue. But it could cause other issues (the things that the error message mentions). And the same issue with conflict could happen with other libraries. Additionally, even if we find something we can do from Blender side to work around Molecular+ issues, if some other add-on pulls in another copy of OpenMP we'll be back to the original issue. I don't see why OpenMP is a requirement for Molecular+. The only related call is see is the call for `omp_set_max_active_levels(1)`. A commit message does not add clarity about why it is needed. From what I can see, there is nothing really essential and the OpenMP dependency can be removed form the add-on. If i am missing something and the dependency is required, then there are few possible solutions: - Look maybe more built-in to a Python ways of multi-threading are a solution. - Maybe `numpy` can take care of some heavy calculations? - Find a way to use the same OpenMP runtime as Blender. It is unlikely OpenMP library will be removed from dependecnies any time soon. - Move the logic that does calculation and utilizes all those C interfaces etc to a separate process. In any case, thanks everyone for the investigation. The issue needs to be reported to the Molecular+ repository. As long as it does the thing that is explicitly reported as very bad, we can not solve things form Blender side.
Blender Bot added
Status
Archived
and removed
Status
Confirmed
labels 2024-11-13 14:31:22 +01:00
Contributor

@Sergey It seems that molecular + uses OpenMP through Cython (cython.parallel), so that is probably why it links to it.

Also, it might be useful to initialize OpenMP when Blender starts to make sure that this error is caught early when somebody tries to use their own OpenMP library. Something like calling omp_get_max_threads() in Blender's main might work to do that.

@Sergey It seems that molecular + uses OpenMP through Cython ([`cython.parallel`](https://cython.readthedocs.io/en/stable/src/userguide/parallelism.html)), so that is probably why it links to it. Also, it might be useful to initialize OpenMP when Blender starts to make sure that this error is caught early when somebody tries to use their own OpenMP library. Something like calling `omp_get_max_threads()` in Blender's main might work to do that.

so that is probably why it links to it.

Can it just assume dynamic linking and use our OpenMP? To ensure ABI compatibility can use headers from our precompiled libraries: https://projects.blender.org/blender/lib-macos_arm64/src/branch/main/openmp

Something like calling omp_get_max_threads() in Blender's main might work to do that

That could help indeed! Not sure, maybe would need to have some #ifdef, as OpenMP is an optional dependency.
Is it something you can help us looking into and create a PR?

> so that is probably why it links to it. Can it just assume dynamic linking and use our OpenMP? To ensure ABI compatibility can use headers from our precompiled libraries: https://projects.blender.org/blender/lib-macos_arm64/src/branch/main/openmp > Something like calling `omp_get_max_threads()` in Blender's main might work to do that That could help indeed! Not sure, maybe would need to have some `#ifdef`, as OpenMP is an optional dependency. Is it something you can help us looking into and create a PR?
Contributor

@Sergey I made a pull request to call omp_get_max_threads in main: !130407. I don't have a macOS device to test with, but I was able to recreate the issue on Linux by using a modified libomp. The PR causes Blender to crash as soon as an add-on tries to initialize a second libomp, which in the case of molecular+ happens as soon as it loads.

I was able to make the add-on link to Blender's libomp on Linux; I assume the same can be done on macOS as well. The libomp runtime shipped by Blender on macOS being an older version (9.0.1 I think) might cause issues when compiling with a newer Clang however, since it may try to link to symbols not present in the older runtime.

@Sergey I made a pull request to call `omp_get_max_threads` in main: !130407. I don't have a macOS device to test with, but I was able to recreate the issue on Linux by using a modified libomp. The PR causes Blender to crash as soon as an add-on tries to initialize a second libomp, which in the case of molecular+ happens as soon as it loads. I was able to make the add-on link to Blender's libomp on Linux; I assume the same can be done on macOS as well. The libomp runtime shipped by Blender on macOS being an older version (9.0.1 I think) might cause issues when compiling with a newer Clang however, since it may try to link to symbols not present in the older runtime.

@jorn Thanks for the PR!

For the macOS I am not sure i fully understand. We ship the same exact libraries versions on Linux and macOS. So there shouldn't be any discrepancy between platforms.

The library we ship is also something we're using for Blender. So you "just" need to use header and dylib/so from the precompiled mcos/linux libraries to ensure there is no conflict?

@jorn Thanks for the PR! For the macOS I am not sure i fully understand. We ship the same exact libraries versions on Linux and macOS. So there shouldn't be any discrepancy between platforms. The library we ship is also something we're using for Blender. So you "just" need to use header and dylib/so from the precompiled mcos/linux libraries to ensure there is no conflict?
Contributor

On Linux blender normally uses libgomp (from GCC) statically instead of libomp (from LLVM). That's why I had to make blender use libomp on Linux to test the pr. Currently blender only ships with libomp on macOS, but if compiling using clang on Linux/Windows you can make it use libomp as well. The prebuilt libraries for those platforms do not have libomp so you'll have to use the toolchain's version. libgomp (GCC) and vcomp140 (MSVC) don't seem to care about duplicate runtimes.

About the version being older, there is this in versions.cmake:

if(APPLE)
# Cloth physics test is crashing due to this bug:
# https://bugs.llvm.org/show_bug.cgi?id=50579
set(OPENMP_VERSION 9.0.1)
set(OPENMP_HASH 6eade16057edbdecb3c4eef9daa2bfcf)
else()
set(OPENMP_VERSION ${LLVM_VERSION})
set(OPENMP_HASH 5cc01d151821c546bb4ec6fb03d86c29)
endif()

(But v9.0.1 is not in lib-source for some reason)

Clang might try to use an internal runtime function not present in older versions of the runtime sometimes, for example clang-19 uses a symbol not in v9.0.1 of libomp sometimes (__kmpc_dispatch_deinit), but there might be more of those I'm not aware of. This would then cause missing symbols errors during linking or while loading the module. You can probably avoid this by not using OpenMP 5 features and not using a very recent clang when building an add-on.

On Linux blender normally uses libgomp (from GCC) statically instead of libomp (from LLVM). That's why I had to make blender use libomp on Linux to test the pr. Currently blender only ships with libomp on macOS, but if compiling using clang on Linux/Windows you can make it use libomp as well. The prebuilt libraries for those platforms do not have libomp so you'll have to use the toolchain's version. libgomp (GCC) and vcomp140 (MSVC) don't seem to care about duplicate runtimes. About the version being older, there is this in `versions.cmake`: https://projects.blender.org/blender/blender/src/commit/e8770a38455f20922da7bf9db9d279a2be3799f0/build_files/build_environment/cmake/versions.cmake#L291-L299 (But v9.0.1 is not in `lib-source` for some reason) Clang might try to use an internal runtime function not present in older versions of the runtime sometimes, for example clang-19 uses a symbol not in v9.0.1 of libomp sometimes (`__kmpc_dispatch_deinit`), but there might be more of those I'm not aware of. This would then cause missing symbols errors during linking or while loading the module. You can probably avoid this by not using OpenMP 5 features and not using a very recent clang when building an add-on.

The lib-source is generated on Linux, so is likely why it doesn't include the OpenMP 9.

I was trying to go back to the root of the reason why OpenMP library is present in the molecular. You've mentioned this is because of cpython.parallel. We do ship cython.parallel by the looks of it, but not the cython.cimports (which is present in the OpenMP example). What happens in Blender is

>>> from cython.parallel import parallel
>>> from cython.cimports import openmp
Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
ModuleNotFoundError: No module named 'cython.cimports'; 'cython' is not a package

Wouldn't it be easier if we make cython.parallel more complete, with the environment we control so people wouldn't need to go into all those extents of bundling own OPenMP libraries and such? Or maybe it's just a bug which we need to solve?

The lib-source is generated on Linux, so is likely why it doesn't include the OpenMP 9. I was trying to go back to the root of the reason why OpenMP library is present in the molecular. You've mentioned this is because of `cpython.parallel`. We do ship `cython.parallel` by the looks of it, but not the `cython.cimports` (which is present in the OpenMP [example](https://cython.readthedocs.io/en/stable/src/userguide/parallelism.html#using-openmp-functions)). What happens in Blender is ``` >>> from cython.parallel import parallel >>> from cython.cimports import openmp Traceback (most recent call last): File "<blender_console>", line 1, in <module> ModuleNotFoundError: No module named 'cython.cimports'; 'cython' is not a package ``` Wouldn't it be easier if we make `cython.parallel` more complete, with the environment we control so people wouldn't need to go into all those extents of bundling own OPenMP libraries and such? Or maybe it's just a bug which we need to solve?
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
12 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#125255
No description provided.