software:java:caviness

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
software:java:caviness [2020-03-18 17:13] anitasoftware:java:caviness [2021-04-27 16:21] (current) – external edit 127.0.0.1
Line 15: Line 15:
 Check the version of the java compiler and java available on Caviness by using Check the version of the java compiler and java available on Caviness by using
  
-<code>+<code bash>
 $ javac -version $ javac -version
 $ java -version $ java -version
Line 22: Line 22:
 and determine if this is acceptable for your java application to compile and create the ''HelloWorld.class'' file.  The following example is based on the user ''traine'' in workgroup ''it_css'' on Caviness utilizing the directory ''/work/it_css/traine/java'' to store all the files associated with this example, and compiling and testing ''HellowWorld'' on the login (head) node. and determine if this is acceptable for your java application to compile and create the ''HelloWorld.class'' file.  The following example is based on the user ''traine'' in workgroup ''it_css'' on Caviness utilizing the directory ''/work/it_css/traine/java'' to store all the files associated with this example, and compiling and testing ''HellowWorld'' on the login (head) node.
  
-<code> +<code bash
 [traine@login00 ~]$ workgroup -g it_css [traine@login00 ~]$ workgroup -g it_css
 [(it_css:traine)@login00 ~]$ javac -version [(it_css:traine)@login00 ~]$ javac -version
Line 49: Line 49:
 If you want to compile on a compute node, use ''salloc --partition=devel'' to make sure you are allocated a compute node with the development tools, libraries, etc. which are needed for compilers.  It is a good idea to use a compute node especially for lengthy compiles or those requiring multiple threads to reduce the compilation time.  The following example is the same as above except the compile and test ''HelloWorld'' is done on a compute node ''r00n56'' based on the job allocated from ''salloc --partition=devel''. If you want to compile on a compute node, use ''salloc --partition=devel'' to make sure you are allocated a compute node with the development tools, libraries, etc. which are needed for compilers.  It is a good idea to use a compute node especially for lengthy compiles or those requiring multiple threads to reduce the compilation time.  The following example is the same as above except the compile and test ''HelloWorld'' is done on a compute node ''r00n56'' based on the job allocated from ''salloc --partition=devel''.
  
-<code> +<code bash
 [traine@login00 ~]$ workgroup -g it_css [traine@login00 ~]$ workgroup -g it_css
 [(it_css:traine)@login00 ~]$ salloc --partition=devel [(it_css:traine)@login00 ~]$ salloc --partition=devel
Line 84: Line 84:
 </code> </code>
  
-If you want to run your java job in batch, then you will need a job submission script.  For this simple example, copy ''serial.qs'' from ''/opt/templates/slurm/generic'' on Caviness, name it ''submit.qs'', and modify it to run the ''HelloWorld'' executable.+If you want to run your java job in batch, then you will need a job submission script.  For this simple example, copy ''serial.qs'' from ''/opt/shared/templates/slurm/generic'' on Caviness, name it ''submit.qs'', and modify it to run the ''HelloWorld'' executable. Keep in mind the standard partition is available to everyone which means your job could get preempted (killed) in order to make room for workgroup-specific resources.  For testing purposes only, the partition has been modified from ''standard'' to ''devel'' for this example. Please read about all of the [[abstract:caviness:runjobs:queues|partitions]] to make sure your job is scheduled appropriately based on the limits defined for each partition. If you want to use the ''standard'' partition, please read about how to handle your job if it is preempted by using [[abstract:caviness:runjobs:schedule_jobs#Handling-System-Signals-aka- Checkpointing|Checkpointing]].
  
 <file bash submit.qs> <file bash submit.qs>
Line 131: Line 131:
 #        with the "sinfo --summarize" command. #        with the "sinfo --summarize" command.
 # #
-#SBATCH --partition=standard+#SBATCH --partition=devel
 # #
 # [EDIT] The maximum runtime for the job; a single integer is interpreted # [EDIT] The maximum runtime for the job; a single integer is interpreted
Line 180: Line 180:
 </file> </file>
  
-Now submit the job using ''sbatch submit.qs'' on the head node. The example below shows the output from the job submission and how to view the results of the job run.+Now submit the job using ''sbatch submit.qs'' on the head node after you make sure you are in your workgroup. The example below shows the output from the job submission and how to view the results of the job run.
  
-<code>+<code bash> 
 +[traine@login00 ~]$ workgroup -g it_css
 [(it_css:traine)@login00 java]$ sbatch submit.qs [(it_css:traine)@login00 java]$ sbatch submit.qs
 Submitted batch job 1231                                                                   1 Submitted batch job 1231                                                                   1
Line 192: Line 193:
 </code>  </code> 
  
-<note tip>Please review the templates for job submission scripts in ''/opt/templates'' on Caviness. There are ''README.md'' files each subdirectory to explain the use of these templates. If you do not specify any resources, by default you will get the default partition, with 1 core and 1GB of memory (a simple serial job) and 20 minutes runtime on Caviness.</note>+<note tip>Please review the templates for job submission scripts in ''/opt/shared/templates'' on Caviness. There are ''README.md'' files in each subdirectory to explain the use of these templates. If you do not specify any resources, by default you will get the standard partition, with 1 core and 1GB of memory (a simple serial job) and 20 minutes runtime on Caviness.</note>
  
  • software/java/caviness.1584566015.txt.gz
  • Last modified: 2020-03-18 17:13
  • by anita