The High-Performance Computing (HPC) feature in Ansys Zemax OpticStudio accelerates the search for optimal design forms for complex systems, turns Monte Carlo tolerancing from overnight to same-day and makes large-scale straylight analysis commercially practicable. HPC refers to using powerful computing systems and parallel processing to solve complex problems much faster than a typical desktop computer. Instead of relying on a single machine, HPC combines the power of multiple systems working together, making it possible to handle calculations that would otherwise take an impractical amount of time.
Note: The HPC feature is available in the Premium and Enterprise editions of OpticStudio version 2026R1.3 and newer, and requires additional HPC Pack licenses. On-premise or on-cloud clusters are prerequisites.
Authored By Niki Papachristou
Introduction
In OpticStudio, HPC brings clear advantages in both speed and productivity. Many optical simulations, especially non-sequential ray tracing, tolerance analysis, and global optimization involve processing millions to billions of rays or running repeated calculations. By using HPC, these tasks can be spread across multiple processors or computing nodes which, working together, significantly reduce computation times without sacrificing accuracy. This speed-up allows engineers to try more design variations, run deeper analyses, and, ultimately, develop better-performing optical systems.
OpticStudio HPC currently accelerates a set of specific processes: optimization, tolerancing, and non-sequential ray tracing. For optimization, it enhances performance in both Hammer Optimization and Global Optimization. In tolerancing, it speeds up Monte Carlo tolerancing runs by enabling distributed execution. Additionally, for non-sequential ray tracing, OpticStudio supports parallel NSC, along with efficient handling of detector data, path statistics, and filtered results.
The HPC feature operates on a remote computer cluster, either on-premises or in the cloud, with OpticStudio connecting securely through user credentials and keys. Jobs are packaged and submitted directly from the OpticStudio user interface, allowing for a streamlined workflow. Cluster settings allow users to define the number of nodes and cores, as well as timeouts and job limits. During execution, computations run remotely, minimizing the use of local resources. Overall, the integration is native to OpticStudio, ensuring minimal disruption to existing workflows.
Capabilities and Considerations for HPC
The HPC feature is accessible through a dedicated tab in the OpticStudio ribbon. Depending on the file mode, sequential or non-sequential (NSC), different computational features are available. Sequential mode supports optimization and tolerancing, whereas NSC mode supports optimization, tolerancing, and non-sequential ray tracing.
The OpticStudio Preferences can be accessed from the same ribbon, opening directly to the HPC tab. From there, users can load cluster configurations and manage scripts via the Script Settings (descriptions of these settings can be found in the help files - Configuration tab).
The same tab also provides Process Data and Reconnect to HPC Job options, enabling users to process results from previously completed jobs and reconnect to active jobs if the connection is interrupted (e.g., due to local system shutdown or network issues). It is recommended to perform a validation before submitting an HPC job to ensure that the cluster configuration and connection are properly established.
The HPC feature has several capabilities and considerations. For project and file management, all files referenced by the design must be included within the HPC job package, and any additional required files such as tolerance scripts (TSC) must be explicitly provided in the Additional files tab. This implies that users must convert their design into a lens project that correctly incorporates all additional required files within the appropriate location. In terms of non-sequential ray tracing, ZRD and PAF file formats are not supported. Instead, a new ZND format is used to record ray interaction data. Note, the Sequence Selector does not currently support ZND files. Only Monte Carlo tolerancing is supported, while sensitivity and inverse sensitivity analyses are disabled. For custom features, user DLLs are supported; however, they must be built to be compatible with Linux environments. The Linux-compiled libraries (using the SO extension) must be placed in the same folder location and have the same file name as the corresponding Windows DLLs. This allows the Zemax HPC Packager to collect them and include them in the job execution package. The UDOC Merit Function operand is not supported.
Example 1: using HPC for Monte Carlo tolerance analysis
A singlet lens is used in this example to demonstrate the tolerance analysis process on HPC (file: [[singlet for HPC – Tolerancing.zprj]]). Note that the file includes the Lens Data Editor (LDE), the Tolerance Data Editor (TDE), and the 3D Layout analysis window. Navigate to the HPC tab and select Tolerancing. Choose Merit Function as the criterion and then proceed to the HPC window. Enter 10,000 as the number of Monte Carlo runs and click Package. The HPC Packager will execute and generate the file required for submission to the cluster. Once packaging is complete, launch the HPC Job Monitor.
Under Job Settings, you can specify the job folder name, the number of nodes, the number of cores per node, the number of Monte Carlo Draws as well as the cluster and job timeout. Navigate to Job Status and click Run. In the Status section, observe that the job has started when the status changes from False to True, along with additional real-time information displayed.
After the job has completed successfully, click Process to download and process the results. A “Report.txt” in the corresponding job folder will open up, displaying data such as number of cores, number of nodes and total calculation time. For tolerance analysis, the user can specify the maximum number of best and worst files to be saved in the project folder. In the same folder, a ZTD file is generated, which contains the results of the tolerance analysis. This file is automatically loaded into the Tolerance Data Viewer and any tolerance analysis tools that are active in the project file (this option needs to be enabled by the user). It can also be loaded into new analysis tools, such as Yield and Histogram. Review the tolerancing results and load the ZTD file into the analysis tools as needed.
Example 2: using HPC for Non-sequential ray tracing
Any type of NSC file can be used to run a non-sequential ray trace on HPC. Open the file and navigate to the HPC tab. Select the Ray Trace feature and observe that the Ray Trace Control tool includes nearly the same options as when running locally. The key difference is that only the ZND file option is available. Choose between Use Ray Sets and Use Custom Filter. The Ray Set Organizer feature (which is located under the Analyze tab) is designed to generate separate output files during ray tracing. When Ray Set Organizer is used in NSC ray tracing by selecting ZND and Ray Sets in the settings, a separate ZND file is generated for each filter defined in the ray set. Similarly, as its name implies the Custom Filter option uses a single filter chosen by the user (more information about ZND files and the Ray Set Organizer can be found in the help files - ZND File, Ray Set Organizer), then click Package.
Launch the HPC Job Monitor. As in the previous example, under Job Settings, you can specify the job folder name, the number of nodes, the number of cores per node, as well as the cluster and job timeout. Additionally, a Ray Multiplier and the specified filters are now available. Navigate to Job Status and click Run. After the completion of the job observe the creation of the ZND files (_all refer to all the rays that have been traced, _s01 are all the rays that have been filtered according to that specific ray set; and _oth are all other rays that do not belong to that ray set.) into the project folder. These can be loaded in a detector viewer analysis window, through the Ray Database drop-down menu.
Conclusion
In this article, the capabilities and limitations of HPC features are presented, along with a step-by-step procedure describing how to run tolerance analysis and NSC ray tracing. The Global and Hammer optimization features on HPC are not covered, as the steps are similar to those described above - Submitting Jobs. However, more information can be found in the help files. Initial benchmarking results showed a linear increase in computational speed when increasing the number of nodes (and, as a result, the number of cores). However, performance is highly dependent on cluster hardware and usage, the feature of usage and optical system set up.
Additional Resources
Zemax HPC Linux Cluster Setup Guide