mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Software

Reply
 
Thread Tools
Old 2014-08-19, 04:08   #1
Explorer09
 
May 2014

3×11 Posts
Default Prime95 minor bug, "TortureThreads" not checked for maximum threads

It is better test this with the 32-bit command-line version (mprime).
It's about the undocumented "TortureThreads" INI parameter.
1. Write "TortureThreads=33" in prime.txt (In 32-bit mprime, MAX_NUM_WORKER_THREADS=32)
2. Run "./mprime -t"
3. Press Ctrl+C to terminate the torture test. Then see it segmentation-faults.

Patch proposed below.
Code:
diff -r -u a/linux/prime.c b/linux/prime.c
--- a/linux/prime.c	2014-05-16 09:45:24.000000000 +0800
+++ b/linux/prime.c	2014-08-19 10:57:04.761676405 +0800
@@ -280,5 +280,8 @@
 		NO_GUI = FALSE;
 		num_threads = IniGetInt (INI_FILE, "TortureThreads",
 					 NUM_CPUS * CPU_HYPERTHREADS);
+		if (num_threads < 1) num_threads = 1;
+		if (num_threads > MAX_NUM_WORKER_THREADS)
+			num_threads = MAX_NUM_WORKER_THREADS;
 		LaunchTortureTest (num_threads, TRUE);
 	}
Explorer09 is offline   Reply With Quote
Old 2014-08-19, 04:13   #2
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

2×4,127 Posts
Default

Fixed as suggested in next release. Thanks.
Prime95 is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Master" and "helper" threads Madpoo Software 0 2016-09-08 01:27
Maximum number of threads for Prime95 treesong Information & Answers 11 2012-06-18 13:35
What exactly does the "Drop checked CPUs" button do? Dubslow Information & Answers 15 2011-11-29 13:19
"no threads newer" counter cheesehead Forum Feedback 0 2008-09-17 05:14
Only 10 threads per page for "New Posts"? Mystwalker Forum Feedback 6 2007-03-04 14:45

All times are UTC. The time now is 05:12.


Thu Jun 1 05:12:42 UTC 2023 up 287 days, 2:41, 0 users, load averages: 1.26, 1.14, 1.04

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.

≠ ± ∓ ÷ × · − √ ‰ ⊗ ⊕ ⊖ ⊘ ⊙ ≤ ≥ ≦ ≧ ≨ ≩ ≺ ≻ ≼ ≽ ⊏ ⊐ ⊑ ⊒ ² ³ °
∠ ∟ ° ≅ ~ ‖ ⟂ ⫛
≡ ≜ ≈ ∝ ∞ ≪ ≫ ⌊⌋ ⌈⌉ ∘ ∏ ∐ ∑ ∧ ∨ ∩ ∪ ⨀ ⊕ ⊗ 𝖕 𝖖 𝖗 ⊲ ⊳
∅ ∖ ∁ ↦ ↣ ∩ ∪ ⊆ ⊂ ⊄ ⊊ ⊇ ⊃ ⊅ ⊋ ⊖ ∈ ∉ ∋ ∌ ℕ ℤ ℚ ℝ ℂ ℵ ℶ ℷ ℸ 𝓟
¬ ∨ ∧ ⊕ → ← ⇒ ⇐ ⇔ ∀ ∃ ∄ ∴ ∵ ⊤ ⊥ ⊢ ⊨ ⫤ ⊣ … ⋯ ⋮ ⋰ ⋱
∫ ∬ ∭ ∮ ∯ ∰ ∇ ∆ δ ∂ ℱ ℒ ℓ
𝛢𝛼 𝛣𝛽 𝛤𝛾 𝛥𝛿 𝛦𝜀𝜖 𝛧𝜁 𝛨𝜂 𝛩𝜃𝜗 𝛪𝜄 𝛫𝜅 𝛬𝜆 𝛭𝜇 𝛮𝜈 𝛯𝜉 𝛰𝜊 𝛱𝜋 𝛲𝜌 𝛴𝜎𝜍 𝛵𝜏 𝛶𝜐 𝛷𝜙𝜑 𝛸𝜒 𝛹𝜓 𝛺𝜔