simba.Codes package

Subpackages

Submodules

simba.Codes.Executables module

class Executables(global_parameters)[source]

Bases: object

Class for interpreting the accelerator code executables defined in Executables for a given computer architecture and linking to the SimCodes directory. This enables the simulation code with the lattice input file to be called from within the Framework instance.

Executables for Windows and POSIX architectures are defined, as are executables for specific clusters based at Daresbury Laboratory. Others can be added by the user.

define_ASTRAgenerator_command(location=None)[source]

Define the ASTRA generator executable object and sets ASTRAgenerator

Parameters:

location (str, optional) – Location of ASTRA generator executable; overrides default.

Return type:

None

define_astra_command(location=None, ncpu=1, scaling=None, override_location=None)[source]

Define the ASTRA executable object and sets astra

Parameters:
  • location (str) – Location of ASTRA executable; overrides default.

  • ncpu (int) – Number of CPUs to run

  • scaling (int, optional) – Scaling parameter for number of CPUs.

  • override_location (str, optional) – Name of remote server on which to run the executable; must be defined in Executables.yaml

Return type:

None

define_csrtrack_command(location=None, ncpu=1, scaling=None, override_location=None)[source]

Define the CSRTrack executable object and sets csrtrack

Parameters:
  • location (str) – Location of CSRTrack executable; overrides default.

  • ncpu (int) – Number of CPUs to run

  • scaling (int, optional) – Scaling parameter for number of CPUs.

  • override_location (str, optional) – Name of remote server on which to run the executable; must be defined in Executables.yaml

Return type:

None

define_elegant_command(location=None, ncpu=1, scaling=None, override_location=None)[source]

Define the ELEGANT executable object and sets elegant

Parameters:
  • location (str) – Location of ELEGANT executable; overrides default.

  • ncpu (int) – Number of CPUs to run

  • scaling (int, optional) – Scaling parameter for number of CPUs.

  • override_location (str, optional) – Name of remote server on which to run the executable; must be defined in Executables.yaml

Return type:

None

define_genesis_command(location=None, ncpu=1, scaling=None, override_location=None)[source]

Define the Genesis executable object and sets genesis

Parameters:
  • location (str) – Location of Genesis executable; overrides default.

  • ncpu (int) – Number of CPUs to run

  • scaling (int, optional) – Scaling parameter for number of CPUs.

  • override_location (str, optional) – Name of remote server on which to run the executable; must be defined in Executables.yaml

Return type:

None

define_gpt_command(location=None, ncpu=1, scaling=None, override_location=None)[source]

Define the GPT executable object and sets gpt

Parameters:
  • location (str) – Location of GPT executable; overrides default.

  • ncpu (int) – Number of CPUs to run

  • scaling (int, optional) – Scaling parameter for number of CPUs.

  • override_location (str, optional) – Name of remote server on which to run the executable; must be defined in Executables.yaml

Return type:

None

define_opal_command(location=None, ncpu=1, scaling=None, override_location=None)[source]

Define the OPAL executable object and sets opal

Parameters:
  • location (str) – Location of OPAL executable; overrides default.

  • ncpu (int) – Number of CPUs to run

  • scaling (int, optional) – Scaling parameter for number of CPUs.

  • override_location (str, optional) – Name of remote server on which to run the executable; must be defined in Executables.yaml

Return type:

None

getNCPU(ncpu, scaling)[source]

Get the number of CPUs for tracking. :type ncpu: int :param ncpu: Number of CPUs for multi-threaded runs :type ncpu: int :type scaling: int :param scaling: Scaling factor for the number of particles :type scaling: int

Returns:

Number of CPUs to run

Return type:

int

class executable(name, settings={}, location=None, ncpu=1, default='', override_location=None)[source]

Bases: object

Parameters:
  • name (str)

  • settings (dict)

  • location (Optional[str])

  • ncpu (int)

  • default (str | list)

  • override_location (Optional[str])

which(program)[source]

Module contents

SIMBA Codes Module

This module converts the frameworkLattice class and its elements into a format suitable for the code defined.