Skip to main content

Changing the number of cores in a ZPL macro?

  • September 11, 2019
  • 0 replies
  • 232 views

Thomas Magnac
Zemax Staff
Forum|alt.badge.img+2
You can change the number of cores being used in OpticStudio User Interface.
For example when launching raytracing in non-sequential mode.

Here is how to do the same thing from within a ZPL macro:

!through the system properties, code 901:

SYSP 901, 1

!measure time
TIMER
!raytrace
NSTR 1, 0, 0, 0, 0, 1, 0
PRINT "Elapsed time:", ETIM(), "Seconds"
!number of cores
print SYPR(901)
SYSP 901, 16
TIMER
!raytrace
NSTR 1, 0, 0, 0, 0, 1, 0
PRINT "Elapsed time:", ETIM(), "Seconds"
print SYPR(901)

Here is the text output:

0 replies

Be the first to reply!