Understanding distributed vs concurrent computing
- Distributed: Distributing each job across multiple cores or machines.
Note: Only FDTD and varFDTD support distributed computing across multiple machines.
- Concurrent: Running multiple jobs at the same time. This is particularly useful when doing parameter sweeps. Add multiple rows to the resource list to enable concurrent jobs.
Understanding processes vs threads
There are two approaches to distributing a job across the available processors/cores in a computer:
- Multi-thread: a single process runs the simulation using multiple cores on your computer. This option does not require MPI, and is typically the most efficient option.
- Multi-process: multiple processes run the simulation and each distinct process runs on 1 core on your computer. The processes communicate via MPI. This is required when distributing jobs across multiple machines.
Note: The options available depends on the solver.
Typical resource configurations
FDTD default configuration
Runs on local computer using MPI. Distributes the job to available cores using multiple processes.
Tip: Keep threads to 1 while changing the processes for optimum resource configuration.
FDTD using multi-threading
Set Processes to 1, and Threads to the number of cores in your computer. Typically, the performance with multi-threading will be similar to the default multi-process configuration.
FDTD without using MPI
The solvers can be run without using MPI. Edit the default resource and select, Local Computer as the job launching preset. Set Threads to the number of cores in your computer.
Note: Launching with MPI is required to run simulations on remote computers.
Distribute single large FDTD simulation across multiple computers
See distributed computing for configuration details.
Concurrent parameter sweep on multiple computers
See concurrent computing for configuration details.
Submitting jobs to a cluster job scheduler
See job scheduler integration for configuration details.
Many calculations in the design environments are multi-threaded (eg. fft's). By default, the software will attempt to use all available cores. Occasionally it may be desirable to restrict the number of cores, such as when other applications are running on the computer.
Use the 'Run Test' button to confirm your resources are setup correctly. More information about the test results can be found in this KX article.
Setting the resource configuration with a script
Resource configuration script commands including addresource, deleteresource, getresource, and setresource can be used to configure resources without using the user interface. For more information about each script command, visit the corresponding script command page.
The following lines will add a 2nd resource to the list in FDTD's resources and configure its process to 4 and threads to 2.
The following lines will open an FDTD session via Lumerical Python API and do the exact operation as the example above:
f = lumapi.FDTD()