...
Running the command will generate some Scala files. This is how the directory should look:
Code Block |
---|
FindPrimes:
findprimes:
FindPrimes.cnc
FindPrimesBase.scala
FindPrimesGraph.scala
FindPrimesCncDefinition.scala
|
In short, these are what the files represent:
...
This step does not rely on input from an Item Collection, instead it uses the tag as the input. Please refer to the Partition String example for a step instance that retrieves inputs from Item Collections.
After providing the Step implementations and a Main class to run and launch the program, the directory should now have the following structure:
Code Block |
---|
FindPrimes:
findprimes:
FindPrimes.cnc
FindPrimesBase.scala
FindPrimesGraph.scala
FindPrimesMain.scala
UserFindPrimesStep.scala
FindPrimesCncDefinition.scala
|
Now, run the CnC-Scala compiler to compile the Scala files:
cnc_scala_compile
Once the files have been successfully compiled, the application can be run using the CnC-Scala run command:
cnc_scala_run -Dcnc.workers=4 -Dcnc.enableForkJoin=true findprimes.FindPrimesMain 100
Running this program with an input of 100
should produce the following output:
...