Unexpected large Real Time on Macos

20 views
Skip to first unread message

Thierry Leininger

unread,
Sep 16, 2025, 6:47:27 AMSep 16
to molpr...@googlegroups.com
Dear Molpro Users

I recently noticed a strange behavior running a calculation on a MacMini (M4 Pro 64Gb memory Sequoia 15.6.1) with Molpro 2025.3.0 (ie the binary available on Molpro web site) using 1 core.
I am computing a potential energy curve of a diatomic and the times below correspond to different bonding distances.
As can be seen, the CPU time is almost always the same along the potential curves but the Real time is really huge for some iterations.
No other calculation is running on the computer.

One of my colleague told me that he noticed the same behavior for some steps during a geometry optimization using molpro2023 on his Mac.

Any hint on what is going on?

Best wishes,

  Thierry




PROGRAMS   *MRCIMRCIMRCIMRCIMULTIMRCIMULTIHF-SCFINTMRCIDelta REALDelta CPU
REAL TIME  *2247SECCPU TIMES  *2316 4.534.884.881058.4328.631066.9226.1213.44108.680.00
REAL TIME  *4590SECCPU TIMES  *4730 4.695.215.261091.5430.671098.5526.839.49141.174.5323432414
REAL TIME  *7055SECCPU TIMES  *7265 4.855.335.401132.7530.521141.1027.9810.22176.934.6924652535
REAL TIME  *9607SECCPU TIMES  *9888 4.785.205.341158.1832.511166.9632.1510.92206.894.8525522623
REAL TIME  *39286SECCPU TIMES  *12606 4.825.165.351185.2532.461194.5533.1214.30243.164.78296792718
REAL TIME  *49186SECCPU TIMES  *15423 4.765.215.321224.2734.141230.8933.4114.19264.674.8299002817
REAL TIME  *59917SECCPU TIMES  *18304 4.525.365.471241.4533.771249.7634.1215.38291.164.76107312881
REAL TIME  *62746SECCPU TIMES  *21204 4.484.865.141250.6933.431253.9834.6412.33300.664.5228292900
REAL TIME  *65544SECCPU TIMES  *24074 4.414.905.131235.4232.331238.5634.4512.04302.764.4827982870
REAL TIME  *68334SECCPU TIMES  *26935 4.604.944.981233.8330.501235.5734.3212.04300.404.4127902861
REAL TIME  *71136SECCPU TIMES  *29808 4.955.405.431232.5334.391237.0034.1112.03307.054.6028022873
REAL TIME  *73940SECCPU TIMES  *32684 4.785.245.241232.6134.211237.8034.1812.02308.994.9528042876
REAL TIME  *113527SECCPU TIMES  *35561 4.815.265.331233.9033.821238.3333.8712.05309.564.78395872877
REAL TIME  *138147SECCPU TIMES  *384174.905.435.331223.1132.891227.3733.1911.98312.494.81246202856
REAL TIME  *140947SECCPU TIMES  *41263 4.795.245.221229.1933.911222.9133.6011.29299.864.9028002846
REAL TIME  *143727SECCPU TIMES  *44133 4.885.245.321229.2634.051234.8532.8312.25310.604.7927802870
REAL TIME  *146389SECCPU TIMES  *46982 4.394.804.801203.5633.921237.7532.8512.31315.054.8826622849
REAL TIME  *155861SECCPU TIMES  *49708 4.334.794.841169.3630.241172.4930.2011.61297.414.3994722726
REAL TIME  *155866SECCPU TIMES  *52432 4.384.814.851167.8130.241172.8030.2211.48297.384.3352724
REAL TIME  *203133SECCPU TIMES  *55136 4.514.854.861165.0730.501170.1830.5010.78283.334.38472672704
REAL TIME  *250836SECCPU TIMES  *57840 4.414.764.921165.7830.371168.7830.4210.76283.864.51477032704
REAL TIME  *300364SECCPU TIMES  *60544 4.384.794.811164.0130.301167.9830.4410.75285.774.41495282704
REAL TIME  *345708SECCPU TIMES  *63247 4.424.814.961163.3430.381167.5630.5710.75286.374.38453442703
REAL TIME  *394324SECCPU TIMES  *65949 4.394.864.871162.1630.371167.2630.3510.74287.054.42486162702
REAL TIME  *423065SECCPU TIMES  *68649 4.344.734.821160.4130.321167.0730.3210.90286.634.39287412700
REAL TIME  *425716SECCPU TIMES  *71363  4.414.814.841164.5930.101166.1230.1811.27297.864.3426512714
REAL TIME  *428377SECCPU TIMES  *74087 4.384.784.841166.4230.081170.3430.0611.46301.624.4126612724
REAL TIME  *432268SECCPU TIMES  *76807 4.394.794.841164.4430.031167.7230.0211.46302.384.3838912720
REAL TIME  *476483SECCPU TIMES  *79518 4.364.774.971160.8330.231163.5730.0711.32301.154.39442152711
REAL TIME  *505295SECCPU TIMES  *82210 4.354.814.831157.1830.241162.0430.3410.65287.444.36288122692
REAL TIME  *508051SECCPU TIMES  *85035 4.384.804.841203.0534.621233.9029.9911.18298.014.3527562825
REAL TIME  *510703SECCPU TIMES  *87752 4.384.774.861160.4329.911166.8129.9011.47304.154.3826522717
REAL TIME  *519121SECCPU TIMES  *90465 4.384.794.811160.4329.901163.2929.8511.36304.154.3884182713
REAL TIME  *567072SECCPU TIMES  *93157 4.424.824.851155.3430.111159.6730.1013.39289.414.38479512692
REAL TIME  *586706SECCPU TIMES  *95845 4.364.794.811152.3230.021158.6930.1013.19288.974.42196342688
REAL TIME  *589342SECCPU TIMES  *98544 4.444.854.901155.4029.831156.1429.7913.91300.064.3626362699
REAL TIME  *622343SECCPU TIMES  *101247 4.474.824.851150.4130.011158.7629.7414.05305.464.44330012703
REAL TIME  *664522SECCPU TIMES  *103932 4.384.784.861151.4829.961154.4230.0013.16292.834.47421792685
REAL TIME  *667145SECCPU TIMES  *106619 4.384.804.821150.4029.811151.2129.9313.34297.664.3826232687
REAL TIME  *669773SECCPU TIMES  *109310 4.464.794.901147.5229.641152.0529.6813.83304.124.3826282691
REAL TIME  *672425SECCPU TIMES  *112020 4.344.804.831152.1229.591164.8229.6313.91305.974.4626522710
REAL TIME  *675073SECCPU TIMES  *114714 4.334.754.801153.3429.521148.6529.5513.93304.984.3426482694
REAL TIME  *677698SECCPU TIMES  *117402 4.374.804.811145.2429.491151.3429.5013.92304.014.3326252688
REAL TIME  *705489SECCPU TIMES  *120090 4.394.764.851142.9129.761150.3929.4713.83307.684.37277912688
REAL TIME  *749409SECCPU TIMES  *122756 4.374.834.861140.9029.671144.3529.6312.92294.244.39439202666
REAL TIME  *752022SECCPU TIMES  *125429 4.374.854.851136.2129.461142.0129.5513.95307.974.3726132673
REAL TIME  *754640SECCPU TIMES  *128110 4.344.834.841140.0529.331143.4529.3516.29308.354.3726182681
REAL TIME  *757251SECCPU TIMES  *130785 4.354.844.861137.3729.281140.1029.2916.33309.284.3426112675
REAL TIME  *759859SECCPU TIMES  *133459 4.364.834.851134.1429.211140.4429.2316.28309.774.3526082674
REAL TIME  *774912SECCPU TIMES  *136125 4.274.754.781128.6829.121138.8029.0916.23310.154.36150532666
REAL TIME  *822176SECCPU TIMES  *138753 4.364.754.761122.6829.281127.7529.3915.26290.384.27472642628
REAL TIME  *867647SECCPU TIMES  *141378 4.324.744.791122.0129.251124.7829.3515.08290.884.36454712625
REAL TIME  *913088SECCPU TIMES  *143998 4.284.814.791118.7929.281122.4029.3015.20290.244.32454412620
REAL TIME  *957680SECCPU TIMES  *146617 4.354.774.781117.3429.261121.6829.2717.48290.164.28445922619
REAL TIME  *1004688SECCPU TIMES  *149233 4.424.704.851115.5729.161119.5129.1617.61291.344.35470082616
REAL TIME  *1007669SECCPU TIMES  *151867 4.344.744.821120.8028.951121.1229.1217.63301.874.4229812634
REAL TIME  *1010242SECCPU TIMES  *154503 4.364.794.811117.6928.741119.2629.1318.57308.484.3425732636
REAL TIME  *1012817SECCPU TIMES  *157141 4.384.844.861119.5228.661119.2629.0318.43309.114.3625752638
REAL TIME  *1017538SECCPU TIMES  *159780 4.324.754.791115.4828.621120.9928.6918.41312.694.3847212639
REAL TIME  *1020103SECCPU TIMES  *162408 4.384.774.851114.7728.601118.5528.6618.16306.044.3225652628
REAL TIME  *1022673SECCPU TIMES  *165043 4.384.804.861113.4228.501118.5028.5218.30312.974.3825702635
REAL TIME  *1025242SECCPU TIMES  *167676 4.414.814.821113.3728.431117.0728.5018.30313.764.3825692633
REAL TIME  *1027806SECCPU TIMES  *170305 4.394.804.851111.1128.431114.0628.4318.28314.124.4125642629
REAL TIME  *1030370SECCPU TIMES  *172932 4.404.814.811110.9128.301113.3428.4318.24313.984.3925642627
REAL TIME  *1032929SECCPU TIMES  *175555 4.354.774.851106.4328.301112.9428.3318.24314.464.4025592623
REAL TIME  *1035488SECCPU TIMES  *178177 4.404.834.901112.3228.251108.1228.3318.16312.484.3525592622

