Skip to content
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

Logic error in TimeStep Control is triggered after 1st iteration of 3rd NS step: #50

Open
jcschmitt opened this issue Mar 25, 2024 · 3 comments

Comments

@jcschmitt
Copy link

This is a minimal example demonstrating a bug.

Input VMEC file is attached.
input.vmec.txt

@jcschmitt
Copy link
Author

jcschmitt commented Mar 25, 2024

Here is the output log of the VMEC run with the file attached.

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  SEQ =    1 TIME SLICE  0.0000E+00
  PROCESSING INPUT.vmec
  THIS IS PARVMEC (PARALLEL VMEC), VERSION 9.0
  Lambda: Full Radial Mesh. L-Force: hybrid full/half.

  COMPUTER: linux1   OS: GNU/Linux   RELEASE: 6.5.0-18-generic  DATE = Mar 25,2024  TIME = 18:49:35

  NS =   16 NO. FOURIER MODES =  128 FTOLV =  1.000E-14 NITER =   2000
  PROCESSOR COUNT - RADIAL:    2
 INITIAL JACOBIAN CHANGED SIGN!
 TRYING TO IMPROVE INITIAL MAGNETIC AXIS GUESS
  ---- Improved AXIS Guess ----
      RAXIS_CC =    8.40000000000000      -0.784375943362629     
 -1.901116593816534E-016 -3.061680294433361E-015 -2.512147933894040E-015
 -1.452335524282492E-015 -7.064929488888176E-015  5.966351342998344E-015
 -9.987984650384246E-015
      ZAXIS_CS =   0.000000000000000E+000  0.403265727856953     
  3.403911385037090E-017  1.747954495019046E-017 -1.112179723293405E-016
 -2.250874735691193E-016 -1.882884315687183E-016  4.072427314711041E-016
 -9.560353638696670E-017
  -----------------------------

  ITER    FSQR      FSQZ      FSQL    RAX(v=0)    DELT       WMHD

    1  4.49E-03  7.58E-04  4.13E-03  7.616E+00  7.00E-01  1.1500E+04
  200  4.48E-08  2.72E-09  2.51E-08  7.685E+00  7.00E-01  1.1435E+04
  400  2.62E-08  5.83E-09  1.67E-08  7.903E+00  7.00E-01  1.1433E+04
  600  2.29E-08  5.41E-09  9.60E-09  8.029E+00  7.00E-01  1.1432E+04
  800  2.02E-08  4.37E-09  6.06E-09  8.057E+00  7.00E-01  1.1432E+04
 1000  1.33E-08  3.09E-09  3.71E-09  8.075E+00  7.00E-01  1.1431E+04
 1200  4.43E-09  1.19E-09  1.25E-09  8.087E+00  7.00E-01  1.1431E+04
 1400  2.28E-09  5.28E-10  3.63E-10  8.093E+00  7.00E-01  1.1431E+04
 1600  8.20E-10  2.06E-10  1.86E-10  8.095E+00  7.00E-01  1.1431E+04
 1800  4.27E-10  1.18E-10  1.24E-10  8.097E+00  7.00E-01  1.1431E+04
 2000  2.71E-10  9.70E-11  7.87E-11  8.098E+00  7.00E-01  1.1431E+04

  NS =   32 NO. FOURIER MODES =  128 FTOLV =  1.000E-13 NITER =   6000
  PROCESSOR COUNT - RADIAL:    2

  ITER    FSQR      FSQZ      FSQL    RAX(v=0)    DELT       WMHD

    1  5.63E+00  4.95E+00  1.28E-02  8.098E+00  7.00E-01  1.1433E+04
  200  2.50E-06  1.20E-06  2.19E-08  8.108E+00  7.00E-01  1.1431E+04
  400  1.94E-07  7.47E-08  6.16E-09  8.127E+00  7.00E-01  1.1431E+04
  600  4.98E-08  1.51E-08  4.04E-09  8.142E+00  7.00E-01  1.1431E+04
  800  1.55E-08  5.24E-09  2.75E-09  8.147E+00  7.00E-01  1.1431E+04
 1000  8.22E-09  2.94E-09  2.32E-09  8.149E+00  7.00E-01  1.1431E+04
 1200  6.68E-09  2.06E-09  1.90E-09  8.151E+00  7.00E-01  1.1431E+04
 1400  4.06E-09  1.22E-09  1.60E-09  8.154E+00  7.00E-01  1.1431E+04
 1600  3.19E-09  9.15E-10  1.47E-09  8.155E+00  7.00E-01  1.1431E+04
 1800  3.00E-09  7.74E-10  1.34E-09  8.157E+00  7.00E-01  1.1431E+04
 2000  2.83E-09  7.62E-10  1.15E-09  8.158E+00  7.00E-01  1.1431E+04
 2200  2.99E-09  8.02E-10  9.71E-10  8.159E+00  7.00E-01  1.1431E+04
 2400  3.04E-09  8.36E-10  8.37E-10  8.160E+00  7.00E-01  1.1431E+04
 2600  3.07E-09  8.84E-10  7.31E-10  8.161E+00  7.00E-01  1.1431E+04
 2800  3.11E-09  9.42E-10  6.53E-10  8.162E+00  7.00E-01  1.1431E+04
 3000  3.11E-09  9.61E-10  5.88E-10  8.163E+00  7.00E-01  1.1431E+04
 3200  3.08E-09  9.10E-10  5.27E-10  8.164E+00  7.00E-01  1.1431E+04
 3400  3.08E-09  8.18E-10  4.78E-10  8.165E+00  7.00E-01  1.1431E+04
 3600  2.87E-09  6.90E-10  4.48E-10  8.165E+00  7.00E-01  1.1431E+04
 3800  2.47E-09  5.67E-10  4.19E-10  8.166E+00  7.00E-01  1.1431E+04
 4000  1.98E-09  4.60E-10  3.84E-10  8.166E+00  7.00E-01  1.1431E+04
 4200  1.54E-09  3.66E-10  3.49E-10  8.166E+00  7.00E-01  1.1431E+04
 4400  1.17E-09  2.93E-10  3.14E-10  8.167E+00  7.00E-01  1.1430E+04
 4600  8.70E-10  2.25E-10  2.78E-10  8.167E+00  7.00E-01  1.1430E+04
 4800  6.45E-10  1.70E-10  2.43E-10  8.167E+00  7.00E-01  1.1430E+04
 5000  4.69E-10  1.23E-10  2.10E-10  8.167E+00  7.00E-01  1.1430E+04
 5200  3.52E-10  8.74E-11  1.83E-10  8.168E+00  7.00E-01  1.1430E+04
 5400  2.71E-10  6.35E-11  1.60E-10  8.168E+00  7.00E-01  1.1430E+04
 5600  2.09E-10  4.76E-11  1.39E-10  8.168E+00  7.00E-01  1.1430E+04
 5800  1.59E-10  3.67E-11  1.19E-10  8.168E+00  7.00E-01  1.1430E+04
 6000  1.24E-10  2.84E-11  9.99E-11  8.168E+00  7.00E-01  1.1430E+04

  NS =   64 NO. FOURIER MODES =  128 FTOLV =  1.000E-12 NITER =   8000
  PROCESSOR COUNT - RADIAL:    2
 INITIAL JACOBIAN CHANGED SIGN!
 TRYING TO IMPROVE INITIAL MAGNETIC AXIS GUESS
  ---- Improved AXIS Guess ----
      RAXIS_CC =    8.75043008571858      -0.754691882966337     
 -0.104038015487500      -2.190653195299761E-003 -7.089092641349942E-004
 -3.772769326218403E-003 -4.181896415598869E-002  6.363489331780362E-003
  1.782947574331021E-002
      ZAXIS_CS =   0.000000000000000E+000  0.255895057905578     
  5.848548619850485E-003 -6.473203901076727E-003  8.395084630594362E-004
 -1.560975077431877E-002  1.677437583572644E-004  1.119731424046128E-002
 -1.583869981538949E-004
  -----------------------------

  ITER    FSQR      FSQZ      FSQL    RAX(v=0)    DELT       WMHD

    1  1.24E-10  2.84E-11  9.99E-11  0.000E+00  7.00E-01  0.0000E+00
Logic error in TimeStepControl!
Logic error in TimeStepControl!

===================================================================================
=   BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
=   RANK 0 PID 571151 RUNNING AT linux1
=   KILLED BY SIGNAL: 9 (Killed)
===================================================================================

@cianciosa
Copy link
Collaborator

Two things I noticed is R axis and the MHD energy is zero. It looks like it didn't reset the magnetic axis correctly.

@cianciosa
Copy link
Collaborator

I turned off PARVMEC to run the SERIAL versions of the subroutines. On the 3rd grid, it fails to find a good initial axis guess for the axis 3 times then terminates. So even if I fix the logic control so the PARALLEL and SERIAL match, this will still have problems with this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants