![]() |
![]() |
#1 |
May 2014
3·11 Posts |
![]()
This is a personal complaint rather than a bug. On my Linux system with an 80 character wide terminal:
Code:
[Main thread Dec 30 08:36] Starting workers. [Worker #1 Dec 30 08:36] Worker starting [Worker #1 Dec 30 08:36] Setting affinity to run worker on logical CPU #1 [Worker #2 Dec 30 08:36] Worker starting [Worker #2 Dec 30 08:36] Setting affinity to run worker on logical CPU #2 [Worker #1 Dec 30 08:36] Beginning a continuous self-test to check your computer . [Worker #1 Dec 30 08:36] Please read stress.txt. Hit ^C to end this test. [Worker #2 Dec 30 08:36] Beginning a continuous self-test to check your computer . [Worker #2 Dec 30 08:36] Please read stress.txt. Hit ^C to end this test. [Worker #1 Dec 30 08:36] Test 1, 7800 Lucas-Lehmer iterations of M9961473 using Pentium4 type-2 FFT length 512K, Pass1=256, Pass2=2K. [Worker #2 Dec 30 08:36] Test 1, 7800 Lucas-Lehmer iterations of M9961473 using Pentium4 type-2 FFT length 512K, Pass1=256, Pass2=2K. This wasn't a problem before mprime supports multithreading. After multithreading support, some messages that originally fit a line get wrapped strangely like this. This is my way to solve it. Change the wording of some of the messages so that they fit one line. (It was a quick hack, and I think mprime developers can rewrite messages better than me.) Code:
diff -r -u a/commonb.c b/commonb.c --- a/commonb.c 2014-05-28 23:39:04.000000000 +0800 +++ b/commonb.c 2015-01-02 21:02:54.125341836 +0800 @@ -26,7 +26,7 @@ char ERRMSG1D[] = "ERROR: Shift counter corrupt.\n"; char ERRMSG1E[] = "ERROR: Illegal double encountered.\n"; char ERRMSG1F[] = "ERROR: FFT data has been zeroed!\n"; -char ERRMSG2[] = "Possible hardware failure, consult the readme.txt file.\n"; +char ERRMSG2[] = "Possible hardware failure, consult readme.txt file.\n"; char ERRMSG3[] = "Continuing from last save file.\n"; char ERRMSG4[] = "Waiting five minutes before restarting.\n"; char ERRMSG5[] = "For added safety, redoing iteration using a slower, more reliable method.\n"; @@ -550,7 +550,7 @@ if (diff == 99999) { AFFINITY_SCRAMBLE_STATE = 0; } else { - OutputStr (MAIN_THREAD_NUM, "Enough information obtained to make a reasonable guess.\n"); + OutputStr (MAIN_THREAD_NUM, "Have enough information to make a reasonable guess.\n"); } } if (AFFINITY_SCRAMBLE_STATE == 0 && scramble[0] == '*') { @@ -578,7 +578,7 @@ no_auto_detect: if (scramble[0] != '*') { - OutputStr (MAIN_THREAD_NUM, "Using AffinityScramble2 settings to set affinity mask.\n"); + OutputStr (MAIN_THREAD_NUM, "Using AffinityScramble2 setting to set affinity mask.\n"); AFFINITY_SCRAMBLE_STATE = 2; for (i = 0; i < MAX_NUM_WORKER_THREADS && i < strlen (scramble); i++) { if (scramble[i] >= '0' && scramble[i] <= '9') @@ -1063,7 +1063,7 @@ int thread_num) { if (WORKER_THREADS_ACTIVE && ! STOP_FOR_PRIORITY_WORK[thread_num]) { - OutputStr (thread_num, "Restarting worker to do factoring prior to an LL test.\n"); + OutputStr (thread_num, "Restarting worker to do factoring prior to LL test.\n"); STOP_FOR_PRIORITY_WORK[thread_num] = 1; } } @@ -5870,15 +5870,14 @@ /* Torture test code */ /*********************/ -#define TORTURE1 "Beginning a continuous self-test to check your computer.\n" +#define TORTURE1 "Beginning a continuous self-test on your computer.\n" #if defined (__linux__) || defined (__FreeBSD__) || defined (__EMX__) #define TORTURE2 "Please read stress.txt. Hit ^C to end this test.\n" #else #define TORTURE2 "Please read stress.txt. Choose Test/Stop to end this test.\n" #endif -#define SELFMSG1A "The program will now perform a self-test to make sure the\n" -#define SELFMSG1B "Lucas-Lehmer code is working properly on your computer.\n" -#define SELFMSG1C "This will take about an hour.\n" +#define SELFMSG1A "The program will now perform a self-test to make sure the Lucas-Lehmer code is working properly on your computer.\n" +#define SELFMSG1B "This will take about an hour.\n" #define SELF1 "Test %i, %i Lucas-Lehmer iterations of M%ld using %s.\n" #define SELFFAIL "FATAL ERROR: Final result was %08lX, expected: %08lX.\n" char SELFFAIL1[] = "ERROR: ILLEGAL SUMOUT\n"; @@ -6835,7 +6834,6 @@ OutputStr (thread_num, SELFMSG1A); OutputStr (thread_num, SELFMSG1B); - OutputStr (thread_num, SELFMSG1C); /* Do the self test */ |
![]() |
![]() |
![]() |
#2 | |
"/X\(‘-‘)/X\"
Jan 2013
3,089 Posts |
![]() Quote:
|
|
![]() |
![]() |
![]() |
#3 |
May 2014
1000012 Posts |
![]()
You mean something like this?
Attachment: prime95-string-const-macro.patch.7z (Don't try to apply this one directly. Review it and apply it by hand instead. Because I'm making this diff on my own tree which have other changes not in original Prime95 source.) 1. I changed those string constants to macros because (1) they won't be compiled in if the message is never referenced, and (2) better leave out this JUNK because there's one copyright string already in menu.c: Code:
/* In commonc.c */ char JUNK[]="Copyright 1996-2014 Mersenne Research, Inc. All rights reserved" There are other changes in this patch: 2. SELF_TEST_DATA arrays (used in torture testing) are now all "const struct self_test_info". These arrays are never supposed to be edited anyway. (Compilers will now put these in ".rodata" section rather than ".data") 3. OutputSomewhere, OutputBoth, OutputStr, OutputStrNoTimeStamp, writeResults, LogMsg, RealOutputStr functions now all take "const char *" string argument. Last fiddled with by Explorer09 on 2015-01-03 at 16:41 |
![]() |
![]() |
![]() |
#4 |
May 2014
3×11 Posts |
![]()
Patch v2. Fixes primenet.c also.
|
![]() |
![]() |
![]() |
#5 |
P90 years forever!
Aug 2002
Yeehaw, FL
11111110111102 Posts |
![]()
I've made a note to myself to look at these things for the next prime95 release. Alas, no prime95 development is currently underway.
|
![]() |
![]() |
![]() |
#6 |
P90 years forever!
Aug 2002
Yeehaw, FL
177368 Posts |
![]() |
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
(Patch) Handling of SIGHUP and SIGPIPE (for mprime) | Explorer09 | Software | 2 | 2017-03-08 05:37 |
[Patch] CPU affinity prompt problem in mprime Linux / OS X build | Explorer09 | Software | 1 | 2017-03-01 02:34 |
Problem with mprime (Fixed with mprime -d) | antiroach | Software | 2 | 2004-07-19 04:07 |
mprime finished factoring almost immediately, possible HW problem? | optim | Software | 4 | 2004-06-21 22:19 |
Linux mprime client v22.8 problem | Prime Monster | Software | 6 | 2002-08-29 11:14 |