Jump to: navigation, search

An Easy Way to Run EFIT on Fusion HP Computers

A new software tool named "runefit" was developed in late 1994 for use on our HP computers. Implemented as a shell script, "runefit" provides a simplified interface to the widely-used EFIT MHD equilibrium reconstruction code. The design of "runefit" was modeled on "run12", which has been used for the past few years to run the ONETWO transport code on the CRAYs and, more recently, the HPs and other Unix systems. "runefit" provides functionality that is basically similar to that of "run12" but tailored to the needs of the users of both EFIT and the "4d" analysis code, for which it was originally written - and from which a version is still available. (Note that the standalone version of "runefit" discussed here, and the version normally run from "4d", now have separate lines of development and should not be construed as functionally equivalent. Likewise for "runefit" versus "run_efit": the latter is a more comprehensive, GUI-based interface to EFIT and related codes, and was developed by Qian Peng in 1995.)

The "runefit" script is located in the "/d/codes" directory on the Auspex file server. This directory may already be in your path, in which case case you can run "runefit" simply with the command "runefit" (plus options and arguments). Almost everything you might need to know about "runefit" is shown in its help screen, which may be viewed by issuing either of the commands "runefit help" or "runefit -h". This is what is displayed:

 runefit  [-OPTIONS]  [MODE]  SHOT  [START  [STEP  [SLICES  [SUFFIX]]]]

   MODE = execution mode (one of the five below)   OPTIONAL default = background
                  fg: foreground, with screen output NOT saved
          foreground: foreground, with screen output     saved
                  bg: background, with NO notification of completion
          background: background, with    notification of completion
               batch: batch     , with    notification of completion

   SHOT = shot number           0 < SHOT < 1000000 REQUIRED
  START = start time (ms)       0 < START          OPTIONAL default = 1000
   STEP = time step  (ms)       0 < STEP           OPTIONAL default = 100
 SLICES = number of time slices 0 < SLICES < 201   OPTIONAL default = 10
 SUFFIX = snap file suffix (used with snap mode 7) OPTIONAL default = def

   -a     ALSO run SUMMARD, then copy up e0* file  OPTIONAL
   -d D   permission mask to use for DIRECTORIES   OPTIONAL default = 777
   -f F   permission mask to use for FILES         OPTIONAL default = 777
   -h     display this HELP screen                 OPTIONAL
   -m M   snap MODE (only 3 and 7 are supported)   OPTIONAL default = 7
   -n     run in current (NOT a sub-) directory    OPTIONAL
   -s     SUPPRESS checking shot availability      OPTIONAL
   -v V   VERSION suffix to append to "efitd"      OPTIONAL default = 65yd

Note that at least one argument, the shot number, is required; everything else on the command line is optional. As with "run12", "runefit" normally creates a subdirectory below the user's current directory and puts all output files for the run there. This allows several concurrent executions of EFIT to be performed without like-named files from different runs clobbering one another.

The actual EFIT executable file which is run by "runefit" has a name which may be symbolically represented in the form {DIRECTORY}/efitd{VERSION}, where the defaults are that {DIRECTORY} is /link/efit and {VERSION} is 65yd. Set the environment variable EFITDIR if you want to change the {DIRECTORY} part of the name, and use the "-v" command-line option to change the {VERSION} part. In the C Shell, for example, the "setenv" command is used to set environment variables. For example:

   setenv EFITDIR ~/my_efit

will let "runefit" know that you want it to look in the "my_efit" directory, below your home directory, for the EFIT executable program. If that executable is named "efitd129x129", for example, then the appropriate "runefit" command would look something like this:

   runefit -v 129x129 [other_options] [mode] shot_number [other_arguments]

One normally would not set the EFITDIR variable, since users typically run the standard EFITs that live in /link/efit. However, the flexibility is there if you need it.