...
Info | ||
---|---|---|
Make sure to initialise test database - it will be used for temporary files
|
Preparing the
...
FC2K project
First of all, we need simple code that will read data. In this sample, we will use very simple code that reads distribution IDS, shows some info, and output scalar value
...
Defining interface to user code
...
...
You can always start with FC2K in order to make sure how native interface should be implemented like.
First of all, let's add two ports into actor. Input port - IDS, and output port - integer.
...
As you recall from previous session (dedicated to FC2K) we have to have library that contains native code we are supposed to run.
Let's prepare it. We will do it, by creating Makefile
project - library will be called In this example we will use library libdistribution_disp.a
Once we run make
we can use library inside the project
prepared previously
Describing the actor
When we fill information regarding actor, we make it possible to create a bridge between Kepler (actor) and native code (in this case Fortran based library). I will fill the table following way
...
Code Block |
---|
> idsdumppath g2michal test 3 92436 1 distribution_sources "time(0)" Type: <class 'numpy.float64'> ---------------------------------------------- ---------------------------------------------- 49.005001068115234 |
Let's say we will retrieve the first time index (as integer) from the array of all times. Remember, this is just an exercise where we want to make all things work together. Don't pay attention to whether it's something meaningful or not. Let's say our actor is supposed to retrieve first time index in the IDS.
...