Run all simulations in the job manager queue. The script execution will be paused while the jobs run, then resume when all of the simulations have completed successfully.
If an error occurs during execution, the script command raises an error.
In the case of concurrent simulations, the simulations without error will continue to run, while simulations with errors terminates. When there are multiple error messages, only the latest one is displayed.
Different products have different syntaxes, as shown below.
This function does not return any data.
For Ansys Lumerical FDTD™,
| Syntax | Description |
|---|---|
| runjobs; | Run jobs in the Job queue for existing (active) solver. Use the computer resources and parallel settings that are specified in the Resource Manager. |
| runjobs(“solver”, “resource_type”); |
Runs jobs in the Job queue for the specified solver with specific type of resource:
|
| runjobs("solver", option); |
Run jobs in the Job queue for specified solver with an option on resources used:
|
For Ansys Lumerical MODE™, Ansys Lumerical Multiphysics™,
| Syntax | Description |
|---|---|
| runjobs; | Run jobs in the Job queue for existing (active) solver. Use the computer resources and parallel settings that are specified in the Resource Manager. |
| runjobs("solver", option); |
Run jobs in the Job queue for specified solver with an option on resources used:
|
For Ansys Lumerical INTERCONNECT™,
| Syntax | Description |
|---|---|
| runjobs; | Run jobs in the Job queue. Use the computer resources and parallel settings that are specified in the Resource Manager. |
| runjobs("solver", option); |
Run jobs in the Job queue for specified solver with an option on resources used:
|
When using Ansys Cloud Burst Compute™ for Lumerical,
| Syntax | Description |
|---|---|
| runjobs(“solver”, “resource_type”, “burst”, burst_settings); |
Run jobs in the job queue for the specified solver using Ansys Cloud Burst Compute™ for Lumerical:
|
Example
The following script code illustrates how to use the addjob and runjobs script commands to do a parameter sweep. The initial for loop creates a simulation file for each point in the sweep and adds the simulations to the job queue. Next, the runjobs command will run all simulations in the job queue. If multiple computer resources are configured in the Resource Manager, then simulations will run concurrently. When all of the simulations are complete, a second for loop is used to re-load each simulation file and do the required analysis.
# create 10 simulation files and add them to the job queue
newproject;
addvarfdtd;
adddipole;
addcircle;
rad=linspace(1e-6,10e-6,10);
for(i=1:10) {
setnamed("circle","radius",rad(i));
save("temp_"+num2str(i));
addjob(currentfilename);
}
runjobs;
# run all jobs in the job queue
runjobs;
# load each simulation and do required analysis
for(i=1:10) {
load("temp_"+num2str(i));
...
}The following example illustrates the usage of the script command in a try/catch block. If an error occurs during execution, the error message is displayed and the script continues.
try{
addjob("MyFDTDSimulation.fsp");
runjobs;
}catch(errMsg);
print(errMsg);
See Also
run , runsweep , addjob , clearjobs , listjobs , save , load