1.1.1. 4.2.1. Changes
CHEAT SHEET | |
ITM | IMAS |
---|---|
use euitm_schemas | use ids_schemas |
use euitm_routines | use ids_routines |
type(type_<cpo_name>) :: cpo | type (ids_<ids_name>) :: ids |
type(type_<cpo_name>), pointer :: cpoArray(:) <= ARRAY !! | type (ids_<ids_name>) :: ids <== SINGLE OBJ !!! |
eval-pkg-config | pkg-config |
eval-pkg-config --cflags --libs ual-ifort | pkg-config --cflags --libs imas-ifort |
eval-pkg-config --cflags --libs ual-gfortran | pkg-config --cflags --libs imas-gfortran |
type(type_param) :: XML_params | type(ids_parameters_input ) :: XML_params |
type type_param ... :: default_param ... :: schema | type ids_parameters_input ... :: parameters_value ... :: parameters_default ... :: schema endtype |
eval-pkg-config | pkg-config |
eval-pkg-config --cflags ual-ifort | pkg-config --cflags imas-ifort |
eval-pkg-config --cflags ual-gfortran | pkg-config --cflags imas-gfortran |
1.1.2. 4.2.2 Examples
Examples of interface between wrapper and user code | |||||
---|---|---|---|---|---|
ITM
| IMAS
|
1.1.3. 4.2.3 Delivery of the user code
The user code should be delivered as a static library.
Please find examples of the simple "Makefile" below:
Example 6. Building of Fortran code
F90 = ifort COPTS = -g -O0 -assume no2underscore -fPIC -shared-intel INCLUDES = $(shell eval-pkg-config --cflags imas-ifort) all: equilibrium2distsource.o libequilibrium2distsource libequilibrium2distsource: equilibrium2distsource.o ar -rvs libequilibrium2distsource.a equilibrium2distsource.o equilibrium2distsource.o: equilibrium2distsource.f90 $(F90) $(COPTS) -c -o $@ $^ ${INCLUDES} clean: rm -f *.o *.a
Recomendations
- Please use eval-pkg-config to get UAL flags and not hard coded references.
- The usage of environment variables for identifying compilers and versions of the pkg-config is recommended.