Hi!

I seek help in the following situation:

The optional package "meataxe" provides a header meataxe.h, defining a
variable
  extern char MtxLibDir[];
It is used by some of meataxe's functions to find certain data files.

sage/libs/meataxe.pxd exposes MtxLibDir to Sage, with
cdef extern from "meataxe.h":
    cdef extern char MtxLibDir[250]

The meataxe wrapper in sage.matrix.matrix_gfpn_dense does
    from sage.libs.meataxe cimport *
and assigns a value to MtxLibDir. It works: The meataxe functions called
from sage.matrix.matrix_gfpn_dense use the correct value of MtxLibDir.

Now, I am adding further modules to the sage library (converting my
oldstyle cohomology package to newstyle):
sage.groups.modular_cohomology.cohomology, ....resolution and
....cochain. They rely on a library of C functions that rely on
meataxe.h and call meataxe functions, and whose headers shall be exposed
to Sage in sage/libs/modular_resolution, which does
    from sage.libs.meataxe cimport *
(so, the new modules shall do from sage.libs.modular_resolution cimport *)

Problem: In meataxe functions called from the new modules, MtxLibDir
does not always have the correct value.

I did the following experiment: I printed the value of MtxLibDir visible
to each module when it is imported. Result:
- "matrix_gfpn_dense" is imported first and overrides meataxe's default
  value for MtxLibDir, defining the correct value.
- "cochain", "resolution" and "cohomology" are imported later, but both
  see the default value of MtxLibDir (which is bad).

Questions:
Is it expected that all meataxe functions and all modules in the Sage
library importing from sage.libs.meataxe see the value of MtxLibDir
defined in matrix_gfpn_dense?
* If it isn't: What else is needed to do?
* If it is: What could I do to find out at what point the correct value
  of MtxLibDir is reverted to the default value before loading the
  "cochain" module?

Best regards,
Simon


-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to