tibo...@gmail.com

unread,
Sep 16, 2025, 12:18:14 PMSep 16
to molpro-user
Dear Thierry,

Something is wrong with at least one of these timings. The real time can never be shorter than the CPU time if you are using only 1 core. Yet in your table there is an entry where the real time increment is only 5 seconds, while the CPU time is  2724 s.
You should be able to confirm that it is really only 1 thread running with something like htop (if that's available on Mac).

With that said, I recommend checking your disk utilization while Molpro is running (in terms of disk busy%).
The most likely reason for real time being much higher than CPU time (especially when running on only 1 core) is a disk bandwidth bottleneck.
This can be exacerbated by giving Molpro either too much or too little memory, but some methods in Molpro always do a lot of disk IO.

If you are indeed IO-bound, I have no good recommendations I am afraid.
Under Linux you can work around this by setting some kernel tunables to maximize write caching by the OS in free RAM. But this might not be possible under MacOS.

And in general I would caution against running IO heavy quantum chemistry on Macs, unless you are mindful of the impact it can have on the lifespan of your SSD. Like most SSDs, the Mac's storage is made out of NAND chips, which have a rather finite write endurance. Every write to disk damages the NAND chips a tiny amount, which is usually not a concern, but workloads with a lot of disk writes WILL wear out your storage chips. This is especially painful on modern Macs, where replacing the storage chips is unreasonably costly, even in cases where they are on an easy-to-replace module.
The situation is even worse for Macbooks and other Macs where the NAND chips are soldered to the logic board.

I guess one option would be to buy a high-quality (cooling!) Thunderbolt 40 Gbps M.2 NVMe SSD enclosure, fit that with a fast NVMe SSD, and use that external drive as your Molpro scratch drive. This would also spare the expensive internal SSD from being worn down by the large amount of writes.
If that is still not sufficient bandwidth, you could try a Thunderbolt 5 80 Gbps external enclosure (if your Mac has TB5) or multiple TB4 SSDs in RAID 0.

Best,
Tibor

Thierry Leininger

unread,
Sep 17, 2025, 7:01:51 AMSep 17
to tibo...@gmail.com, molpro-user
Dear Tibor

Thank you for your explanation. I did indeed extract a wrong timing for the one with REAL TIME=5s but it does not change the global picture as you can see in the new table below.
I was also surprised that the REAL TIME was smaller than the CPU TIME, but unfortunately this is how it appears in the output as you can seen in the joined extract.
As far as I can see I am using just one thread.

Thank you for the information on Mac’s ssd drives. I wasn’t aware of this problem. Then, what about ‘direct’ calculations on Mac?
Anyway, as you suggest I will look for an external drive solution.

Best regards,

  Thierry


KrXe_cation_Tibor.out

tibo...@gmail.com

unread,
Sep 18, 2025, 9:59:58 AMSep 18
to molpro-user
Dear Thierry,

Integral direct calculations can indeed be a better choice if disk IO is a bottleneck. However, not all methods in Molpro support integral-direct.
Another thing to consider would be density fitting. DF variants of methods often have substantially lower RAM and IO demands. Of course the magnitude of savings and the accuracy penalty differs between methods.
Usually with properly chosen auxiliary basis sets DF is quite accurate.

You could also consider using a smaller basis and MRCI-F12 instead of MRCI.

Best,
Tibor
Reply all
Reply to author
Forward
0 new messages