...
This tutorial is designed to introduce the concept of using FC2K tool in order to build Kepler compatible actors.
Info |
---|
This tutorial explains
|
4.1. FC2K basics
4.1.1 What FC2K actually does?
- Generates a Fortran/CPP wrapper, which intermediates between Kepler actor and user code in terms of:
- reading/writing of in/out physical data (IDS)
- passing arguments of standard types to/from the actor
- Creates a Kepler actor that:
- calls a user code
- provides error handling
- calls debugger (if run in "debug" mode)
- calls batch submission commands for MPI based actors
Info |
---|
Developer guidelines |
4.1.2 FC2K main window
Fig. 1. FC2K main window |
---|
Warning |
---|
If you open an existing project, all relative paths defined within project will be relative to a directory within which fc2k was started |
4.1.3 Actor description
|
Fig. 2. FC2K actor description |
---|
...
Warning |
---|
A name of user subroutine must be exactly the same as it was defined in user code |
4.1.4 Environment
Fig. 3. FC2K environment tab |
---|
...
Info |
---|
Environment settings Both Kepler and UAL locations are originally set to reflect system variables ($KEPLER and $IMAS_PREFIX) The change of their values could be made (e.g. for testing purposes), however it is recommended for experienced users only. |
4.1.5 "Arguments" tab explained
Below you can find explanation of FC2K arguments tab.
...
- equilibrium - an input parameter - one IDS (slice)
- amns - an input parameter - all amns IDS slices stored in given shot/run
- integer - an input parameter - a scalar
- double - an input parameter - an array of size 10
- edge - an in/out parameter - single slice of "edge" IDS
- waves - an output parameter - all slices of "waves" IDS
4.1.6 "Parameters" tab explained
Code specific parameters are all parameters which are specific to the code (like switches, scaling parameters, and parameters for built-in analytical models) as well as parameters to explicitly overrule fields in the IDS data structures.
...
Info |
---|
Usage of code parameters |
4.1.7 "Source" tab explained
Fig. 7. "Source" tab |
---|
The purpose of this tab is to define all code related issues:
- a programming language
- utilized compiler,
- type of code execution (sequential of parallel)
- libraries being used
4.1.7.1 Libraries
"Main library"
A "Main library" field allows to define a path to library containing user subroutine/function.
Fig. 8. "Source" tab - A path to "main" and "optional" library |
---|
"Optional library"
A "Optional library" field allows to define a path to optional library containing user subroutine/function.
"Custom libraries"
"Custom libraries" are non-standard static libraries required for building the user code.
...
- "Add..." - Adds a new library to the list
- "Edit..." - Edits library path
- "Remove" - Removes a new library from the list
"System libraries"
"System libraries" are system libraries handled by pkg-config mechanism and required for building the user code.
...
Tip |
---|
|
4.1.8 "Settings" tab explained
A user, using this tab, selects programming language of codes provided, compiler used to built library and type of code execution (sequential or parallel)
...
- Programming languange:
- Type - Defines programming language of user codes. It could be set to:
- Fortran
- _C/C++
- Compiler - Defines compiler being used. Possible values:
- ifort, gfortran
- gcc, g++
- Type - Defines programming language of user codes. It could be set to:
- Computation:
- Parallel MPI - If turned ON uses MPI compilers (mpiifort for ifort, mpif90 for gfortran, mpigxx for C)
- OPENMP - Defined if usage of OpenMP directives is turned ON/OFF
- Batch - If turned ON, submits a user code to jobs queue (combined with Parallel MPI or OPENMP switch runs user code as parallel job)
- Additional features:
- Calls init method - If user function needs any pre-initialization, an additional function will be called.
- Returns diagnostic info - adds output diagnostic information
4.1.9 "Documentation" tab explained
The "Documentation" tab specifies an user-defined Kepler actor description. It could be displayed from actor pop-up menu.
Fig. 13. "Documentation" tab |
---|
4.1.10 "Interface" tab explained
The "Interface" tab specifies interface for Kepler actor.
...