Bug 1793612 - bout++ fails to build with Python 3.9
Summary: bout++ fails to build with Python 3.9
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: bout++
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: david08741
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1788506
Blocks: PYTHON39
TreeView+ depends on / blocked
 
Reported: 2020-01-21 16:54 UTC by Miro Hrončok
Modified: 2020-05-22 11:50 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-22 11:50:16 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2020-01-21 16:54:21 UTC
bout++ fails to build with Python 3.9.0a2.

There are lot of test failures with:

RuntimeError: Run failed with 15.

Also:

Traceback (most recent call last):
  File "/builddir/build/BUILD/BOUT++-v4.3.0/build_mpich/tests/integrated/test-boutcore/collect-staggered/./runtest", line 20, in <module>
    fe = bc.Field3D.fromCollect("f3d_evolve", path='data', info=False)
  File "boutcore.pyx", line 126, in boutcore.Field3D.fromCollect
AttributeError: type object 'type' has no attribute 'fromMesh'

And:

INTERNAL ERROR: invalid error code fffffffe (Ring Index out of range) in MPID_nem_tcp_init:373

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.9/fedora-rawhide-x86_64/01170893-bout++/

For all our attempts to build bout++ with Python 3.9, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.9/package/bout++/

Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.9:
https://copr.fedorainfracloud.org/coprs/g/python/python3.9/

Let us know here if you have any questions.

Python 3.9 will be included in Fedora 33. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.9.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon.
We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 david08741 2020-01-21 17:22:39 UTC
Most of the issues are related to copr issues with MPI.

I have observed similar issues with mock and copr in the past due to MPI. Allowing network access can help.

Comment 2 Miro Hrončok 2020-01-21 17:30:21 UTC
Building with network enabled in https://copr.fedorainfracloud.org/coprs/g/python/python3.9/build/1171527/

Will get back here with results later.

Comment 3 david08741 2020-01-21 19:22:26 UTC
Will look into this:

Reading from input/BOUT.dmp.0.nc: [0-0][0-0] -> [0-0][0-0]
(1, 1, 1, 1)
initialized mesh
initialized mesh
Traceback (most recent call last):
  File "/builddir/build/BUILD/BOUT++-v4.3.0/build_mpich/tests/integrated/test-boutcore/collect/./runtest", line 33, in <module>
    temp = bc.Field3D.fromCollect("f3d", path="input")
  File "boutcore.pyx", line 126, in boutcore.Field3D.fromCollect
AttributeError: type object 'type' has no attribute 'fromMesh'
	Option datadir = input ()
	Option settingsfile = BOUT.settings ()
Writing options to file input/BOUT.settings


----- test-boutcore/collect-staggered -----
Traceback (most recent call last):
  File "/builddir/build/BUILD/BOUT++-v4.3.0/build_mpich/tests/integrated/test-boutcore/collect-staggered/./runtest", line 20, in <module>
    fe = bc.Field3D.fromCollect("f3d_evolve", path='data', info=False)
  File "boutcore.pyx", line 126, in boutcore.Field3D.fromCollect
AttributeError: type object 'type' has no attribute 'fromMesh'

Comment 4 david08741 2020-01-22 11:30:15 UTC
So, I am not sure why this broke:

class Field3D:
    @classmethod
    def fromMesh(cls,mesh=None):
        pass

    @classmethod
    def fromCollect(cls,...):
        cls.fromMesh(mesh)

It seems cls is now from type `type` - rather then `Field3D`
A work around would be to call `Field3D.fromMesh(mesh)`, rather then `cls.fromMesh(mesh)`, however I am not sure why the `cls` version is wrong?

Is that a bug in python / Cython?

Comment 5 Miro Hrončok 2020-01-22 11:51:12 UTC
> It seems cls is now from type `type` - rather then `Field3D`

cls should be Field3D of type `type`.


In Python, this works. So I assume this is a Cython problem.

$ python3.9
>>> class Field3D:
...     @classmethod
...     def fromMesh(cls,mesh=None):
...         pass
...     @classmethod
...     def fromCollect(cls):
...         cls.fromMesh()
... 
>>> Field3D.fromCollect()
>>>

Comment 6 david08741 2020-01-23 17:51:29 UTC
The failing classmethod example seems to be the cause of this failure.

Depends thus on https://bugzilla.redhat.com/show_bug.cgi?id=1788506

Comment 7 Ben Cotton 2020-02-11 17:26:43 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 32 development cycle.
Changing version to 32.

Comment 8 Miro Hrončok 2020-05-21 11:30:08 UTC
We have workarounded bz1788506, but recent bout++ builds fail with a different problem:

https://copr.fedorainfracloud.org/coprs/g/python/python3.9/package/bout++/

Comment 9 david08741 2020-05-22 10:19:12 UTC
It seems networking is disabled.

Could you re-enable and try again?

I have opened a bug against mock:
https://bugzilla.redhat.com/show_bug.cgi?id=1839007

Comment 10 Miro Hrončok 2020-05-22 10:24:31 UTC
> It seems networking is disabled. Could you re-enable and try again?

Sure, I forgot about this problem.

https://copr.fedorainfracloud.org/coprs/g/python/python3.9/package/bout++/

Comment 11 Miro Hrončok 2020-05-22 11:50:16 UTC
It built. Thanks.


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