[kepler-users] Tool for automatic generation of actors from C codes

Tomasz Żok tzok at man.poznan.pl
Wed Mar 13 06:15:56 PDT 2013


Dear Kepler contributors and users,

we are glad to announce availibility of a tool which automates the process of
actor creation from an arbitrary C code.

The idea is to generate Kepler actor from any code that runs as a standalone
executable. It is however a real integration, not a replacement for Exec actor
which runs binaries. As a result of running presented tool you will get an
actor with ports mapped to code arguments and working directly on typed Kepler
tokens (eg. DoubleToken). Technically, your code becomes (fully automatically)
a shared library loaded by the actor when requested.

The principle is that you take an existing code (with "int main()" function,
normally compilable to an executable), use this tool and you get an equivalent
in form of Kepler actor. The only extra effort is to prepare a short XML of
this form:
        <actor>
            <inputs>
                <in type="String" name="myArgument1"/>
                <in type="Integer" name="myArgument2"/>
                <in type="Double" name="myArgument3"/>
            </inputs>
        </actor>

As you can see, it only defines the type and name of the expected inputs


Let's say you have a program used like this:
    ./my_app test 123 1.0

Then you could use the XML as above and will get an actor with three typed
ports. The above program execution would be equal to passing StringToken 
"test" to port myArgument1, IntToken 123 to myArgument2 and DoubleToken 1.0
to myArgument3


The attached archive contains README file with step by step guide. It also
presents an example ready to run by anybody. Additionally I attach a simple
workflow making use of this example and its screenshot.


Some additional notes:
- A common practice in C codes is to explicitly call "void exit(int status)"
  instead of making "int main()" return the exit code. This situation is
  handled, there is no need to change your code if it does this.
- There is also one thing you must be aware of. If your code assumes that some
  files are present in the *current directory* then remember that they will be
  searched for from Kepler's perspective. It is advisable to remove this
  assumption and pass absolute paths as additional code arguments.

Regards,
Tomek, Piotrek and Marcin

-- 
Tomasz Zok
Poznan Supercomputing and Networking Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: c-to-kepler.tar.gz
Type: application/octet-stream
Size: 1612373 bytes
Desc: not available
URL: <http://lists.nceas.ucsb.edu/kepler/pipermail/kepler-users/attachments/20130313/2a1577b9/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2013-03-13-134852_629x408_scrot.png
Type: image/png
Size: 23325 bytes
Desc: not available
URL: <http://lists.nceas.ucsb.edu/kepler/pipermail/kepler-users/attachments/20130313/2a1577b9/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: my_app_workflow.xml
Type: application/xml
Size: 33135 bytes
Desc: not available
URL: <http://lists.nceas.ucsb.edu/kepler/pipermail/kepler-users/attachments/20130313/2a1577b9/attachment-0001.xml>


More information about the Kepler-users mailing list