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

Warning when using SymPy with multiple files #1481

Open
JCGoran opened this issue Sep 30, 2024 · 1 comment
Open

Warning when using SymPy with multiple files #1481

JCGoran opened this issue Sep 30, 2024 · 1 comment

Comments

@JCGoran
Copy link
Contributor

JCGoran commented Sep 30, 2024

When running NMODL on multiple mod files (such as nmodl file1.mod file2.mod ...) with SymPy enabled, a cryptic warning appears:

context.c:56: warning: mpd_setminalloc: ignoring request to set MPD_MINALLOC a second time

From this SO answer it seems the culprit is this line in cPython.

Possible solutions:

  1. init the interpreter once, at the beginning of the program, and then close it at the very end
  2. use something like Py_IsInitialized to check if the interpreter is running (part of stable ABI). This also needs the Python.h header
@1uc
Copy link
Collaborator

1uc commented Sep 30, 2024

Third option, only allow one MOD file at a time.

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