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

music.Setup() fails if nest is imported #70

Open
cristianoalessandro opened this issue Mar 23, 2021 · 2 comments
Open

music.Setup() fails if nest is imported #70

cristianoalessandro opened this issue Mar 23, 2021 · 2 comments

Comments

@cristianoalessandro
Copy link

Hi all,

I recently found this issue. If nest is imported, music.Setup() complains that Setup constructor was already called.

#!/usr/bin/env python3

import music
import nest

import ctypes
ctypes.CDLL("libmpi.so", mode=ctypes.RTLD_GLOBAL)

setup = music.Setup()

running this simple code throws the error:

Error in MUSIC library: rank #0: Setup constructor was called a second time.
Only one Setup object can exist at any instance of time.

This is independent of the order of the two imports, and the issue disappears by commenting out import nest.

@mdjurfeldt
Copy link
Contributor

Right, but this is, at least almost, a feature.

As a MUSIC-aware application, NEST controls MUSIC. For example, it controls when switching to the Runtime phase and it calls the MUSIC tick() in its simulation loop.

By importing the MUSIC Python bindings, you indicate that you intend to do something similar.

Please explain what it is that you want to do in this script. If it is something reasonable, we might be able to provide novel MUSIC support for it.

@cristianoalessandro
Copy link
Author

cristianoalessandro commented Mar 23, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants