jacobwilliams / pyplot-fortran

For generating plots from Fortran using Python's matplotlib.pyplot 📈

Repository from Github https://github.comjacobwilliams/pyplot-fortranRepository from Github https://github.comjacobwilliams/pyplot-fortran

str variable cannot hold big data set

kookma opened this issue · comments

If you run the test with n say 20000
Then the program goes crazy because it seems the Fortran cannot handle such big data in allocatable string!

I propose to not write x,y data (numeric data) into str!

Can you please show us some code and elaborate on your example? Which test?

JSON-Fortran does have numeric types to store numeric values... It is unclear, to me at least, what you are trying to communicate.

With this repo there is test.f90 file! Simple change the line 15 to
integer,parameter :: n = 200000
(you will need to comment out the "!histogram chart:")
You will get segmentation fault!

Tested on gfortran 8.

Maybe a RAM or stack size issue? Note that this example does declare an n x n double precision matrix.

Ah, sorry I didn't pay attention to which repository this was. I thought we were talking about JSON-Fortran

@jacobwilliams
I made a simple hack, to write x-y data directly to script file and the issue disappeared!