...
iWrap, to properly wrap the code, needs detailed informations about both: the wrapped code and an actor to be generated. A formal description ot of the code provides information about the programming language used, arguments passed to/from the code, type of these arguments, etc, etc, while an actor description tells iWrap how to name generated actor, where to put it, etc. Such descriptions has to be provided in YAML format file, prepared manually, or automatically with help of iWrap GUI.
Info | ||
---|---|---|
| ||
iWrap GUI allows to generate an actor without the need for manual preparation of actor/code description. |
YAML file syntax
The YAML file consists of two independent parts (aka 'YAML documents'), marked by tags corresponding to their roles: actor_description
and code_description
. Only code description part is mandatory, and actor description could be provided in a file, or using iWrap commandline switches or interacting with GUI.
...
- programming_language
- meaning: language of physics code
- value: one of predefined values: 'Fortran', 'CPP'
- example: 'Fortran'
- code_name
- meaning:
- name of user method / subroutine to be called,
- must be exactly the same as name of called method / subroutine
- it is used also as an actor name
- value: string
- example: 'my_subroutine'
- meaning:
- data_type
- meaning: data type handled by the physics code
- value: 'legacy' (currently only 'Legacy IDS' type has been implemented)
- example: 'legacy'
- arguments - list of arguments
- argument definition:
- name:
- meaning: user defined argument name
- value: string
- example: equilibrium00
- type:
- meaning: a type of an IDS argument
- value:
- predefined name of one of the IDSes
- example: 'equilibrium'
- intent
- meaning: determines if given argument is input or output one
- value: predefined - string "IN", "OUT"
- name:
- argument definition:
code_path:
- meaning: path to system library (C, CPP) , script (Python), etc containing the physics code, including method/subroutine to be run
- value: string, valid path to file
- example: 'any text'
code_parameters
- a structure containingparameters
and schemaentry
:- parameters:
- meaning: path to XML file containing user defined parameters of the physics code
- value: string, valid path to file
- example: './code_parameters/parameters.xml'
- schema:
- meaning: path to XSD file contains schema of XML parameters, to be able to validate them
- value: string, valid path to file
- example: './code_parameters/parameters.xsd'
- parameters:
...
Code Block | ||||
---|---|---|---|---|
| ||||
--- !code_description programming_language: Fortran code_name: demo_code data_type: legacy arguments: - name: equilibrium00 type: equilibrium intent: IN - name: equilibrium01 type: equilibrium intent: IN - name: equilibrium10 type: equilibrium intent: OUT - name: equilibrium11 type: equilibrium intent: OUT code_path: ./lib/libmy_lib.a code_parameters: parameters: ./code_paramneters/parameters.xml schema: ./code_paramneters/parameters.xsd documentation: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam... ' language_specific: compiler: Intel mpi_flavour: MPICH2 open_mp: false system_libraries: - fftw3f - glib - mkl custom_libraries: - ./lib/custom/libcustom1.a - ./lib/custom/libcustom2.a |
...
Warning |
---|
|
Actor description syntax
actor_name
:- meaning: the arbitrary, user defined name /vendor of the compiler (and not compiler command!) used to compile native codesof the actor. It determines: the name of class to be generated and directory where actor will be put
- value: stringvalue: string, one of vendors of compilers, currently: 'Intel' or 'GCC'
- example: 'Intelcore2dist'
actor_type
:- meaning: MPI compiler flavour to be used
- values: string, one of: MPICH, MPICH2, MVAPICH2, OpenMPI, etc.'python' (currently only python type has been implemented)
- example example 'MPICH2'
data_type
:- meaning: data type handled by at the physics codeworkflow level
- value: 'legacy' (currently only 'Legacy IDS' type has been implemented)
- example: 'legacy'
install_dir
:- optional parameter
- meaning: MPI compiler flavour to be used user chosen folder, where an actor will be installed
- values: string, one of:
- example : /my/working/dir/IWRAP_ACTORS
- if not defined, a default installation directory will be usedMPICH, MPICH2, MVAPICH2, OpenMPI, etc.example 'MPICH2'
Example
Code Block | ||||
---|---|---|---|---|
| ||||
--- !actor_description actor_name: core2dist actor_type: python data_type: legacy install_dir: /afsmy/eufus.eu/user/g/g2bpalakworking/dir/IWRAP_ACTORS ... |
Actor generation
iWrap commandline
iWrap graphical interface
...