Closed abaillod closed 3 years ago
@abaillod Looks strange... What branch are you using when this error occurs and is it up-to-date with the repository (so that I can try to reproduce it here)?
@jonathanschilling master branch, latest commit (up-to-date with repository, I just did git pull origin master
)
In dfp200.f90, lines 1455-1672 are related to the computation of the force gradient. I think it should be in a if( LComputeDerivatives )
condition... Otherwise derivatives of B^2 w.r.t to the geometry are always evaluated.
Now, if Lfindzero.eq.0
and Lcheck.eq.5 .or. LHevalues .or. LHevectors .or. LHmatrix .or. Lperturbed.eq.1
then hesian
is called and the derivatives are required. However dRodR
and dZodZ
are only allocated if Lfindzero.eq.0
...
Anyway, I think the logic is broken, I will propose a fix in a minute or so.
@abaillod All the checks (except uploading an unchanged py_spec to pypi) have passed and I merged into master. Can you please verify that it works to that we can close this issue?
Everything seems to work on my side. I close the issue.
Hello,
I get a segmentation fault when running toroidal cases with
Lfindzero=0
. See for example the attached file (I added the .txt extension so that Github accepts it...)G3V02L3Fi.001.sp.txt
the segmentation fault occurs in dfp200.f90 - it seems that
dRodR
anddZodZ
are not allocated. This part is related to the derivatives of the axis w.r.t the boundary. I don't understand why SPEC enters this part of the code whenLfindzero=0
- is a flag wrongly set somewhere?Lcomputederivatives
or something similar? In general, do we want SPEC to compute the force gradient ifLfindzero=0
?I don't know since when this bug is part of the code, maybe I introduced it with the current constraint merge... An easy fix is to ensure that no derivatives are evaluated when
Lfindzero=0
, but I am not sure this is what is wanted!