Using Ateji PX in knime

Hello all

I am looking into the possibilities for multithreading inside a node in knime. I have been using Ateji PX for a while now and it works. But when i try to use the Ateji script files inside a node in knime it gives me syntax errors on the [ ] blocks which is the syntax for ateji to say: here you can start multithreading...

Is there anybody who knows what i'm doing wrong or anybody who is already looking into this? Some help would be much appreciated

(I am a new knime developer, so bear in mind i might just have forgotten something)

Attached: the screenshot of my code with the error underlined

Error i get

My first guess is that you've created a .apx file in a plain Java project: your code is compiled by the Java compiler instead of the Ateji PX compiler, hence the error on the parallel constructs.

Try adding the Ateji PX nature to your project by right-clicking on the project icon and selecting the appropriate entry in the menu, then force a recompile. Your .apx source file should now be handled by the Ateji PX compiler and compile without errors.

Note also that the code shown in your screen will never create more than two parallel branches. Is this really what you intended? I'd suggest instead quantifying the parallel operator over the lps variable, in order to make use of all all available cores when more than two are present.

Yeah, the code i created was indeed just intended to use 2 cores (my pc only has 2). What you said, about the right entry and the recompile did indeed work, i can now use it correctly.

I just found another flaw aswell. If i build the project and i give it to somebody else. They can't use it since they don't have an ateji license. Therefor my research stops here.

But thank you for the quick answer.

Hello all,

For more detailled information, please find below a link to the Ateji PX manual

Happy Java Parallel programming with Ateji PX !

The Ateji Team

I found out it's much better to use the Knime ThreadPool

This works much better and you won't have problems with the license from ateji