Helpful info for running the Kotschenreuther-Dorland-Liu Gyrokinetic code GS2 ***************************************************************************** Main references: "KRT": Mike Kotschenreuther, G. Rewoldt, W.M. Tang, "Comparison of initial value and eigenvalue codes for kinetic toroidal plasma instabilities", Computer Physics Communications 88, 128 (1995) and various other papers and reports by Bill Dorland, Mike K., et.al. ******************************************************************** Preferred sample template file at the moment is gs_templateNN.in (where NN is the largest version number available). Should produce a standard template file that uses the Miller local equilibrium, and 4 species (deuterium, electrons, carbon, beams). Ask Dorland how the "temperature gradient" for the beam slowing down distribution is treated. Varying Einj isn't realistic, while varying Ecrit doesn't have a straightforward mapping to a beam "temperature gradient"? Better to just use equivalent hot Maxwellian for fast ion species? To compile the code, just type "make". ******************************************************************** To plot fields do: gnuplot set data style lines set data s l ! acceptable abbreviation plot 'waltz05.fields' u 1:4 ! using columns 1 and 4 for x and y axes. column 1 is theta column 2 is theta_0 column 3 is k_theta column 4 is Re(Phi) column 5 is Im(Phi) column 6 is Re(A_par) column 7 is Im(A_par) column 8 is Re(delta B_par) column 9 is Im(delta B_par) column 10 is shifted theta (only for nonlinear runs with theta connections) There is a blank line in the *.fields file separating different k_theta, theta_0 modes, which gnuplot interprets as starting a new curve. You can get a normalized plot of the eigenfunctions by choosing write_eigenfunc = .true. in the gs2_diagnostics_knobs namelist. The output file is runname.eigenfunc. The columns are the same as in runname.fields. ************************************ The quantity phtot that is printed in the output is proportional to a sum of |phi|^2 integrated over the eigenfunction. ************************************ On the NERSC T3E, you can just use Dorland's standard version of gs2 (and related codes at ~bdorland/dist/gs2. To build your own version of GS2 on the NERSC T3E, move to your gs2 directory. Type "module list" to make sure you have the following modules, or add them by doing module add GNU module add tools module add netcdf (GS2 needs GNU make to work right, and may need some of the others to load the right libraries). Then just type make ************************************ For optimal speed of linear runs on the T3E, do: mpprun -n NCPUS ../gs2 runname where NCPUS = (# of species)*(# of k's). You can run with even more NCPUS than this (though this will start to require more communication) by increasing it by an integer which is a factor of negrid (the next dimension which is parallelized). You can use the command ps -fMPa to see how many PE's are presently being used interactively (in the eighth column of output). The total number available during the day is 132. ************************************ on the Origin-2000 hecate.princeton.edu: mpirun -np NCPUS ../gs2 runname On the Origin-2000's at acl.lanl.gov: bsub -I -n 10 -R "span[ptile=10]" mpirun ../gs2 runname where the -R "span[ptile=10]" command insures that all 10 processors are in the same machine (to avoid hippi communication). ************************************************************