Difference between revisions of "CFX/Batch"

From ScientificComputing
Jump to: navigation, search
 
(6 intermediate revisions by 2 users not shown)
Line 4: Line 4:
 
CFX jobs can be submitted from the command line, using the script ''cfx_submit_job''.
 
CFX jobs can be submitted from the command line, using the script ''cfx_submit_job''.
  
  [leonhard@euler01 ~]$ '''./cfx_submit_job'''
+
  [leonhard@euler01 ~]$ '''cfx_submit_job'''
 
   
 
   
 
  USAGE: cfx_submit_job [-h|--help] [-n NCPUS] [-W HH:MM] [-M MBytes] [-J job_name] ...
 
  USAGE: cfx_submit_job [-h|--help] [-n NCPUS] [-W HH:MM] [-M MBytes] [-J job_name] ...
 
   
 
   
 
     -h | --help : show usage information and exit
 
     -h | --help : show usage information and exit
     -n NCPUS    : number of processors for the job (default 1, maximum 96)
+
     -n NCPUS    : number of cores for the job (default 1, maximum 96)
 
     -W HH:MM    : job run-time limit in hours and minutes (default 1 hour)
 
     -W HH:MM    : job run-time limit in hours and minutes (default 1 hour)
     -M MBytes  : memory required per processor (default 2 GB)
+
     -M MBytes  : memory required per core (default 2 GB)
 
     -J job_name : name of the job (jobs with the same name will be chained)
 
     -J job_name : name of the job (jobs with the same name will be chained)
     -ptile N    : use N processors per node
+
     -ptile N    : use N cores per node
 
     -wrap X    : wrap up at given time point or percent (X = HH:MM or %)
 
     -wrap X    : wrap up at given time point or percent (X = HH:MM or %)
 
     -lsf "opts" : pass additional bsub options to the batch system (LSF)
 
     -lsf "opts" : pass additional bsub options to the batch system (LSF)
 
     ...        : all subsequent arguments are passed varbatim to cfx5solve
 
     ...        : all subsequent arguments are passed varbatim to cfx5solve
  
The number of processors (NCPUS) and run-time limit (HH:MM) are optional. The default values are 1 processor for one hour. The options <tt>-h</tt> or <tt>--help</tt> can also be used to print a brief description of the command's arguments. All other arguments are passed verbatim to <tt>cfx5solve</tt>. You can get a complete list of all supported options using the command
+
The number of cores (NCPUS) and run-time limit (HH:MM) are optional. The default values are 1 core for one hour. The options <tt>-h</tt> or <tt>--help</tt> can also be used to print a brief description of the command's arguments. All other arguments are passed verbatim to <tt>cfx5solve</tt>. You can get a complete list of all supported options using the command
  
 
  cfx5solve -h
 
  cfx5solve -h
Line 28: Line 28:
 
  -ini {initial values file}
 
  -ini {initial values file}
  
Most other cfx5solve options — especially those relative to partitioning, parallel execution, hosts, etc. — should be avoided due to potential conflicts with the batch system on our clusters.
+
Most other <tt>cfx5solve</tt> options — especially those relative to partitioning, parallel execution, hosts, etc. — should be avoided due to potential conflicts with the batch system on our clusters.
 +
 
 +
By default, the <tt>cfx_submit_job</tt> script will set the parameter <tt>-max-elapse-time</tt> for the cfx5solve to 80% of the runtime limit that is specified with the <tt>-W</tt> option to give the solver time to clean up before the batch system will terminate the CFX processes to avoid corrupted files. This value can be changed with the <tt>-wrap</tt> option.
  
 
===Submitting jobs from the GUI===
 
