3.8. Parallelization

class ParallelLevels(optimizations: int = 1, parametervectors: int = None, jobs: int = None, processes: int = 1, threads: int = 1)

Specification of how to use parallelism at the different levels involved in a ParAMS optimization.

Note that the parallel levels are layered in the order of the arguments to this method, e.g. setting parametervectors=2 and jobs=4 would result in two parameter vectors tried in parallel, with the JobCollection for each one being run with 4 jobs in parallel, resulting in a total of 8 jobs running concurrently. Overall this means that for fully using a machine the product of the parallelism at all levels should equal the number of (physical) CPU cores of that machine. It is generally more efficient to parallelize at a higher level, especially when parameterizing a very fast engine like ReaxFF.

All parameters of this method are optional. Parameters not specified will be assigned a sensible default value resulting in the use of the entire machine.

optimizations: optional, int > 0

How many independent optimizations to run in parallel. This is a placeholder for the future. ParAMS currently does not support optimization level parallelism yet.

parametervectors: optional, int > 0

How many parameter vectors to try in parallel. This level of parallelism can only be used with parallel ref:optimizers <Optimizers>.

jobs: optional, int > 0

How many jobs from the JobCollection to run in parallel.

processes: optional, int

How many processes (MPI ranks) to spawn for each job. This effectively sets the NSCM environment variable for each job. A value of -1 will disable explicit setting of related variables.

threads: optional, int

How many threads to use for each of the processes. This effectively set the OMP_NUM_THREADS environment variable. Note that most AMS engines do not use threads, so the value of this variable would not have any effect. We recommend leaving it at the default value of 1. Please consult the manual of the engine you are parameterizing. A value of -1 will disable explicit setting of related variables.

workers: int

The product of all parameters