Skip to content
This repository was archived by the owner on Mar 25, 2025. It is now read-only.

Warning when using SymPy with multiple files #1481

@JCGoran

Description

@JCGoran

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions