-
Notifications
You must be signed in to change notification settings - Fork 31
/
script-corecycler.ps1
11386 lines (8931 loc) · 517 KB
/
script-corecycler.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<#
.AUTHOR
sp00n
.VERSION
0.9.6.2
.DESCRIPTION
Sets the affinity of the selected stress test program process to only one
core and cycles through all the cores which allows to test the stability of
each individual core during single core loads
.LINK
https://github.com/sp00n/corecycler
.LICENSE
Creative Commons "CC BY-NC-SA"
https://creativecommons.org/licenses/by-nc-sa/4.0/
https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
#>
# Our current version
$version = '0.9.6.2'
# This defines the strict mode
Set-StrictMode -Version 3.0
# We want to use UTF-8 if possible when generating files, not UTF-16
$PSDefaultParameterValues['*:Encoding'] = 'utf8'
# Set the window title
$Host.UI.RawUI.WindowTitle = ('CoreCycler ' + $version + ' starting')
Write-Host('Starting CoreCycler v' + $version + '...')
Write-Host('Press CTRL+C to abort') -ForegroundColor Yellow
# Global variables
$scriptProcessId = $PID
$parentProcessId = (Get-CimInstance Win32_Process -Filter "ProcessId = $($PID)").ParentProcessId
$parentMainWindowHandle = (Get-Process -Id $parentProcessId).MainWindowHandle
$scriptStartDate = Get-Date
$scriptStartDateTime = Get-Date -Format yyyy-MM-dd_HH-mm-ss
$configsPath = 'configs'
$configsPathAbsolute = $PSScriptRoot + '\' + $configsPath + '\'
$configDefaultPath = $configsPathAbsolute + 'default.config.ini'
$configUserPath = $PSScriptRoot + '\config.ini'
$canUseLogFile = $false
$logBuffer = [System.Collections.ArrayList]::new()
$logLevel = 2
$logFilePath = 'logs'
$logFilePathAbsolute = $PSScriptRoot + '\' + $logFilePath + '\'
$logFileName = 'CoreCycler_' + $scriptStartDateTime + '.log'
$logFileFullPath = $logFilePathAbsolute + $logFileName
$helpersPathAbsolute = $PSScriptRoot + '\helpers\'
$scriptDriveLetter = $PSScriptRoot[0]
$enableUpdateCheck = $true
$updateCheckUrl = 'https://api.github.com/repos/sp00n/corecycler/releases'
$updateCheckFile = $PSScriptRoot + '\.updatecheck'
$updateCheckFrequency = [Decimal] 24
$updateCheckJob = $null
$updateCheckResult = @{}
$showUpdateAvailableMessage = $false
$settings = $null
$canUseWindowsEventLog = $false
$storedWheaError = $null
$selectedStressTestProgram = $null
$useAutomaticRuntimePerCore = $false
$windowProcess = $null
$windowProcessId = $null
$windowProcessMainWindowHandle = $null
$stressTestProcess = $null
$stressTestProcessId = $null
$stressTestThreads = @()
$stressTestThreadIds = @()
$processCounterPathId = $null
$processCounterPathTime = $null
$coresWithError = @()
$coresWithErrorsCounter = @{}
$numCoresWithError = 0
$coresWithWheaError = @()
$coresWithWheaErrorsCounter = @{}
$numCoresWithWheaError = 0
$errorCollector = @{}
$stressTestLogFileName = $null
$stressTestLogFilePath = $null
$prime95CPUSettings = $null
$FFTSizes = $null
$FFTMinMaxValues = $null
$minFFTSize = $null
$maxFFTSize = $null
$fftSubarray = $null
$lastFilePosition = 0
$lineCounter = 0
$newLogEntries = [System.Collections.ArrayList]::new()
$allLogEntries = [System.Collections.ArrayList]::new()
$allFFTLogEntries = [System.Collections.ArrayList]::new()
$allTestLogEntries = [System.Collections.ArrayList]::new()
$cpuTestMode = $null
$coreTestOrderMode = $null
$coreTestOrderCustom = [System.Collections.ArrayList]::new()
$scriptExit = $false
$fatalError = $false
$previousFileSize = $null
$previousPassedFFTSize = $null
$previousPassedFFTEntry = $null
$previousPassedTest = $null
$previousPassedTestEntry = $null
$isPrime95 = $false
$isAida64 = $false
$isYCruncher = $false
$isYCruncherOld = $false
$isYCruncherWithLogging = $false
$isLinpack = $false
$showPrime95NewWarning = $false
$cpuCheckIterations = 0
$runtimeRemaining = 0
$runtimeRemainingMax = 0
$startedIterations = 0
$completedIterations = 0
$numTestedCores = 0
$testedCoresArray = @{}
# Processor and system related variables
$freeMemory = 0
$processor = $null
$isIntelProcessor = $false
$numLogicalCores = 0
$numPhysCores = 0
$numProcessorGroups = 1
$numCpusInLastProcessorGroup = 0
$isHyperthreadingEnabled = $false
$hasAsymmetricCoreThreads = $false
$hasMoreThan64Cores = $false
# Parameters that are controllable by debug settings
$debugSettingsActive = $false
$disableCpuUtilizationCheckDefault = 0
$useWindowsPerformanceCountersForCpuUtilizationDefault = 0
$enableCpuFrequencyCheckDefault = 0
$tickIntervalDefault = 10
$delayFirstErrorCheckDefault = 0
$stressTestProgramPriorityDefault = 'Normal'
$stressTestProgramWindowToForegroundDefault = 0
$suspensionTimeDefault = 1000
$modeToUseForSuspensionDefault = 'Threads'
$disableCpuUtilizationCheck = $disableCpuUtilizationCheckDefault
$useWindowsPerformanceCountersForCpuUtilization = $useWindowsPerformanceCountersForCpuUtilizationDefault
$enableCpuFrequencyCheck = $enableCpuFrequencyCheckDefault
$tickInterval = $tickIntervalDefault
$delayFirstErrorCheck = $delayFirstErrorCheckDefault
$stressTestProgramPriority = $stressTestProgramPriorityDefault
$stressTestProgramWindowToForeground = $stressTestProgramWindowToForegroundDefault
$suspensionTime = $suspensionTimeDefault
$modeToUseForSuspension = $modeToUseForSuspensionDefault
$enablePerformanceCounters = $false
$showNoteForDisableCpuUtilization = $false
$canUseFlushToDisk = $false
# The default settings for the config.ini (resp. default.config.ini)
$DEFAULT_SETTINGS_STRING = @"
# Config file for CoreCycler
# You can always find the default config file in configs\default.config.ini as a reference
# General settings
[General]
# Use a predefined config file instead of this one
# If this value is set, it will use the content from the file provided, overwriting all settings further below
# (which means that if you use this setting, you can safely remove all other settings in the "main" config.ini file)
# If this value is empty or invalid, the other settings from this file will apply
#
# It's useful for quickly switching between various configs, and you can find some predefined config files in the "configs" directory
# The setting uses a relative path from the location where this file is located in
# Example:
# useConfigFile = configs\quick-initial-test.yCruncher.config.ini
#
# Default: (empty)
useConfigFile =
# The program to perform the actual stress test
# The following programs are available:
# - PRIME95
# - AIDA64
# - YCRUNCHER
# - YCRUNCHER_OLD
# - LINPACK
# You can change the test mode and options for each stress test program in the respective [section] further down
# Note: For AIDA64, you need to manually download and extract the portable ENGINEER version and put it
# in the /test_programs/aida64/ folder
# AIDA64 is somewhat sketchy as well
# Note: There are two versions of y-cruncher included, which you can select with either "YCRUNCHER" or "YCRUNCHER_OLD"
# The "old" version uses the binaries and test algorithms that were available before version 0.8 of y-cruncher
# See the comments in the [yCruncher] section for a more detailed description
#
# Default: PRIME95
stressTestProgram = PRIME95
# Set the runtime per core
# You can define a specific runtime per core, by entering a numeric value in seconds,
# or use 'h' for hours, 'm' for minutes and 's' for seconds
# Examples: 360 = 360 seconds
# 1h4m = 1 hour, 4 minutes
# 1.5m = 1.5 minutes = 90 seconds
#
# Automatic runtime:
# You can also set it to "auto", in which case it will perform one "full" run for each core
# For Prime95, it will wait until all of the FFT sizes in the selected preset have been tested and
# will then continues to the next core and start again
# For y-cruncher the "auto" setting will wait until all selected tests have been finished for a core
# and will then continue to the next core
# If logging has been disabled for y-cruncher, it will fall back to 10 minutes per core
# For Aida64 the "auto" setting will default to 10 minutes per core
#
# Below are some examples of the runtime for one iteration of Prime95 for the various tests on my 5900X with one thread
# The first iteration is also usually the fastest one
# Selecting two threads usually takes *much* longer than one thread for one iteration in Prime95
# - Prime95 "Smallest": 4K to 21K - [SSE] ~3-4 Minutes <|> [AVX] ~8-9 Minutes <|> [AVX2] ~8-10 Minutes
# - Prime95 "Small": 36K to 248K - [SSE] ~4-6 Minutes <|> [AVX] ~14-19 Minutes <|> [AVX2] ~14-19 Minutes
# - Prime95 "Large": 426K to 8192K - [SSE] ~18-22 Minutes <|> [AVX] ~37-44 Minutes <|> [AVX2] ~38-51 Minutes
# - Prime95 "Huge": 8960K to MAX - [SSE] ~13-19 Minutes <|> [AVX] ~27-40 Minutes <|> [AVX2] ~33-51 Minutes
# - Prime95 "All": 4K to MAX - [SSE] ~40-65 Minutes <|> [AVX] ~92-131 Minutes <|> [AVX2] ~102-159 Minutes
# - Prime95 "Moderate": 1344K to 4096K - [SSE] ~7-15 Minutes <|> [AVX] ~17-30 Minutes <|> [AVX2] ~17-33 Minutes
# - Prime95 "Heavy": 4K to 1344K - [SSE] ~15-28 Minutes <|> [AVX] ~43-68 Minutes <|> [AVX2] ~47-73 Minutes
# - Prime95 "HeavyShort": 4K to 160K - [SSE] ~6-8 Minutes <|> [AVX] ~22-24 Minutes <|> [AVX2] ~23-25 Minutes
#
# Default: 6m
runtimePerCore = 6m
# Periodically suspend the stress test program
# This can simulate load changes / switches to idle and back
# Setting this to 1 will periodically suspend the stress test program, wait for a bit, and then resume it
# You should see the CPU load and clock speed drop significantly while the program is suspended and rise back up again
# Note: This will increase the runtime of the various stress tests as seen in the "runtimePerCore" setting by roughly 10%
#
# Default: 1
suspendPeriodically = 1
# The test order of the cores
# Available modes:
# Default: On CPUs with more than 8 physical cores: 'Alternate'. Otherwise 'Random'
# Alternate: Alternate between the 1st core on CCD1, then 1st on CCD2, then 2nd on CCD1, then 2nd on CCD2, etc.
# This should distribute the heat more evenly and possibly allow for higher clocks on CPUs with 2 CCDs
# Random: A random order
# Sequential: Cycle through the cores in numerical order
#
# You can also define your own testing order by entering a list of comma separated values.
# The list will be processed as provided, which means you can test the same core multiple times per iteration.
# Do note however that the "coresToIgnore" setting still takes precedence over any core listed here.
# The enumeration of cores starts with 0
# Example: 5, 4, 0, 5, 5, 7, 2
#
# Default: Default
coreTestOrder = Default
# Skip a core that has thrown an error in the following iterations
# If set to 0, this will test a core in the next iterations even if has thrown an error before
#
# Default: 1
skipCoreOnError = 1
# Stop the whole testing process if an error occurred
# If set to 0 (default), the stress test programm will be restarted when an error
# occurs and the core that caused the error will be skipped in the next iteration
#
# Default: 0
stopOnError = 0
# The number of threads to use for testing
# You can only choose between 1 and 2
# If Hyperthreading / SMT is disabled, this will automatically be set to 1
# Currently there's no automatic way to determine which core has thrown an error
# Setting this to 1 causes higher boost clock speed (due to less heat)
#
# Default: 1
# Maximum: 2
numberOfThreads = 1
# Use only one thread for load generation, but assign this thread to both virtual (logical) cores
# This way the Windows Scheduler or the internal CPU scheduler will choose which of both virtual CPU is used
# This may lead to additional stress situation otherwise not possible
# This setting has no effect if Hyperthreading / SMT is disabled or if numberOfThreads = 2
#
# Default: 0
assignBothVirtualCoresForSingleThread = 0
# The max number of iterations
# High values are basically unlimited (good for testing over night)
#
# Default: 10000
maxIterations = 10000
# Ignore certain cores
# Comma separated list of cores that will not be tested
# The enumeration of cores starts with 0
#
# Example: coresToIgnore = 0, 1, 2
# Default: (empty)
coresToIgnore =
# Restart the stress test process when a new core is selected
# This means each core will perform the same sequence of tests during the stress test
# This setting is best combined with runtimePerCore = auto
# Note: The monitor doesn't seem to turn off when this setting is enabled
#
# Important note:
# One disadvantage of this setting is that it has the potential to limit the amount of tests that the stress test program
# can run.
# In Prime95 for example, each FFT size will run for roughly 1 minute (except for very small ones), so if you want to make
# sure that Prime95 runs all of the available FFT sizes for a setting, you'll have to extend the "runtimePerCore" setting
# from the default value to something higher.
# For example the "Huge"/SSE preset has 19 FFT entries, and tests on my 5900X showed that it roughly takes 13-19 Minutes
# until all FFT sizes have been tested. The "Large"/SSE seems to take between 18 and 22 Minutes.
# I've included the measured times in the comment for the "runtimePerCore" setting above.
# This is why setting runtimePerCore = auto is beneficial when using this setting, to make sure every test is performed
# for every core.
#
# If this setting is disabled, a new core will very likely start with a different test / FFT size than the previous one.
# For longer testing periods (e.g. over night), the tested FFT sizes / algorithms will even out eventually, but if you
# want to make sure that each core is tested in exactly the same way, you should enable this setting.
#
# Default: 0
restartTestProgramForEachCore = 0
# Set a delay between the cores
# If the "restartTestProgramForEachCore" flag is set, this setting will define the amount of seconds between the end of
# the run of one core and the start of another
# If "restartTestProgramForEachCore" is 0, this setting has no effect
# Using this setting may help your CPU to cool down a little between cores, which could result in slightly higher
# core clocks at the start of the test (which could help in identifying instabilities)
#
# Default: 15
delayBetweenCores = 15
# Beep on a core error
# Play a beep when a core has thrown an error
#
# Default: 1
beepOnError = 1
# Flash on a core error
# Flash the window/icon in the taskbar when a core has thrown an error
#
# Default: 1
flashOnError = 1
# Check for WHEA errors
# If this is enabled, CoreCycler will periodicall check the Windows Event Log for WHEA errors
# These WHEA errors do not necessarily cause or show up together with a stress test error, but are indicative
# of an unstable overclock/undervolt
# A stable system should not produce any WHEA errors/warnings
#
# Default: 1
lookForWheaErrors = 1
# Prime95 specific settings
[Prime95]
# The test modes for Prime95
# SSE Lightest load on the processor, lowest temperatures, highest boost clock
# AVX Medium load on the processor, medium temperatures, medium boost clock
# AVX2 Heavy load on the processor, highest temperatures, lowest boost clock
# AVX512 Only available for certain CPUs (Ryzen 7000, some Intel Alder Lake, etc)
# CUSTOM You can define your own settings for Prime. See the "customs" section further below
#
# Default: SSE
mode = SSE
# The FFT size preset to test for Prime95
# These are basically the presets as present in Prime95, plus an additional few
# Note: If "mode" is set to "CUSTOM", this setting will be ignored
# Smallest 4K to 21K - Prime95 preset text: "tests L1/L2 caches, high power/heat/CPU stress"
# Small 36K to 248K - Prime95 preset text: "tests L1/L2/L3 caches, maximum power/heat/CPU stress"
# Large 426K to 8192K - Prime95 preset text: "stresses memory controller and RAM" (although dedicated memory stress testing is disabled here by default!)
# Huge 8960K to MAX - Anything beginning at 8960K up to the highest FFT size (32768K for SSE/AVX, 51200K for AVX2, 65536K for AVX512)
# All 4K to MAX - 4K to up to the highest FFT size (32768K for SSE/AVX, 51200K for AVX2, 65536K for AVX512)
# Moderate 1344K to 4096K - special preset, recommended in the "Curve Optimizer Guide Ryzen 5000"
# Heavy 4K to 1344K - special preset, recommended in the "Curve Optimizer Guide Ryzen 5000"
# HeavyShort 4K to 160K - special preset, recommended in the "Curve Optimizer Guide Ryzen 5000"
#
# You can also define you own range by entering two FFT sizes joined by a hyphen, e.g 36-1344
#
# Default: Huge
FFTSize = Huge
# y-cruncher specific settings
# These apply to both "YCRUNCHER" and "YCRUNCHER_OLD"
[yCruncher]
# The test modes for y-cruncher
# y-cruncher offer various test modes (binaries/algorithms), that require different instruction sets to be available
# See the \test_programs\y-cruncher\Binaries\Tuning.txt file for a detailed explanation
#
# Test Mode Name Automatic Selection For Required Instruction Set
# -------------- ----------------------- ------------------------
# "04-P4P" Intel Pentium 4 Prescott SSE, SSE2, SSE3
# "05-A64 ~ Kasumi" AMD Athlon 64 x64, SSE, SSE2, SSE3
# "08-NHM ~ Ushio" Intel Nehalem x64, SSE, SSE2, SSE3, SSSE3, SSE4.1
# "11-SNB ~ Hina" Intel Sandy Bridge x64, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX
# "12-BD2 ~ Miyu" AMD Piledriver x64, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, ABM, FMA3
# "13-HSW ~ Airi" Intel Haswell x64, ABM, BMI1, BMI2, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, FMA3, AVX2
# "14-BDW ~ Kurumi" Intel Broadwell x64, ABM, BMI1, BMI2, ADX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, FMA3, AVX2
# "17-SKX ~ Kotori" Intel Skylake X [AVX512] x64, ABM, BMI1, BMI2, ADX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, FMA3, AVX2, AVX512-(F/CD/VL/BW/DQ)
# "17-ZN1 ~ Yukina" AMD Zen 1 Summit Ridge x64, ABM, BMI1, BMI2, ADX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, FMA3, AVX2
# "18-CNL ~ Shinoa" Intel Cannon Lake [AVX512] x64, ABM, BMI1, BMI2, ADX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, FMA3, AVX2, AVX512-(F/CD/VL/BW/DQ/IFMA/VBMI)
# "19-ZN2 ~ Kagari" AMD Zen 2 Matisse (and Zen 3) x64, ABM, BMI1, BMI2, ADX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, FMA3, AVX2
# "22-ZN4 ~ Kizuna" AMD Zen 4 Raphael [AVX512] x64, ABM, BMI1, BMI2, ADX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, FMA3, AVX2, AVX512-(F/CD/VL/BW/DQ/IFMA/VBMI/GFNI)
# "24-ZN5 ~ Komari" AMD Zen 5 Granite Ridge [AVX512] x64, ABM, BMI1, BMI2, ADX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, FMA3, AVX2, AVX512-(F/CD/VL/BW/DQ/IFMA/VBMI/VBMI2/GFNI)
#
# If you let y-cruncher run on its own, it will automatically select one of these test modes depending on the processor it detects,
# this is the "Automatic Selection For" column in the table above
# For CoreCycler however you need to select a specific test mode to be run
# As a general rule you can assume that the less instructions are required, the less heat a test mode will produce, and therefore the boost clocks can go higher
# On the other hand, if you actually want to test all the transistors in your chip, you will need to select a test mode that covers all of the available instruction sets
# So it's advised that you test both with the least and the highest amount of available instruction sets for your processor to cover all use cases
#
# Be aware that test modes that require AVX512 instructions will not work on processors that do not support AVX512!
# It will either outright crash or simply not start
#
# A quick overview:
# "04-P4P" produces the least amount of heat and should therefore produce the highest boost clock on most tests
# "14-BDW ~ Kurumi" is the test that y-cruncher itself would default to if you run it on an Intel CPU up to at least 14th gen
# "19-ZN2 ~ Kagari" is the test that y-cruncher itself would default to for Zen 2/3 (Ryzen 3000/5000)
# "22-ZN4 ~ Kizuna" is the test that y-cruncher itself would default to for Zen 4 (Ryzen 7000) and uses AVX512 instructions
# "24-ZN5 ~ Komari" is the test that y-cruncher itself would default to for Zen 5 (Ryzen 9000) and uses AVX512 instructions
#
# User experience seems to indicate that "19-ZN2 ~ Kagari" is pretty good for testing stability, even for Zen 4 (Ryzen 7000) CPUs
# It is unclear yet how Zen 5 / Ryzen 9000 CPUs will turn out
# So as a recommendation, use "04-P4P" for low load testing and "19-ZN2 ~ Kagari" for higher/AVX2 load scenarios
# As "14-BDW ~ Kurumi" is the test mode that y-cruncher chooses for Intel CPUs, it is not entirely clear if this or "19-ZN2 ~ Kagari"
# is the better test for AVX/AVX2 loads on Intel CPUs. At least they share the same instruction sets, so you might need to check for yourself
#
#
# When using the old y-cruncher version ("YCRUNCHER_OLD" selected as the stress test), there's an additional test mode you can use:
#
# Test Mode Name Automatic Selection For Required Instruction Set
# -------------- ----------------------- ------------------------
# "00-x86" Legacy x86 86/IA-32 since Pentium (BSWAP, CMPXCHG, CPUID, RDTSC, possibly others...)
#
# It is not available anymore in the recent version of y-cruncher, which is now the default one ("YCRUNCHER"), so if you want to use a test
# with the least used instruction sets for low loads, you would need to switch to "YCRUNCHER_OLD" as the stress test
# Also note that if you use "YCRUNCHER_OLD", you will also need to adapt the "tests" setting, as the old version uses different names
#
# Default: 04-P4P
mode = 04-P4P
# Set the test algorithms to run for y-cruncher
# y-crunchers offers various different test algorithms that it can run, here you can select which ones it should use
# Tag Test Name Component CPU------Mem
# --- --------- --------- ------------
# BKT Basecase + Karatsuba Scalar Integer -|--------
# BBP BBP Digit Extraction AVX2 Float |---------
# SFT Small In-Cache FFTv3 AVX2 Float -|--------
# SFTv4 Small In-Cache FFTv4 AVX2 Float -|--------
# SNT Small In-Cache N63 AVX2 Integer --|-------
# SVT Small In-Cache VT3 AVX2 Float --|-------
# FFT Fast Fourier Transform (v3) AVX2 Float ---------|
# FFTv4 Fast Fourier Transform (v4) AVX2 Float ---------|
# N63 Classic NTT (v2) AVX2 Integer ---|------
# VT3 Vector Transform (v3) AVX2 Float ----|-----
#
# Use a comma separated list
# Default: BKT, BBP, SFT, SFTv4, SNT, SVT, FFT, FFTv4, N63, VT3
tests = BKT, BBP, SFT, SFTv4, SNT, SVT, FFT, FFTv4, N63, VT3
# Set the test algorithms to run for the "old" version of y-cruncher ("YCRUNCHER_OLD" selected as the stress test)
# This older version (v0.7.10.9513) has a different set of tests to choose from
# Tag Test Name Component CPU------Mem
# --- --------- --------- ------------
# BKT Basecase + Karatsuba Scalar Integer -|--------
# BBP BBP Digit Extraction Floating-Point |--------- depending on the selected mode uses SSE, AVX, AVX2 or AVX512
# SFT Small In-Cache FFT Floating-Point -|-------- depending on the selected mode uses SSE, AVX, AVX2 or AVX512
# FFT Fast Fourier Transform Floating-Point ---------| depending on the selected mode uses SSE, AVX, AVX2 or AVX512
# N32 Classic NTT (32-bit) Scalar Integer -----|---- depending on the selected mode uses SSE, AVX, AVX2 or AVX512
# N64 Classic NTT (64-bit) Scalar Integer ---|------ depending on the selected mode uses SSE, AVX, AVX2 or AVX512
# HNT Hybrid NTT Mixed Workload -----|----
# VST Vector Transform Floating-Point ------|--- depending on the selected mode uses SSE, AVX, AVX2 or AVX512
# C17 Code 17 Experiment AVX2/512 Mixed ---|------ depending on the selected mode uses AVX2 or AVX512
#
# Important:
# "C17" (Code 17 Experiment) will only work with a AVX2 and AVX512 workload (so with mode "13-HSW ~ Airi" and above)
#
# Use a comma separated list
# Default: BKT, BBP, SFT, FFT, N32, N64, HNT, VST
#tests = BKT, BBP, SFT, FFT, N32, N64, HNT, VST
# Set the duration in seconds for each test in y-cruncher
# The duration for each individual test selected above in the "tests" setting
# Note: not the total runtime
#
# Default: 60
testDuration = 60
# Memory allocation for y-cruncher
# This allows you to customize the allocated memory for y-cruncher
# Set the value in bytes or use a "short" notation like e.g. "64MB"
# The default setting uses 13.4 MB (13418572 bytes, 12.8 MiB) for one resp. 26.7 MB (26567600 bytes, 25.3 MiB) for two threads
# Note the difference between "MB" (1000 kilobyte = 1000*1000 byte) and "MiB" (1024 kibibyte = 1024*1024 byte)
#
# Default: Default
memory = Default
# Enable or disable the custom logging wrapper for y-cruncher
# We are using the helpers/WriteConsoleToWriteFileWrapper.exe executable to capture the output of y-cruncher and write it to a file
# It is using the Microsoft Detours C++ library to do so
# Here you can disable this behaviour and revert back to the original y-cruncher execution
#
# It is strongly recommended to leave this setting enabled, unless you're experiencing problems with it!
#
# Default: 1
enableYCruncherLoggingWrapper = 1
# Aida64 specific settings
[Aida64]
# The test modes for Aida64
# Note: "RAM" consumes basically all of the available memory and makes the computer pretty slow
# You can change the amount of RAM being used / tested with the "maxMempory" setting below
# CACHE: Starts Aida64 with the "Cache" stress test
# CPU: Starts Aida64 with the "CPU" stress test
# FPU: Starts Aida64 with the "FPU" stress test
# RAM: Starts Aida64 with the "Memory" stress test
# You can also combine multiple stress tests like so: CACHE,CPU,FPU
#
# Default: CACHE
mode = CACHE
# Use AVX for Aida64
# This enables or disables the usage of AVX instructions during Aida64's stress tests
#
# Default: 0
useAVX = 0
# The maximum memory allocation for Aida64
# Sets the maximum memory usage during the "RAM" stress test in percent
# Note: Setting this too high can cause your Windows to slow down to a crawl!
#
# Default: 90
maxMemory = 90
# Linpack specific settings
[Linpack]
# Which version of Linpack to use
# There are four different choices available
# 2018: Intel Linpack version 2018.0.3.1 - this is the same version as used in Linpack Xtreme 1.1.5
# 2019: Intel Linpack version 2019.0.3.1
# 2021: Intel Linpack version 2021.4.1.0 - this version always uses FASTEST (AVX2)
# 2024: Intel Linpack version 2024.2.1.0 - this version always uses FASTEST (AVX2)
#
# Version 2018 and 2019 are the only ones where you can set the mode to anything but "FASTEST"
# These two version also run slightly faster (more GFlops) on AMD processors than the newer versions when set to "FASTEST"
# But the newer versions might have additional optimizations that are missing in the older ones
#
# Default: 2018
version = 2018
# The test mode for Linpack
# You can choose between five settings:
# SLOWEST
# SLOW
# MEDIUM
# FAST
# FASTEST
# These settings define how fast one iteration will be completed (how many GFlops you'll see and the time it takes)
# It should also affect which instruction set is being used, e.g. FASTEST should enable AVX2, while FAST should
# use AVX
# I'm not entirely sure what instructions the other settings use exactly, but I did see a difference in the runtime
# and GFlops for these settings
# Here are some examples (not comparable to anything else, since determined with a custom overclock/undervolt setting):
# Ryzen 5900X 1 Thread Intel 14900KF 1 Thread
# GFlops Time Temp GFlops Time Temp
# SLOWEST ~21 ~126s ~67°C ~28 ~96s ~64°C
# SLOW ~25 ~105s ~71°C ~28 ~94s ~65°C
# MEDIUM ~27 ~99s ~71°C ~30 ~89s ~66°C
# FAST ~45 ~59s ~75°C ~51 ~52s ~66°C
# FASTEST ~66 ~40s ~76°C ~78 ~34s ~69°C
#
# As you can see, the setting has a more pronounced effect on AMD CPUs, but Intel CPUs are affected as well, just not
# as much on the slower settings
# This setting makes use of an undocumentented environment variable (MKL_DEBUG_CPU_TYPE) for Intel's MKL library
# (Math Kernel Library), which is interally used by Linpack
#
# Default: MEDIUM
mode = MEDIUM
# Memory allocation for Linpack
# Set the amount of memory to use with Linpack
# Enter the value either as a string like 500MB, 2GB, 4GB, etc
# Or as a raw value in bytes, e.g. 250000000 (which would equal "250MB")
# Note the difference between "MB" (1000 kilobyte = 1000*1000 byte) and "MiB" (1024 kibibyte = 1024*1024 byte)
# Also be aware that the memory size directly influences the time it takes to run one test, here are some examples:
# Setting Sample runtime Sample runtime
# with MEDIUM with FASTEST
# 100MB 1s 0.5s
# 250MB 4s 2s
# 500MB 12s 5s
# 750MB 23s 9s
# 1GB 35s 14s
# 2GB 99s 40s
# 4GB 287s 117s
# 6GB 534s 216s
# 30GB unknown, >1h not tested (I aborted after over an hour)
# Also note that choosing more memory doesn't necessarily help in finding CPU related problems
# It may help identifying RAM or IMC (Internal Memory Controller) related issues
#
# Default: 2GB
memory = 2GB
# Log specific settings
[Logging]
# The name of the log file
# The "mode" parameter, the selected stress test program and test mode, as well as the start date & time will be
# added to the name, with a .log file ending
#
# Default: CoreCycler
name = CoreCycler
# Set the log level
# 0: Do not log or display additional information
# 1: Write additional information to the log file (verbose)
# 2: Write even more information to the log file (debug)
# 3: Also display the verbose messages in the terminal
# 4: Also display the debug messages in the terminal
#
# Default: $logLevel
logLevel = $logLevel
# Make use of the Windows Event Log to log core tests and core errors
# If this is enabled, CoreCycler will add entries to the Windows Event Log when it has been started, ended,
# and also when iterating over the cores
# This can be helpful if you suffer from corrupted log files after a hard reboot during testing
# To be able to use this, a new Windows Event "Source" for CoreCycler needs to be added, the script will ask
# you add this if it's not available yet
# Adding this Source will require Administrator rights (once), but after it has been added, no additional rights
# are required
# The entries can be found in the Windows Logs/Application section of the Event Viewer
#
# Default: 1
useWindowsEventLog = 1
# Periodically flush the disk write cache
# If this is enabled, CoreCycler will periodically try to flush the disk write cache, which could help to prevent
# corrupted log files when a hard reboot during testing occurs
# Note that some drives have an additional internal write cache, which is NOT affected by this setting
# Also note that this will not work for all drives/volumes, e.g. if you run the script from a VeraCrypt volume,
# this setting will have no effect
#
# Default: 0
flushDiskWriteCache = 0
# Settings for updates
[Update]
# Enable the update check
#
# Default: $([Int] $enableUpdateCheck)
enableUpdateCheck = $([Int] $enableUpdateCheck)
# The frequency of the check, in hours
#
# Default: $updateCheckFrequency
updateCheckFrequency = $updateCheckFrequency
# Custom settings for Prime95
[Custom]
# This needs to be set to 1 for AVX mode
# (and also if you want to set AVX2 below)
CpuSupportsAVX = 0
# This needs to be set to 1 for AVX2 mode
CpuSupportsAVX2 = 0
# This also needs to be set to 1 for AVX2 mode on Ryzen
CpuSupportsFMA3 = 0
# This needs to be set to 1 for AVX512 mode
CpuSupportsAVX512 = 0
# The minimum FFT size to test
# Value for "Smallest FFT": 4
# Value for "Small FFT": 36
# Value for "Large FFT": 426
MinTortureFFT = 4
# The maximum FFT size to test
# Value for "Smallest FFT": 21
# Value for "Small FFT": 248
# Value for "Large FFT": 8192
MaxTortureFFT = 8192
# The amount of memory to use in MB
# 0 = In-Place
TortureMem = 0
# The max amount of minutes for each FFT size during the stress test
# Note: It may be much less than one minute, basically it seems to be "one run or one minute, whichever is less"
TortureTime = 1
# Debug settings that shouldn't need to be changed
# Only change them if you know what you're doing and there's a problem you're trying to identify
[Debug]
# Debug setting to disable the periodic CPU utilization check
#
# This setting enables or disables the CPU utilization check during stress testing.
# Some stress test programs (like Aida64) do not generate a log file, so the only way to detect an error is by
# checking the current CPU utilization.
#
# This uses a pretty basic check to see if the stress is still running at all, for a more detailled check
# enable the "useWindowsPerformanceCountersForCpuUtilization" below.
# Be aware that enabling the Windows Performance Counters may introduce other issues though, see the
# corresponding setting for an explanation.
#
# Default: $disableCpuUtilizationCheckDefault
disableCpuUtilizationCheck = $disableCpuUtilizationCheckDefault
# Debug setting to enable the use of Windows Performance Counters for the CPU utilization check
#
# This setting controls if the Windows Performance Counters should be used, which can be corrupted for unknown
# reasons. Please see the readme.txt and the /tools/enable_performance_counter.bat file for a possible way
# to fix these issues. There's no guarantee that it works though.
#
# Default: $useWindowsPerformanceCountersForCpuUtilizationDefault
useWindowsPerformanceCountersForCpuUtilization = $useWindowsPerformanceCountersForCpuUtilizationDefault
# Debug setting to enable querying for the CPU frequency
#
# This setting enables checking the CPU frequency
# Currently it doesn't really serve any purpose. The retrieved CPU frequency is not accurate enough (e.g. compared to HWiNFO),
# and its output is limited to the "verbose" channel.
# According to some reports, enabling it can result in incorrect CPU utilization readings, so be aware of this when you enable
# this setting.
#
# Note that this also enables the usage of the Windows Performance Counters, which may not work on certain systems.
# They can become corrupted, please see the readme.txt and the /tools/enable_performance_counter.bat file for a possible way
# to fix these issues. There's no guarantee that it works though.
#
# Default: $enableCpuFrequencyCheckDefault
enableCpuFrequencyCheck = $enableCpuFrequencyCheckDefault
# Debug setting to control the interval in seconds for the CPU utilization check and the "suspendPeriodically" functionality
#
# Don't set this too low, it will spam the log file and can produce unnecessary CPU load.
# It would also increase the time when the stress test program is suspended
# I'd consider 10 to be the minimum reasonable value (which is also the default)
#
# If 0, will disable this functionality
# This basically would mean "disableCpuUtilizationCheck = 1" and "suspendPeriodically = 0"
# Not entirely though, as the last check before changing a core is not affected
#
# Default: $tickIntervalDefault
tickInterval = $tickIntervalDefault
# Debug setting to delay the first error check for each core
#
# With this setting you can define a wait time before the first error check happens for each core
# Some systems may need longer to initialize the stress test program, which can result in an incorrect CPU utilization detection,
# so setting this value might resolve this issue
# Don't set this value too high in relation to your "runTimePerCore" though
#
# Default: $delayFirstErrorCheckDefault
delayFirstErrorCheck = $delayFirstErrorCheckDefault
# Debug setting to set the priority of the stress test program
#
# The default priority is set to "High" so that other applications don't interfere with the testing
# It can cause the computer to behave sluggish though. Setting a lower priority can fix this
#
# Note: "RealTime" probably won't work and you shouldn't set this anway, as the computer won't be responsive anymore
#
# Possible values:
# Idle
# BelowNormal
# Normal
# AboveNormal
# High
# RealTime
#
# Default: $stressTestProgramPriorityDefault
stressTestProgramPriority = $stressTestProgramPriorityDefault
# Debug setting to display the stress test program window in the foreground
#
# If enabled, will display the window of the stress test program in the foreground, stealing focus
# If disabled (default), the window will either be minimized to the tray (Prime95) or be moveed to the background,
# without stealing focus of the currently opened window (y-cruncher)
#
# Default: $stressTestProgramWindowToForegroundDefault
stressTestProgramWindowToForeground = $stressTestProgramWindowToForegroundDefault
# Debug setting to control the amount of milliseconds the stress test program is being suspended
#
# Default: $suspensionTimeDefault
suspensionTime = $suspensionTimeDefault
# Debug setting to define the method that is used to suspend the stress test process
#
# Can either be set to "Debugger" or "Threads"
# "Debugger" uses the "DebugActiveProcess" and "DebugActiveProcessStop" kernel32.dll methods on the main process
# "Threads" uses the "SuspendThread" and "ResumeThread" kernel32.dll methods on the process threads
# There's no clear benefit to either of these settings, but if there's a problem with one of these settings,
# the other one may work better
#
# Default: $modeToUseForSuspensionDefault
modeToUseForSuspension = $modeToUseForSuspensionDefault
"@
# Stress test program executables and paths
# The window behaviours:
# 0 = Hide
# 1 = NormalFocus
# 2 = MinimizedFocus
# 3 = MaximizedFocus
# 4 = NormalNoFocus
# 6 = MinimizedNoFocus
$stressTestPrograms = @{
'prime95' = @{
'displayName' = 'Prime95'
'processName' = 'prime95'
'processNameExt' = 'exe'
'processNameForLoad' = 'prime95'
'processPath' = 'test_programs\p95'
'installPath' = 'test_programs\p95'
'requiresCpuCheck' = $false
'configName' = $null
'configFilePath' = $null
'absolutePath' = $null
'absoluteInstallPath' = $null
'fullPathToExe' = $null
'command' = '"%fullPathToExe%" -t'
'windowBehaviour' = 0
'testModes' = @(
'SSE'
'AVX'
'AVX2'
'AVX512'
'CUSTOM'
)
'windowNames' = @(
'^Prime95 \- Torture Test$'
'^Prime95 \- Self\-Test$'
'^Prime95 \- Not running$'
'^Prime95 \- Waiting for work$'
'^Prime95$'
)
}
'prime95_dev' = @{
'displayName' = 'Prime95 DEV'
'processName' = 'prime95_dev'
'processNameExt' = 'exe'
'processNameForLoad' = 'prime95_dev'
'processPath' = 'test_programs\p95_dev'
'installPath' = 'test_programs\p95_dev'
'requiresCpuCheck' = $false
'configName' = $null
'configFilePath' = $null
'absolutePath' = $null
'absoluteInstallPath' = $null
'fullPathToExe' = $null
'command' = '"%fullPathToExe%" -t'
'windowBehaviour' = 0
'testModes' = @(
'SSE'
'AVX'
'AVX2'
'AVX512'
'CUSTOM'
)
'windowNames' = @(
'^Prime95 \- Torture Test$'
'^Prime95 \- Self\-Test$'
'^Prime95 \- Not running$'
'^Prime95 \- Waiting for work$'
'^Prime95$'
)
}
'aida64' = @{
'displayName' = 'Aida64'
'processName' = 'aida64'
'processNameExt' = 'exe'
'processNameForLoad' = 'aida_bench64.dll' # This needs to be with file extension
'processPath' = 'test_programs\aida64'
'installPath' = 'test_programs\aida64'
'requiresCpuCheck' = $true # No log file, need to check the current CPU usage
'configName' = $null
'configFilePath' = $null
'absolutePath' = $null
'absoluteInstallPath' = $null
'fullPathToExe' = $null
'command' = '"%fullPathToExe%" /SAFEST /SILENT /SST %mode%'
'windowBehaviour' = 6
'testModes' = @(
'CACHE'
'CPU'
'FPU'
'RAM'
)
'windowNames' = @(
'^System Stability Test \- AIDA64*'
)
}
'ycruncher' = @{
'displayName' = 'y-cruncher'
'processName' = '' # Depends on the selected modeYCruncher
'processNameExt' = 'exe'
'processNameForLoad' = '' # Depends on the selected modeYCruncher
'processPath' = 'test_programs\y-cruncher\Binaries'
'installPath' = 'test_programs\y-cruncher'