Versions Compared

Key

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

Exercise no. 4

C++ code within Kepler (CPO handling)

(approx. 30 min)

The knowledge gained:

...

In this exercise you will execute simple C++ code within Kepler. In order to do this follow the instructions:

1. Get familiar with codes that will be incorporated into Kepler

Go to Code Camp related materials within your home directory

...

  • simplecppactor.cpp - C++ source code that will be executed from Kepler
  • Makefile - makefile that allows to build library file
  • simplecppactor_fc2k.xml - parameters for FC2K application (NOTE! this file contains my own settings, we will modify them during tutorial)
  • simplecppactor_workflow.xml - example workflow

2. Build the code by issuing

shell> make clean
shell> make

Codes are ready to be used within FC2K

3. Prepare environment for FC2K

Make sure that all required system settings are correctly set

shell> source $ITMSCRIPTDIR/ITMv1 kepler test 4.10b > /dev/null

4. Start FC2K application

This is as simple as typing fc2k from terminal

...

 

Default settings
Note, that your settings will be slightly different. Your Kepler location should point to a valid path for your account.

 

5. Open project simplecppactor

  1. Choose File -> Open
  2. Navigate to $TUTORIAL_DIR/FC2K/simplecppactor.
  3. Open file simplecppactor_fc2k.xml.
  4. You should see new parameter settings loaded into FC2K.

Fig. 1. FC2K main window: project simplecppactor loaded

6. Project settings

Please take a look at the project settings.

...

You should modify these setting, so they point to locations within you home directory. They will typically be as follows:

7. Actor generation

After all the settings are correct, you can generate actor
Simply press "Generate" button and wait till FC2K finishes the generation.

 

Generating an actor for the second time
This tutorial assumes that Gateway accounts will be used for starting up Kepler application.
If you are not familiar with NX setup for the Gateway, take a look at following location NX setup

 

8. Confirm Kepler compilation

After actor is generated, FC2K offers to compile Kepler application. Make sure to compile it by pressing "Yes".

Fig.4. FC2K - successful compilation

9. You can now start Kepler and use generated actor

Open new terminal window and make sure that all environment settings are correctly set and execute Kepler.

...

Fig. 5. Kepler worflow loaded

Launch the workflow

You can start the workflow, by pressing "Play" button

...

Fig. 7. Outcome of the workflow execution

 Exercise no. 4 finishes here.