mersenneforum.org  

Go Back   mersenneforum.org > Search Forums

Showing results 1 to 25 of 33
Search took 0.01 seconds.
Search: Posts Made By: Explorer09
Forum: Software 2017-03-22, 18:20
Replies: 5
Views: 1,099
Posted By Explorer09
What minimum hwloc features are needed for mprime?

May I ask a question here? Since libhwloc is intended to link statically in mprime, and that hwloc has many optional components that may be enabled or disabled at configure time...

What are the...
Forum: Software 2017-03-21, 11:48
Replies: 95
Views: 47,260
Posted By Explorer09
@Prime95 I'm not sure how you fixed that bug....

@Prime95
I'm not sure how you fixed that bug. But if it's me, I would propose a wait routine at the end of main() in order to prevent the main() thread from exiting too early.

Correct me if my...
Forum: Software 2017-03-19, 14:35
Replies: 95
Views: 47,260
Posted By Explorer09
@Prime95 Would you allow me to correct a...

@Prime95

Would you allow me to correct a small misalignment, here?

diff -r -u p95v291.source/linux64/menu.c p95v291.source-b/linux64/menu.c
--- p95v291.source/linux64/menu.c 2017-03-08...
Forum: Software 2017-03-09, 08:17
Replies: 2
Views: 691
Posted By Explorer09
Patch Revised! v2 Changes: 2b. Simplify the...

Patch Revised! v2 Changes:

2b. Simplify the syntax of volatile casting.

2c. Make accesses of WORKER_THREADS_STOPPING in two more functions volatile.
Forum: Software 2017-03-09, 04:14
Replies: 2
Views: 838
Posted By Explorer09
Thank you. Regarding the computer name, I'm...

Thank you.

Regarding the computer name, I'm not sure how much effect it can have by setting it to blank, and I think having a Yes/No question before prompting the computer name would be overkill,...
Forum: Software 2017-03-01, 16:22
Replies: 2
Views: 838
Posted By Explorer09
[Patch] "Test/Primenet" prompts improvements on console version

The askStr() function in Linux / OS X console builds work differently
than a GUI textbox. Specifically it doesn't yet allow inputting empty
strings (really!). If you press Enter without typing...
Forum: Software 2017-03-01, 16:18
Replies: 1
Views: 289
Posted By Explorer09
[Patch] Fix strcpy misuse in getProxyInfo()

strcpy() is Undefined Behavior on overlapping strings.
It should be safe_strcpy() (which is a macro that expands to memmove()).

diff -r -u -p a/primenet.c b/primenet.c
---...
Forum: Software 2017-03-01, 09:55
Replies: 3
Views: 405
Posted By Explorer09
I have already got used to the C convention that...

I have already got used to the C convention that for some_proc_modifying_C_string (pointer_to_char) the string argument does not need an "&" operator.

It might be just me, but if I'm going to...
Forum: Software 2017-02-25, 08:39
Replies: 7
Views: 1,227
Posted By Explorer09
You are going to expect some error when you try...

You are going to expect some error when you try to stress test your computer.
Oh, did you read the stress.txt?
Especially its FAQs.
https://www.mersenne.org/download/stress.txt
Forum: Software 2017-02-24, 07:58
Replies: 2
Views: 691
Posted By Explorer09
Excuse for the large patch. Because I discovered...

Excuse for the large patch. Because I discovered subsequent problems
when I try to fix the data race, and so I try addressed them all.

The patch fixes these things:

1. Make all writes on...
Forum: Software 2017-02-24, 07:56
Replies: 2
Views: 691
Posted By Explorer09
Prime95 potential race on WORKER_THREADS_ACTIVE and WORKER_THREADS_STOPPING

Upon trying to hack the mprime source code. I discovered a potential data race
condition on the thread-shared global flags WORKER_THREADS_ACTIVE and
WORKER_THREADS_STOPPING.

In particular, its...
Forum: Software 2017-02-24, 07:52
Replies: 8
Views: 517
Posted By Explorer09
Well honestly, the reason I hack the code is to...

