NewStrangeWorlds / FastChem

An ultra-fast equilibrium chemistry
https://newstrangeworlds.github.io/FastChem/
GNU General Public License v3.0
41 stars 16 forks source link

FastChem seg faults #5

Closed ideasrule closed 1 year ago

ideasrule commented 1 year ago

When I use this as the PT profile:

1e-3 150

...but without changing anything else in input/config.input, the code segmentation faults:

$ ./fastchem input/config.input malloc(): invalid next size (unsorted) Aborted (core dumped)

When I change the "FastChem console verbose level" to 4, I get:

Too large n_min and n_maj for species Cl. Switching to backup. Iteration step: 0 FastChem: WARNING: NewtSol Alt failed for species Ge switched to Bisection as backup 0 4.82864e+16 (previous line repeats 62 times) malloc(): invalid next size (unsorted) Aborted (core dumped)

Why does NewtSol fail? And why does a NewtSol failure make the code segfault?

cvbuchem commented 1 year ago

I get the same error when running over a large TP grid (the one used in the HELIOS tutorial). When I try running the same TP profile through pyfastchem i get a similar error:

munmap_chunk(): invalid pointer Aborted (core dumped)

When using the TP profile included originally the code runs properly.

daniel-kitzmann commented 1 year ago

Sorry for the late answer, I didn't notice that someone posted an issue. It was a minor problem that is fixed now. Thanks for reporting the error!