Jump to: navigation, search

EFIT Source Directory Structure

Various Platforms | Directory Structure | Installing EFIT | Logic Flow Chart | Fortran Global Variables

EFIT source code is managed under CVS. The master code has been broken into experiment dependent and independent parts. The top-level directories are as following,

green - EFUND source code and building files for generating Green's function tables
efitcore - EFIT master source codes, experiment-independent part.
diiid, jet, cmod, jt60u, start ... - experiment-dependent part of master source codes. only that for DIIID is available at this location.
efitex - makefiles to generate source codes for various grid sizes and precisions for the UNIX platform from the master codes.
efitbuild - makefiles to build EFIT executables



Building EFIT Executables on UNIX

  • Directory efitbuild contains
Makefile - the main makefile that uses C preprocessor cpp to filter makefile.cpp into makefile.temp, the final makefile to be used. Before making, edit this file to use correct EXP for experiment and MACH for platform. Only EXP=DIIID is available at this location. Note that "makefile" should not present in this directory. If there is one, use "make -f Makefile" specifically when building executables.
makefile.cpp - the file that specifies the libraries and the makefile.HPUX/IRIX/OSF to use for an experiment and platform specified in Makefile. It will be run through cpp to create makefile.temp. Note that only DIIID part is available; JET part is same as DIIID and can be used as a template. Variables SEXPDEPLIBS and DEXPDEPLIBS are experiment and platform dependent libraries in single and double precisions. Modify these two variables to point to the correct libraries or the dumy libraries if shot data retrival will not be used.
makefile.HPUX/IRIX/OSF - makefile for the platform indicated by the extension. The primary differences are FORTRAN compiling options. If a new module is to be added, make sure it has entries and dependencies in these files. makefile.edits is included here to make source files from the master source. Makefiles for other platforms are not available yet. If you have one for a different platform, we would like to include it here.
makefile.edits - makefile that uses editing files in efitex to generate source codes in various grid sizes and the single and double precisions from the master source. A new module should have proper entries and dependencies in this file if the conversion from its master source is needed.
  • Directory efitex contains
makefiles and scripts that use ex editor to generate source codes for a specified grid size and precision for UNIX from the master sources. If a new module is to be added and if it is platform, or grid size, or precision dependent, make sure it has proper entries in the makeefit*.ex files in this directory.
  • In short, to build EFIT executables
  • cd efitbuild
  • edit Makefile for the proper EXP and MACH
    (Unfortunately, you will have to write your own makefile... if your platform is other than HP-UX, or SGI-IRIX or Alpha-OSF).
  • fix SEXPDEPLIBS and DEXPDEPLIBS in makefile.cpp for libraries
  • make [-f Makefile] [efitd]



Generating Green's Function Tables

  • File structures under green directory
u - contains source codes and makefiles including
efund.for - main module
comn.inc - common blocks
exparm2.inc - experiment dependent parameters; they should be consistant with exparm.inc in EFIT
Makefile - makefile to compile and link the code
makeefundu.ex - edit efund.for to make different versions
run - contains input file to EFUND and the script to run EFUND
runefund - C-shell script to run EFUND code and move the Green's function tables to the specified area. Modify variables MHDIN and TBLDIR for the input file name and the destination of tables. It runs all eight versions of efund by default; but it allows individual run with parameters.
ef970314.d3d - EFUND input file containing DIIID configurations.
com - obsolete
  • To build EFUND executables
    • cd green/u
    • make
  • To generate Green's function tables
    • cd green/run
    • (edit runefund for the desired MHDIN and TBLDIR)
    • runefund