Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
- create input data
   - either create input pulse file
   - or copy it from location
- compile native code (actor)
- create actor - based on your own FC2K project
   - when preparing FC2K project, make sure to use relative paths (e.g.: "./libactor.so")
- run workflow - you need your own workflow that runs actor
   - if you don't want to use Kepler, you need to provide another means of running native code (e.g.: Python based wrapper)
- compare results with expected ones
   - you have to provide means of determining whether execution was correct or not
   - you need to provide data set (expected) that will be compared with actual output
   - you should report whether test passed or failed
- you should clean up after execution 

Let's take a look at sample Test Case - MPI based

Code Block
languagebash
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

Let's take a look at sample execution of Test Case

Code Block
languagebash
#!/bin/bash
 
# ../common.sh contains helper functions
source ../common.sh
 
# init is a wrapper for calling make (building actor library)
init_test

# we are building all the actors here
${FC2K}/bin/fc2k fc2k_nocpo_mpi_batch.xml >> test.log 2>&1
${FC2K}/bin/fc2k fc2k_nocpo_mpi_host.xml >> test.log 2>&1
${FC2K}/bin/fc2k fc2k_nocpo_mpi_open_batch.xml >> test.log 2>&1
${FC2K}/bin/fc2k fc2k_nocpo_mpi_open_host.xml >> test.log 2>&1
 
# start_kepler is a helper function defined in ../common.sh
# it starts workflow
start_kepler workflow_mpi_chain.xml
 
# this is the place where checking results occurs. Note that it is up to developer
# to define what does it mean to pass/fail the test
diff redirect/workflow_mpi_chain.Display.txt expected_output.txt >> test.log 2>&1
 
# status_code is a helper function that shows final result of test
# based on error code from previous call
status_code mpi false