APEX now includes parallel processing for improved ray tracing speed and efficiency. APEX uses the same computational kernel as ASAP NextGen and therefore its CoreMax technology to automatically run parallel processes on all cores on a local PC. In addition, you can control the number of cores accessed on each machine. You can allocate the number of cores per process through the APEX Project Settings. You can also indicate automatic core allocation for all available cores on your machine.
Parallelization or multi-core support is implemented in APEX through the Message Passing Interface or MPI. MPI has been actively developed since early 1990’s for parallel super computers and now is widely used for solving significant scientific and engineering problems on parallel computers with thousands of CPUs. MPI is considered the standard technology for parallel-distributed computing. MPI achieves parallelization in the process level instead of the thread level used in multi-threading technology. It is important to note that Hyper or Multi-Threading is no substitute for physical cores and true parallel processing since a multi-threaded core must share processing duties and cannot be allocated to a single task.
Cores 0 and 1 are reserved for operating system and APEX on host machine
Incoherent ray traces and calculations in APEX are parallelized and can be simulated on multiple cores.
There must be at least one ray defined in every core to keep the parallelization synchronized during a ray trace. APEX will tell you to switch to a single core when you attempt to trace only one ray while using parallel processing.
Do not change the number of cores during the same APEX simulation. For example, do not simulate your system using 1 core and then switch to 2 cores.
Restart SolidWorks/APEX after changing the number of cores. Be sure to save the Number of Core Processes under Processing Options in APEX Project Settings using the Save As (User) Defaults or at least check the number of cores before proceeding to make sure you have the desired number of cores.
Do not mix ray traces and analyses from a different number of cores in the same simulation. APEX creates working directories for all requested cores. All ray traces and analysis are saved even if temporarily in APEX and in these various working directories. Switching from 1 core to 2 cores, for example, will cause a confliction of the data between the ray traces from different cores.
Ray trace and spot diagrams will typically only show the results from the parent node if more than 1 core is used in the simulation. The other rays are traced, and their contributions are automatically accounted for in the simulation, but you will only see the ray trace results of the master node. This can be somewhat confusing when compared to the results from a single core because it will appear that rays and spots are missing from the trace. However, all data from all cores is combined for numerical and graphical calculations.
The results of an incoherent ray trace plot that is parallel processed over multiple cores will show only the ray trace results of the master node. The other rays are traced, and their contributions are automatically accounted for in the simulation, but you will only see the ray trace results of the master node.
Numerical (statistical) and graphical results will vary slightly depending upon the number of cores used in the simulation. This is due to the deliberate use of different random seed numbers on each core that produce different ray distributions to support a more robust Monte Carlo simulation.