This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen
Bug 1151 - unnamed OpenMP critical section may interfer with user unnamed critical sections
Summary: unnamed OpenMP critical section may interfer with user unnamed critical sections
Status: RESOLVED FIXED
Alias: None
Product: Eigen
Classification: Unclassified
Component: Core - matrix products (show other bugs)
Version: 3.3 (current stable)
Hardware: All All
: Normal Performance Problem
Assignee: Nobody
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-21 10:43 UTC by fabien chêne
Modified: 2019-12-04 15:21 UTC (History)
2 users (show)



Attachments

Description fabien chêne 2016-01-21 10:43:47 UTC
In GeneralMatrixMatrix.h, I can see the presence of an OpenMP unnamed critical section. The problem is that it may interfer with user unnamed critical sections, if any.

One approach to tackle the problem would be to name the critical section with a somewhat unique identifier (eigen_mat_mul_critical_section or the like). Another (perhaps better) approach would be to use locks from OpenMP.

Incidentaly, I don't see the need for an atomic update within a critical section.
Comment 1 Gael Guennebaud 2016-01-21 13:30:50 UTC
hm, actually this critical section could be removed as we are already using an atomic. It seems that it has been introduced by error in the following commit:

https://bitbucket.org/eigen/eigen/commits/5a4ca1ad8c53b4a90044ac6c19de9015e53f5f16#LEigen/src/Core/products/GeneralMatrixMatrix.hT141

I've just removed it:
https://bitbucket.org/eigen/eigen/commits/7375e4a5b6f8/
Comment 2 Nobody 2019-12-04 15:21:44 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/1151.

Note You need to log in before you can comment on or make changes to this bug.