2010/01/27

Technical Aspects of the TASK CodeA. Fukuyama
Department of Nuclear Engineering, Kyoto University

Contents• Install of TASK
– Necessary packages– Download– Compile• Structure of TASK
– Typical file names– Input commands– Input parameters• Graphicss– Graphic commands– Graphic utilities

Necessary Packages of TASK• Distributed from bpsi.nucleng.kyoto-u.ac.jp– GSAF: Graphic library– BPSD: Data exchange interface library– TASK: TASK code

• Included packages — imported from NTCC
– NCLASS: Neoclassical transport model
W.A. Houlberg (ORNL)– GLF23: Turbulent transport model
J.E. Kinsey (Lehigh U) et al.
– IFS/PPPL: Turbulent transport model A.J. Redd (Lehigh U) et al.
– CYTRAN: Cyclotron radiation
W.A. Houlberg (ORNL)– NTCC: National Transport Code Collaboration — http://w3.pppl.gov/ntcc/• Optional packages– Lapack: Linear algebra library — http://www.netlib.org/– MPI: Prallel processing library — e.g. http://www-unix.mcs.anl.gov/mpi/mpich/– MDSplus: Scientific data base library — http://www.mdsplus.org/

Download of TASK
• From CVS server with user account: upload is allowed
export CVS RSH=ssh
export CVSROOT=p-grp.nucleng.kyoto-u.ac.jp:/home/fukuyama/cvs
cvs co bpsd
cvs co task
cvs co gsaf

• From CVS server with password: latest version available
export CVS RSH=ssh
export CVSROOT=:pserver:anonymous@p-grp.nucleng.kyoto-u.ac.jp:/home/fukuyama/cvs
cvs login
password: XXXXXXXX
cvs co bpsd
cvs co task
cvs co gsaf

• From WEB server
http://bpsi.nucleng.kyoto-u.ac.jp/task/
gsafnnn.tar.gz bpsdnnn.tar.gz tasknnn.tar.gz

Compile of TASK• Graphic Library: gsaf
cd gsaf/src
cp ../arch/XXXXXXXX/Makefile.arch .
make(sudo) make install
cd ../..

• Data exchange interface library: bpsd
cd taskcp make.header.org make.header

Edit make.header and remove comment char “#”
cd libmake
cd ../../bpsd
makecd ..

• TASK itself:
cd task/tot
make libs
makeUseful CVS Commands• Update of the file:
cvs update -Pd• Comparison with the version most recently downloaded:
cvs diff [filename]• Comparison with the latest version:
cvs diff -D now [filename]• Comparsion with the version in the past:
cvs diff -D 2009-09-01 [filename]• Change history of the file:
cvs log [filename]• Upload of the file:
cvs ci -m’comment’ [filename]Typical File Name of TASK
• XXcomm.f90: Definition of global variables, allocation of arrays• XXmain.f90: Main program for standalone use, read XXparm file
• XXmenu.f90: Command input• XXinit.f90: Default values, input, and display of input parameters• XXprep.f90: Initialization of run, initial profile• XXexec.f90: Execution of run• XXgout.f90: Graphic output• XXfout.f90: Text file output• XXsave.f90: Binary file output• XXload.f90: Binary file input

Typical Input Command• After the start of the program, it displays a menu of one character
commands and wait line input.

• When input line includes =, interpreted as a namelist input (e.g., rr=6.5j• R: Initialize profiles and execute• C: Continue run• P: Namelist input of input parameters• V: Display of input parameters• S: Save results into a file
• L: Load results from a file
• Q: End of the program• When the first character is not an alphabet, interpreted as a requested
input (this behavior depends on the components)

Input Parameters• List of input parameters and default values– Defined in a subroutine XXinit in a file XXinit.f90– Some of universal input parameters aredefined in plinit in pl/plinit.f90• Order of input parameter setting– Default setting at the subroutine XXinit in XXinit.f90– Read a namelist file XXparm at the begining of the program– Setting by the input line

Graphic commands• At the begining of the program– Setting of resolution (0: metafile output only, no graphics)– commands◦ C: continue◦ F: setting metafile name, start saving• At the end of one page drawing– commands◦ C: continue◦ F: setting metafile name, start saving◦ S: start saving and save the page
◦ Y: save page and continue◦ N: continue without saving◦ D: dump page as a bitmap file “gsdump”◦ B: switch on/off bell sound◦ Q: quit program after confirmation

Graphic Utilities• Utility program– gsview: View metafile– gsprint: Print metafile on a postscript printer– gstoeps: Convert metafile to eps files of each page
– gstops: Convert metafile to a postscript file of all pages– gstotgif: Convert metafile to a tgif file for graphi editor tgif
– gstotsvg: Convert metafile to a svg file for web browser• Options– -a: output all pages, otherwise interactive mode
– -s ps: output from page ps– -e pe: output until page pe– -p np: output contiguous np pages on a sheet– -b: output witout title– -r: rotate page
– -z: gray output