===Submitting jobs from the GUI===
It is possible to directly submit CFX jobs out of the GUI to the batch system. When you would like to use this option, then you first need to login with X11 forwarding enabled, in order to start the CFX GUI.
+
It is possible to directly submit CFX jobs out of the GUI to the batch system. When you would like to use this option, then you first need to login with [[Accessing_the_clusters#X11|X11 forwarding]] enabled, in order to start the CFX GUI.
  
 
  ssh -Y username@''hostname''
 
  ssh -Y username@''hostname''
  
where ''username'' is your [[NETHZ]] username and ''hostname'' is the hostname of the cluster you would like to use. Afterwards, you need to load the CFX module. This will set your <tt>PATH</tt>, <tt>MANPATH</tt> and other variables needed by CFX. At this point, you can start either CFX Launcher or CFX Solver using respectively
+
where ''username'' is your ETH username and ''hostname'' is the hostname of the cluster you would like to use. Afterwards, you need to load the CFX module. This will set your <tt>PATH</tt>, <tt>MANPATH</tt> and other variables needed by CFX. At this point, you can start either CFX Launcher or CFX Solver using respectively
  
 
  cfx5          ← start CFX Launcher, then select CFX Solver in the Tool menu
 
  cfx5          ← start CFX Launcher, then select CFX Solver in the Tool menu
Line 46: Line 48:
 
* 24 hours
 
* 24 hours
 
* 120 hours
 
* 120 hours
 +
 +
For the memory, you can choose among three options
 +
 +
* M  = 1999 MB/core
 +
* L  = 3999 MB/core
 +
* XL = 6999 MB/core
 +
 +
For many jobs, M or L should be sufficient. Please only choose the XL option, when you are running a large simulation that requires a large amount of memory per core.

Latest revision as of 09:01, 9 January 2020

You can either submit your CFX job from the command line, using the cfx_submit_job script, or you can directly submit your jobs to the batch system from the CFX graphical user interface (GUI).

Submitting jobs from the command line

CFX jobs can be submitted from the command line, using the script cfx_submit_job.

[leonhard@euler01 ~]$ cfx_submit_job

USAGE: cfx_submit_job [-h|--help] [-n NCPUS] [-W HH:MM] [-M MBytes] [-J job_name] ...

   -h | --help : show usage information and exit
   -n NCPUS    : number of cores for the job (default 1, maximum 96)
   -W HH:MM    : job run-time limit in hours and minutes (default 1 hour)
   -M MBytes   : memory required per core (default 2 GB)
   -J job_name : name of the job (jobs with the same name will be chained)
   -ptile N    : use N cores per node
   -wrap X     : wrap up at given time point or percent (X = HH:MM or %)
   -lsf "opts" : pass additional bsub options to the batch system (LSF)
   ...         : all subsequent arguments are passed varbatim to cfx5solve

The number of cores (NCPUS) and run-time limit (HH:MM) are optional. The default values are 1 core for one hour. The options -h or --help can also be used to print a brief description of the command's arguments. All other arguments are passed verbatim to cfx5solve. You can get a complete list of all supported options using the command

cfx5solve -h

The most important options are

-def {definition or results file}

-ini {initial values file}

Most other cfx5solve options — especially those relative to partitioning, parallel execution, hosts, etc. — should be avoided due to potential conflicts with the batch system on our clusters.

By default, the cfx_submit_job script will set the parameter -max-elapse-time for the cfx5solve to 80% of the runtime limit that is specified with the -W option to give the solver time to clean up before the batch system will terminate the CFX processes to avoid corrupted files. This value can be changed with the -wrap option.

Submitting jobs from the GUI

It is possible to directly submit CFX jobs out of the GUI to the batch system. When you would like to use this option, then you first need to login with X11 forwarding enabled, in order to start the CFX GUI.

ssh -Y username@hostname

where username is your ETH username and hostname is the hostname of the cluster you would like to use. Afterwards, you need to load the CFX module. This will set your PATH, MANPATH and other variables needed by CFX. At this point, you can start either CFX Launcher or CFX Solver using respectively

cfx5          ← start CFX Launcher, then select CFX Solver in the Tool menu
cfx5solve     ← start CFX Solver directly

When submitting job through the CFX GUI by choosing file->define run in the solver manager, one has the possibility to choose a run mode from a drop-down menu, that will define the resource requirements as the job length and the memory. For the job length, there are three options.

  • 4 hours
  • 24 hours
  • 120 hours

For the memory, you can choose among three options

  • M = 1999 MB/core
  • L = 3999 MB/core
  • XL = 6999 MB/core

For many jobs, M or L should be sufficient. Please only choose the XL option, when you are running a large simulation that requires a large amount of memory per core.