吾爱光设

 找回密码
 注册
会员须知
会员须知
实用帮助
实用帮助
查看: 3972|回复: 5

[求助] [已解决]zemax一用锤形优化cpu就跑满100%

[复制链接]
  • TA的每日心情
    开心
    2024-11-27 10:57
  • 签到天数: 256 天

    [LV.8]以坛为家I

    19

    主题

    106

    回帖

    0

    积分

    小白

    积分
    0
    发表于 2022-11-27 15:44 | 显示全部楼层 |阅读模式
    不知道是不是我的版本有问题啊?是19.4版,我在同学的电脑上也是一用锤形优化cpu就满载。。
    最佳答案
    2022-11-27 16:20
    neoo 发表于 2022-11-27 16:07
    优化时可以限制下CPU使用率:
    方法:控制面板\硬件和声音\电源选项\编辑计划设置\更改高级电源设置\处理器 ...

    查了下其他论坛回复,当优化比较复杂时,很容易CPU 100%,这是正常的。

    链接 :https://community.zemax.com/got-a-question-7/cpu-usage-is-low-during-optimization-934

    摘抄如下:

    Answer:
    This is reasonably common and usually not a problem. There are a couple of reasons this might be, and the exact answer depends largely on the machine hardware, the .ZMX file itself, the number of variables, and the number and complexity of Merit Function Operands. The important thing to remember is that OpticStudio is always trying to use your resources as efficiently as possible (and this may mean using less than 100% of the available cores).
    Firstly, based on the .ZMX file in question and the hardware, there may be memory limitations which prevent or would slow down the system if all cores were utilized. There is overhead in multi-threading; for each core used in optimization, OpticStudio has to copy over and store the optical system in memory. If you have a memory-intensive system (some complex CAD objects, a high-density grid sag surface, etc.) then it might be slow to create this copy, or it is possible that there's simply not have enough system memory for each of the cores.
    Secondly, it's important to consider how the optimizer is threaded. In optimization, OpticStudio will only use as many cores as you have variables assigned. So, if you have a 16 core machine but only 3 optimization variables, ZOS will only ever use 3 (at most) cores for the optimization.
    Finally, the complexity of the Merit Function is important. As I mentioned before, there is overhead in launching threads. If the Merit Function is simple and easy to compute (i.e. a Gaussian Quadrature Wavefront MF might be a few dozen or hundred ray traces), then it might be more efficient to simply run the optimization on a single core or just a couple cores.
    Over the past few years, there have been a couple of releases in which there were improvements to the algorithm to decide how many threads to launch for optimization. For this reason, you might observe differences in CPU usage for the same file (and MF, variables) between versions. However, it should be the case that optimization in the newer versions is more efficient and runs more quickly than older iterations.

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有账号?注册

    ×
    发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
    回复

    使用道具 举报

  • TA的每日心情
    开心
    2024-6-27 18:11
  • 签到天数: 323 天

    [LV.8]以坛为家I

    2

    主题

    15

    回帖

    6

    积分

    小白

    积分
    6
    发表于 2022-11-27 16:07 | 显示全部楼层
    优化时可以限制下CPU使用率:
    方法:控制面板\硬件和声音\电源选项\编辑计划设置\更改高级电源设置\处理器和电源管理\最大处理器状态---调整到70%
    小提示: 如果是笔记本电脑,使用电池设为100%,接电源设置为70%,这样设计好后接电源再点优化。
    发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
    回复

    使用道具 举报

  • TA的每日心情
    开心
    2024-6-27 18:11
  • 签到天数: 323 天

    [LV.8]以坛为家I

    2

    主题

    15

    回帖

    6

    积分

    小白

    积分
    6
    发表于 2022-11-27 16:20 | 显示全部楼层    本楼为最佳答案   
    neoo 发表于 2022-11-27 16:07
    优化时可以限制下CPU使用率:
    方法:控制面板\硬件和声音\电源选项\编辑计划设置\更改高级电源设置\处理器 ...

    查了下其他论坛回复,当优化比较复杂时,很容易CPU 100%,这是正常的。

    链接 :https://community.zemax.com/got-a-question-7/cpu-usage-is-low-during-optimization-934

    摘抄如下:

    Answer:
    This is reasonably common and usually not a problem. There are a couple of reasons this might be, and the exact answer depends largely on the machine hardware, the .ZMX file itself, the number of variables, and the number and complexity of Merit Function Operands. The important thing to remember is that OpticStudio is always trying to use your resources as efficiently as possible (and this may mean using less than 100% of the available cores).
    Firstly, based on the .ZMX file in question and the hardware, there may be memory limitations which prevent or would slow down the system if all cores were utilized. There is overhead in multi-threading; for each core used in optimization, OpticStudio has to copy over and store the optical system in memory. If you have a memory-intensive system (some complex CAD objects, a high-density grid sag surface, etc.) then it might be slow to create this copy, or it is possible that there's simply not have enough system memory for each of the cores.
    Secondly, it's important to consider how the optimizer is threaded. In optimization, OpticStudio will only use as many cores as you have variables assigned. So, if you have a 16 core machine but only 3 optimization variables, ZOS will only ever use 3 (at most) cores for the optimization.
    Finally, the complexity of the Merit Function is important. As I mentioned before, there is overhead in launching threads. If the Merit Function is simple and easy to compute (i.e. a Gaussian Quadrature Wavefront MF might be a few dozen or hundred ray traces), then it might be more efficient to simply run the optimization on a single core or just a couple cores.
    Over the past few years, there have been a couple of releases in which there were improvements to the algorithm to decide how many threads to launch for optimization. For this reason, you might observe differences in CPU usage for the same file (and MF, variables) between versions. However, it should be the case that optimization in the newer versions is more efficient and runs more quickly than older iterations.

    发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
    回复

    使用道具 举报

  • TA的每日心情
    擦汗
    2024-11-26 15:30
  • 签到天数: 462 天

    [LV.9]以坛为家II

    3

    主题

    134

    回帖

    5

    积分

    小白

    积分
    5
    发表于 2022-11-28 14:56 | 显示全部楼层
    CPU满载不好嘛?我还生怕它跑不满,算的慢。优化时的核数我都是直接拉满的,电脑啸叫声越大我越开心,感觉自己节省了优化速度
    发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
    回复

    使用道具 举报

  • TA的每日心情
    开心
    2024-11-27 10:57
  • 签到天数: 256 天

    [LV.8]以坛为家I

    19

    主题

    106

    回帖

    0

    积分

    小白

    积分
    0
     楼主| 发表于 2022-11-28 23:02 来自手机 | 显示全部楼层
    踏雪寻梅 发表于 2022-11-28 14:56
    CPU满载不好嘛?我还生怕它跑不满,算的慢。优化时的核数我都是直接拉满的,电脑啸叫声越大我越开心,感觉 ...

    哈哈哈,用的自己电脑怕跑坏了。。
    发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
    回复

    使用道具 举报

  • TA的每日心情

    2023-11-16 09:56
  • 签到天数: 15 天

    [LV.4]偶尔看看III

    8

    主题

    257

    回帖

    32

    积分

    新手

    积分
    32
    发表于 2022-11-29 12:07 | 显示全部楼层
    炸果壳 发表于 2022-11-28 23:02
    哈哈哈,用的自己电脑怕跑坏了。。

    cpu没这么容易用坏的,一般锤型或全局优化的时候就是会满载,局部优化不会,只会波浪形上下跳动
    发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 注册

    本版积分规则

    联系我们|本论坛只支持PC端注册|手机版|小黑屋|吾爱光设 ( 粤ICP备15067533号 )

    GMT+8, 2024-11-27 12:58 , Processed in 0.093750 second(s), 25 queries .

    Powered by Discuz! X3.5

    © 2001-2024 Discuz! Team.

    快速回复 返回顶部 返回列表