Well honestly, the reason I hack the code is to modify mprime for a "totally offline" build for inclusion in the Ultimate Boot CD (http://www.ultimatebootcd.com/). And unfortunately when I study the...
Forum: Software 2017-02-23, 03:42
Replies: 1
Views: 756
Posted By Explorer09
[Patch] CPU affinity prompt problem in mprime Linux / OS X build

[Patch] CPU affinity prompt problem in mprime Linux / OS X build

Steps to reproduce: suppose you have 2 CPU threads...

$ mv local.txt local.bak.txt
$ echo 'Affinity=98' >local.txt
...
Forum: Software 2017-02-22, 15:49
Replies: 3
Views: 405
Posted By Explorer09
[Patch] Fix meaningless (char (*)[13]) to (char *) cast

Not a bug, but to fix a code readability problem.

A pointer to array is rarely useful in C. Here, passing m_start_time instead of &m_start_time as function arguments is what the code intended.
...
Forum: Software 2017-02-22, 15:14
Replies: 8
Views: 517
Posted By Explorer09
[Patch v2] Fix rangeStatusMessage() Y2038 check code

Sorry. Patch revised again. This time I found out that original formula didn't cause overflow that I expected (it was compared as "double" type), but anyway it's better to make the (double) cast...
Forum: Software 2017-02-22, 11:17
Replies: 8
Views: 517
Posted By Explorer09
Oops. I mis-typed the <= comparison to <. ...

Oops. I mis-typed the <= comparison to <.

It should be
this_time <= 2147483647L - (long) est
instead. This will allow the compiler to optimize it into an OF (overflow flag) check.
Forum: Software 2017-02-22, 08:47
Replies: 8
Views: 517
Posted By Explorer09
[Patch] Fix rangeStatusMessage() Y2038 check code

In mprime / prime95 "commona.c"

Signed integer overflow is undefined behavior.

Also, don't bother to check Y2038 if the system's time_t is 64-bits.

diff -r -u a/commona.c b/commona.c
---...
Forum: Software 2017-01-21, 16:48
Replies: 1
Views: 431
Posted By Explorer09
mprime 28.10 compiler warning

Compiling mprime 28.10 source on Linux gives me this warning:

gcc -I.. -I../gwnum -O2 -malign-double -c menu.c
menu.c: In function ‘get_line’:
menu.c:28:38: warning: implicit declaration of...
Forum: Software 2016-10-21, 01:14
Replies: 2
Views: 1,114
Posted By Explorer09
Regarding SIGINT handling (3rd issue)

Sorry for double-posting. But I seems to have forgotten one more issue:

3. Regarding SIGINT handling. SIGINT may be ignored by default when an mprime instance is run asynchronously through the...
Forum: Software 2016-10-20, 11:19
Replies: 2
Views: 1,114
Posted By Explorer09
(Patch) Handling of SIGHUP and SIGPIPE (for mprime)

Two issues here:
1. Linux does not have SO_NOSIGPIPE defined, but has MSG_NOSIGNAL flag to send(2) that does similar thing. It's good to use it. (in primenet.c)

While we have MSG_NOSIGNAL, it...
Forum: Software 2016-10-18, 05:07
Replies: 21
Views: 1,211
Posted By Explorer09
Sorry to bump this. But I'm just to correct one...

Sorry to bump this. But I'm just to correct one thing on someone's post here:



SIGPIPE is not sent to mprime during the "cat file | mprime -m" case he stated. Rather, it's "mprime -m | cat"...
Forum: Software 2015-09-23, 01:02
Replies: 0
Views: 487
Posted By Explorer09
(patch) IniWriteFloat should limit its field width

IniWriteFloat should limit its field width, otherwise it is easy to create a buffer overflow with a large floating point number. The syntax like sprintf(buf, "%f", num) is unsafe.

Ideally snprintf...
Forum: Software 2015-09-22, 23:55
Replies: 12
Views: 1,145
Posted By Explorer09
Speaking of SVN, you should probably ignore...

Speaking of SVN, you should probably ignore ".DS_Store" files from versioning, or at least not include them in your source zip package.

Or is there any reason to keep them?
Forum: Software 2015-09-22, 14:49
Replies: 12
Views: 1,145
Posted By Explorer09
(patch) No need for fmt_mask[] buffer

This patch is for Prime95 v28.7

The printf and sprintf functions in C library support '*' as precision. Therefore there is no need for the 'masked' format string like "%%.%df%%%%" and a buffer to...
Forum: Software 2015-05-04, 08:30
Replies: 2
Views: 457
Posted By Explorer09
Bump. Just to show 2 little improvements on the...

Bump. Just to show 2 little improvements on the code.
1. Use 'const chat *' type in the 'buf' argument in outputLongLine, because it is often called with immutable strings.
2. In get_line function,...
Showing results 1 to 25 of 33

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

Fri Aug 14 05:55:52 UTC 2020 up 1 day, 2:31, 1 user, load averages: 1.22, 1.44, 1.57

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, 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.