Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enabling thread safety for NTL #29267

Open
edgarcosta opened this issue Mar 2, 2020 · 16 comments
Open

enabling thread safety for NTL #29267

edgarcosta opened this issue Mar 2, 2020 · 16 comments

Comments

@edgarcosta
Copy link
Member

This ticket tries to enable threads in the NTL build, as suggested in #27764.

4 years ago, as of the NTL upgrade ticket #20590, we weren't ready to have NTL built with thread safety because of a lack of support for c++11. (On that ticket, it was noted "we cannot take advantage of the threading until a number of things are resolved. Threading requires C++11 and a number of packages are behind the curve.")

What about now?

########## thread safety

NTL_THREADS=on

# Set to 'on' if you want to compile NTL in thread-safe mode.  This requires
# several C++11 features, including atomic types, mutexes, and thread_local
# storage.  Your compiler may not yet support these features.  Setting this
# flag will automatically set the NTL_STD_CXX11 flag (if neither NTL_STD_CXX11
# or NTL_STD_CXX14 is already set). It will also pass -pthread throught to the
# compiler via CXXAUTOFLAGS (if possible).

Also do we need to change any cython files? For example, add something like:
# distutils: extra_compile_args = -std=c++11?

CC: @kiwifb @jpflori @dimpase @mwageringel @antonio-rojas

Component: packages: standard

Author: Edgar Costa

Branch/Commit: u/edgarcosta/threadsafe @ de7c0fc

Issue created by migration from https://trac.sagemath.org/ticket/29267

@edgarcosta
Copy link
Member Author

Author: Edgar Costa

@videlec
Copy link
Contributor

videlec commented Mar 15, 2020

comment:2

According to our documentation, we support gcc 4.8 in which c++ 11 support is experimental. If NTL does not automatically pick-up the correct configuration with old gcc, this is an upstream bug. However, this ought to be tested.

@videlec
Copy link
Contributor

videlec commented Mar 15, 2020

comment:3

As mentioned in the ticket description, it would be good to have the docutils directive in the Cython headers for ntl. src/libs/src/sage/libs/ntl/types.pxd should be enough.

@mkoeppe
Copy link
Member

mkoeppe commented Mar 19, 2020

comment:4

Needs rebasing

@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Member

mkoeppe commented Mar 19, 2020

comment:5

As noted on duplicate ticket #29340:

Enabling threads in NTL will require work on at least the following:

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 22, 2020

Branch pushed to git repo; I updated commit sha1. New commits:

0e0bd5fadd extra flags

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 22, 2020

Changed commit from b858504 to 0e0bd5f

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 22, 2020

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

2c2f57denabling NTL threadsafe
de7c0fcadd extra flags

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 22, 2020

Changed commit from 0e0bd5f to de7c0fc

@edgarcosta
Copy link
Member Author

comment:8

I have rebased on top of develop and added # distutils: extra_compile_args = -std=c++11 to src/libs/src/sage/libs/ntl/types.pxd.

@mkoeppe
Copy link
Member

mkoeppe commented Mar 24, 2020

comment:9

Tests run at https://github.com/mkoeppe/sage/actions/runs/62362311

@mkoeppe
Copy link
Member

mkoeppe commented Apr 14, 2020

comment:10

Batch modifying tickets that will likely not be ready for 9.1, based on a review of the ticket title, branch/review status, and last modification date.

@mkoeppe mkoeppe modified the milestones: sage-9.1, sage-9.2 Apr 14, 2020
@mkoeppe mkoeppe modified the milestones: sage-9.2, sage-9.3 Aug 13, 2020
@mkoeppe
Copy link
Member

mkoeppe commented Mar 24, 2021

comment:12

Sage development has entered the release candidate phase for 9.3. Setting a new milestone for this ticket based on a cursory review of ticket status, priority, and last modification date.

@mkoeppe mkoeppe modified the milestones: sage-9.3, sage-9.4 Mar 24, 2021
@mkoeppe
Copy link
Member

mkoeppe commented Jul 19, 2021

comment:13

Setting a new milestone for this ticket based on a cursory review.

@mkoeppe mkoeppe modified the milestones: sage-9.4, sage-9.5 Jul 19, 2021
@mkoeppe
Copy link
Member

mkoeppe commented Dec 18, 2021

comment:14

Stalled in needs_review or needs_info; likely won't make it into Sage 9.5.

@mkoeppe mkoeppe modified the milestones: sage-9.5, sage-9.6 Dec 18, 2021
@mkoeppe mkoeppe modified the milestones: sage-9.6, sage-9.7 Apr 7, 2022
@mkoeppe mkoeppe modified the milestones: sage-9.7, sage-9.8 Sep 19, 2022
@mkoeppe mkoeppe removed this from the sage-9.8 milestone Jan 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants