| 1 | [[PageOutline]] |
| 2 | |
| 3 | = Application Name = |
| 4 | |
| 5 | Simple |
| 6 | |
| 7 | = Summary = |
| 8 | |
| 9 | * '''Name''': {{{Simple}}} |
| 10 | * '''Contact Person''': {{{support-compss@bsc.es}}} |
| 11 | * '''Access Level''': {{{public}}} |
| 12 | * '''License Agreement''': {{{GPL}}} |
| 13 | * '''Platform''': {{{COMPSs}}} |
| 14 | * '''Repository''': [[https://compss.bsc.es/svn/bar/apps/java/simple|Simple]] |
| 15 | |
| 16 | |
| 17 | == Description == |
| 18 | Example of a simple application with only one task. |
| 19 | |
| 20 | The application stores a counter value in a file, increments that counter in a task method (''increment'') and then prints the final value in the main program. |
| 21 | |
| 22 | |
| 23 | == Execution instructions == |
| 24 | Usage: |
| 25 | runcompss simple.Simple <counterValue> |
| 26 | |
| 27 | where: |
| 28 | * - counterValue: Initial value of the counter to increase |
| 29 | |
| 30 | |
| 31 | == Execution Example == |
| 32 | runcompss simple.Simple 1 |
| 33 | |
| 34 | |
| 35 | == Build == |
| 36 | === Option 1: Native java === |
| 37 | cd ~/workspace_java/simple/; javac src/main/java/simple/*.java |
| 38 | cd src/main/java/; jar cf simple.jar simple/ |
| 39 | cd ../../../; mv src/main/java/simple.jar jar/ |
| 40 | |
| 41 | === Option 2: Maven === |
| 42 | cd ~/workspace_java/simple/ |
| 43 | mvn clean package |