Hi,
I work on a project where users can use numerical solvers in a cross-language manner.
In this project, arrays are passed as pointers to the actual data and re-wrapped in different languages according to their shapes (that is, in Python a NumPy array is built, for Julia native array is built, so on). All this changes happen using Python C API and Julia C API, without using any packages for conversion.
Something has happened after upgrading from Julia 1.11.8 to 1.12.4, and arrays are not passed correctly anymore because the dimensions on the Julia size somehow are not set correctly.
I mean, I have not changed anything in my code: this error occurs only due to the change in the used Julia version.
I change only the Julia version using juliaup add ... and juliaup default ... commands.
Then I remove the built code completely (make clean) and build it again (make debug).
With Julia 1.11.8:
ipdb> p y.shape
(1,)
which is correct, as I am passing a 1D array with only one element.
With Julia 1.12.0:
ipdb> p y.shape
(135881294944352,)
Running the second time, I get a different "shape": `(130044954482816,)`, which kinda gives me a hint that somehow the array structure has changed.
With julia 1.12.4:
ipdb> p y.shape
(127460310906272,)
and next time it is again a random number: `(130742402242656,)`.
Could somebody explain me why this happens? My code is the same, I just recompile it.
Python is obviously also the same, C compiler as well. The only thing that changes here is Julia's version. I cannot see any changes in the changelog for Julia 1.12 that there were some changes in the array structure.
Thanks!