This article provides details on running your simulation using the Linux command line or terminal.
From the command line, you can run simulations through the Lumerical design environment, by running the engine directly, or through an MPI.
Running the design environment
[[snippet||52493047561619]]
Note: When using these command line above, the usual LD_LIBRARY_PATH environment variable is ignored. For customized library paths, use LUMERICAL_LD_LIBRARY_PATH or FDTD_LD_LIBRARY_PATH (for FDTD only) instead.
[[snippet||52492316567187]]
Examples
Open FDTD with a specific simulation project.
$ /opt/lumerical/v261/bin/fdtd-solutions simulationfile.fspRunning a script with a simulation file, while hiding the CAD window and disabling safe mode.
$ /opt/lumerical/v261/bin/fdtd-solutions -nw -trust-script -run scriptfile.lsf simulationfile.fspRunning the engine
[[snippet||52492560991251]]
Examples
Running with the -resume flag when checkpoint is enabled in FDTD.
/opt/lumerical/v261/bin/fdtd-engine -t 8 -resume /path/simulationfile.fspRun with 4 threads and save the log file into a different path.
/opt/lumerical/v261/bin/fdtd-engine -t 4 $HOME/temp/filename.fsp -o "~/Documents/logfiles/"Run an EME simulation using 2 threads.
/opt/lumerical/v261/bin/eme-engine -t 2 -logall $HOME/temp/example.lmsRunning with an MPI
The message passing interface (MPI) is used to run simulations at the same time on different machines or processes, or to launch a simulation on a remote machine. Lumerical supports both concurrent computing, where several simulations are run at the same time, and distributed computing, where several machines are used to run a single simulation to use all available memory.
The general syntax for running using MPI is as follows:
mpiexec [mpi_options] solver [solver_options]Where mpiexec is the path to your MPI executable, and solver is the solver executable, each with their corresponding options.
For certain solvers in each MPI, you must use specific executables as seen below, instead of the general ones above.
For further information on setting up the MPI for distributed computing or concurrent computing, please visit their corresponding Knowledge Base article pages.
Stopping your simulation (Quit and Save)
To stop your simulation job, similar to Quit and save in the CAD, you can use the keyboard keys CTRL+C.
You can also find the process ID for the engine in the background and kill the process.
# using pgrep to show the list of PID for "fdtd-engine"
pgrep fdtd-engine
# from the list kill 1 of the PID
kill <PID>Pipe standard output to a text file
The standard output does not appear in the Command Prompt window. To see the report, you can simply pipe the output to a text file using the piping command ">".
For example, to output the engine version number or memory usage report to a file, use the following syntax.
/opt/lumerical/v261/bin/device-engine -v > $HOME/temp/version.txt
/opt/lumerical/v261/bin/dgtd-engine -mr $HOME/temp/example.ldev > $HOME/temp/example_mem_usage.txtSee also
Resource configuration elements and controls
Running simulations with MPI on Linux