-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running DESC until tolerance reached #1387
Comments
what do you mean "to convergence" here? With tolerances that low its likely you'll run into floating point issues before actually reaching them (and you'd also need to set maxiter=inf or something) When converting a vmec input to desc we don't write any tolerances and use the defaults, since the tolerances in vmec mean different things than the ones in desc so its not clear how to translate them. |
By "to convergence" I mean finding the lowest possible force error for a given M and N. Edit: I noticed that the iterations of most continuation steps stop due to near-zero or zero step norm. |
finding the lowest possible force would generally be done by setting ftol=0, xtol=0, gtol=eps. then you're finding the actual proper mininum, or at least some ball around it where the gradient is finite but tiny (in finite precision you'll basically never get the gradient to actual zero). The problem is often that the landscape isn't particularly well scaled, so you can get early termination because either f or x stops changing, and you usually won't be able to do better in finite precision. This is a general problem in nonlinear (and linear) optimization and isn't unique to desc. Another problem is that f, x, and df/dx all have units which makes it tricky because just rescaling the problem can change the convergence criteria, even though it shouldn't. You can check out #1073 for one attempt at a fix for this, which might help in your case as well. |
the larger point though is that usually solving to super low tolerances is generally not advised. Formally the problem is only solved in the limit of high resolution, so enforcing optimality at any finite resolution effectively guarantees that you're not solving the actual problem (you usually don't want an exact answer to an approximate problem, it's better to have an answer that is "as approximate" as the problem). So if you want lower force error, its pretty much always better to increase resolution rather than reducing tolerances beyond a certain point |
Hi All,
If one wants to run a given desc converted Vmec input file to convergence for the given M, N, is it enough to do the following:
This iteration then stops with
I noticed that
does not add any solver tolerances to the
inp
container, is this intended?Thanks!
The text was updated successfully, but these errors were encountered: