Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
software:java:java [2018-08-10 16:36] – anita | software:java:java [2021-02-24 16:36] (current) – [Details by clusters] anita | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Projects in Java ====== | ====== Projects in Java ====== | ||
- | Below is a basic Java example | + | Using a basic Java example |
<file java HelloWorld.java> | <file java HelloWorld.java> | ||
Line 13: | Line 13: | ||
</ | </ | ||
- | ===== Details by Clusters===== | + | ===== Details by cluster===== |
* [[software: | * [[software: | ||
* [[software: | * [[software: | ||
* [[software: | * [[software: | ||
- | |||
- | |||
- | <note important> | ||
- | |||
- | Check the versions of java development available on your cluster by using | ||
- | |||
- | < | ||
- | $ vpkg_versions openjdk | ||
- | </ | ||
- | |||
- | and make sure you select the appropriate version to compile and create the '' | ||
- | |||
- | < | ||
- | [farber ~]$ workgroup -g it_css | ||
- | [(it_css: | ||
- | [(it_css: | ||
- | public class HelloWorld | ||
- | { | ||
- | public static void main(String[] args) | ||
- | { | ||
- | System.out.println(" | ||
- | } | ||
- | } | ||
- | [(it_css: | ||
- | Your job 1392265 (" | ||
- | waiting for interactive job to be scheduled ... | ||
- | Your interactive job 1392265 has been successfully scheduled. | ||
- | Establishing / | ||
- | [(it_css: | ||
- | Adding package `openjdk/ | ||
- | [(it_css: | ||
- | [(it_css: | ||
- | HelloWorld.class | ||
- | [(it_css: | ||
- | Hello, World! | ||
- | [(it_css: | ||
- | [(it_css: | ||
- | </ | ||
- | |||
- | Once we are back on the head node, you will need a job submission script to run your java job. For this simple example, copy '' | ||
- | |||
- | <file bash submit.qs> | ||
- | # | ||
- | # Template: | ||
- | # | ||
- | # Change the following to #$ and set the amount of memory you need | ||
- | # per-slot if you're getting out-of-memory errors using the | ||
- | # default: | ||
- | # -l m_mem_free=2G | ||
- | # | ||
- | # If you want an email message to be sent to you when your job ultimately | ||
- | # finishes, edit the -M line to have your email address and change the | ||
- | # next two lines to start with #$ instead of just # | ||
- | # -m eas | ||
- | # -M my_address@mail.server.com | ||
- | # | ||
- | |||
- | # Add vpkg_require commands after this line: | ||
- | vpkg_require openjdk/ | ||
- | |||
- | # Now append all of your shell commands necessary to run your program | ||
- | # after this line: | ||
- | java HelloWorld | ||
- | </ | ||
- | |||
- | Now submit the job using '' | ||
- | |||
- | < | ||
- | (it_css: | ||
- | Your job 1392329 (" | ||
- | [(it_css: | ||
- | job-ID | ||
- | ------------------------------------------------------------------------------------------------------------------------------------------------ | ||
- | | ||
- | [(it_css: | ||
- | HelloWorld.class | ||
- | [(it_css: | ||
- | [(it_css: | ||
- | |||
- | [CGROUPS] UD Grid Engine cgroup setup commencing | ||
- | [CGROUPS] Setting 1073741824 bytes (vmem none bytes) on n038 (master) | ||
- | [CGROUPS] | ||
- | [CGROUPS] done. | ||
- | |||
- | Adding package `openjdk/ | ||
- | Hello, World! | ||
- | [(it_css: | ||
- | </ | ||
- | |||
- | <note tip> | ||
- |