1.How to set environment to use IMAS FC2K Testing Framework
1.1.Prepare
...
basic IMAS environment
Code Block |
---|
|
install_kepler.sh [target dir] [local source Kepler] [description]
switch_to_kepler [kepler_name] |
1.2. Prepare FC2K
...
$> setenv KEPLER_DIR <keplers dir e.g. $ITMWORK/imas-keplers>
$> module load imasenv
IMAS environment loaded. |
1.2. Install or load Kepler
Code Block |
---|
|
svn$> checkout http://gforge6.eufus.eu/svn/fc2k
cd fc2k/trunk
make
source ./setup |
If you want to work with development branch (it might have new features but, at the same time, it might be little bit behind current developments inside trunk) you can checkout a particular branch of FC2K.
Code Block |
---|
|
svn checkout http://gforge6.eufus.eu/svn/fc2k
cd fc2k/branches/new_feature
make
source ./setupkepler_install <version>
OR
$> kepler_load <version> |
1.3.
...
Prepare environment for IMAS FC2K Testing Framework
Code Block |
---|
|
$> module load imas-pyal
$> imasdb test |
2. Checking out IMAS FC2K Testing Framework
IMAS
In case you want to test your actor, and you are not interested in most recent developments inside FC2K, you can always use already installed version of FC2K
Code Block |
---|
|
> module avail fc2k
--------------- /gw/modules/itm --------------
fc2k/R3.0.11 fc2k/R3.0.14 fc2k/R3.0.5 fc2k/rc
> module switch fc2k/R3.0.14 |
In this case, you will run FC2K Testing Framework with a released version of FC2K.
2. Checking out FC2K Testing Framework
FC2K Testing Framework is a set of components that allow to test whole chain of execution. From native code compilation to workflow execution.
Code Block |
---|
$> svngit coclone httphttps://gforge6.eufus.eu/svn/fc2ktf
$> cd fc2ktf/trunk/TestingFramework{ITER_USERNAME}@git.iter.org/scm/imex/fc2k-testing-framework.git
$> cd fc2k-testing-framework
$> ./run_test.sh
--- Starting test for: eq2eq ---
Actor: eq2eq - OK
Skipping log removal
--- Finished test for: eq2eq ---
--- Starting test for: eq2eqmpi ---
Actor: eq2eqmpi - OK
Skipping log removal
--- Finished test for: eq2eqmpi ---
--- Starting test for: mpi ---
Actor: mpi - OK
Skipping log removal
--- Finished test for: mpi ---
--- Starting test for: nocpo ---
Actor: nocpo - OK
Skipping log removal
--- Finished test for: nocpo ---
--- Starting test for: nocpo_param ---
Actor: nocpo_param - OK
Skipping log removal
--- Finished test for: nocpo_param ---
--- Starting test for: stringinout ---
Actor: stringinout - OK
Skipping log removal
--- Finished test for: stringinout --- |
...
- FC2K projects
- Kepler workflows
- expected output
- Make file
- execution script
Code Block |
---|
|
mpi
|-- expected_output.txt - this file contains expected output of execution
|-- fc2k_nocpo_mpi_batch.xml - actor that will be started on batch nodes
|-- fc2k_nocpo_mpi_host.xml - actor that will be started on Gateway machine
|-- fc2k_nocpo_mpi_open_batch.xml - actor that will use OpenMP in batch mode
|-- fc2k_nocpo_mpi_open_host.xml - actor that will use OpenMP on Gateway
|-- Makefile - provides recipe for building actor's library
|-- nocpompi.f90 - source code of actor
|-- run_test.sh - executes tests and reports the outcome
`-- workflow_mpi_chain.xml - workflow that runs all the actors |
...
Code Block |
---|
|
status_code - this function takes two arguments: name of the test and boolean argument
- name is used to show the name of the test next to execution status
- boolean flag is used to determine whether logs should be removed or not
- this function uses lats exit code ($?) to determine whether test passed or failed
init_test - this function takes no arguments. It simply runs:
make clean
make
recreates directory "redirect"
start_kepler - takes one parameter - workflow name
starts workflow |
Info |
---|
|
This work has been carried out within the framework of the EUROfusion Consortium and has received funding from the Euratom research and training programme 2014-2018 under grant agreement No 633053.The scientific work is published for the realization of the international project co-financed by Polish Ministry of Science and Higher Education in 2019 and 2020 from financial resources of the program entitled "PMW"; Agreement No. 5040/H2020/Euratom/2019/2 and 5142/H2020-Euratom/2020/2”. |