mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Software (https://www.mersenneforum.org/forumdisplay.php?f=10)
-   -   Prime95: INI_FILE settings limited to 80 characters (https://www.mersenneforum.org/showthread.php?t=26586)

sp00n 2021-03-10 18:53

Prime95: INI_FILE settings limited to 80 characters
 
This is taken from the source file for version 30.3b6.
In the common.c file the various INI settings are defined as e.g.
[code]
IniGetString (INI_FILE, "local.ini", LOCALINI_FILE, 80, LOCALINI_FILE);
IniGetString (INI_FILE, "worktodo.ini", WORKTODO_FILE, 80, WORKTODO_FILE);
IniGetString (INI_FILE, "results.txt", RESFILE, 80, RESFILE);
[/code]which limits the value to 80 characters.

I was trying to write the log file to a different directory than where the binary file and the prime.txt/local.txt are, and if you're using a longer file name (e.g. by adding the date and time) or a longer directory name, these 80 characters can be exceeded, which in turn cuts off the name of the file that is generated in the provided directory.

Example:
Directory of the prime95.exe: D:\Benchmarking\Prime95\30.3b6\binaries\
Directory of results.txt file: D:\Benchmarking\Prime95\30.3b6\logs\
Name of results.txt: Prime95_results_2020-12-31_23_59_59_FFT_248-8192.txt

Expected file name:
[C]D:\Benchmarking\Prime95\30.3b6\logs\Prime95_results_2020-12-31_23_59_59_FFT_248-8192.txt[/C]

Actual file name (cut off after 80 characters):
[C]D:\Benchmarking\Prime95\30.3b6\logs\Prime95_results_2020-12-31_23_59_59_FFT_248[/C]


Is there any particular reason why there's a limit to 80 characters and not to ~260 characters like [URL="https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation"]Windows supports[/URL]?

I seem to have been able to work around this by setting the [c]WorkingDir=[/c] directive to one level above the directory where the .exe is located then setting [c]prime.ini=[/c], [c]local.ini=[/c] and [c]results.txt=[/c] as a [I]relative[/I] path from that directory.
It appears to be working, but it seems unnecessarily complicated.

These are the resulting entries in the prime.txt, of course, they're only examples.
(I also find it a bit weird that you can set the file name for the prime.ini/txt in that exact prime.txt.)
[code]

WorkingDir=D:\Benchmarking\Prime95\30.3b6
prime.ini=binaries\prime.txt
local.ini=binaries\local.txt
results.txt=logs\Prime95_results_2020-12-31_23_59_59_FFT_248-8192.txt[/code]So I'd suggest to change the 80 character limit to something higher in a future release so that these kind of workarounds aren't required anymore.

(Also, for more than just stress testing, you'd probably have to modify the other settings as documented in undoc.txt to the relative path as well.)

ixfd64 2021-03-10 21:55

The 80-character limit is a relic of a bygone era when most computer screens could not display more than 80 columns. I agree it's no longer relevant in this day and age.

Prime95 2021-03-10 22:58

Prime95 is a relic, There are 8.3 limits in some of the code. I'll boost the limits you mentioned in 30.5.

kriesel 2021-03-11 01:46

[QUOTE=Prime95;573379]Prime95 is a relic, There are 8.3 limits in some of the code. I'll boost the limits you mentioned in 30.5.[/QUOTE]It would be great if the obfuscated-exponent filename consequences of that residual 8.3-ness went away.
Quick, what exponent does file pA852841.residues relate to? pA851779.proof?

LaurV 2021-03-11 15:25

[QUOTE=kriesel;573390]Quick, what exponent does file pA852841.residues relate to? pA851779.proof?[/QUOTE]
:davar55: Plus one for that! Well spotted! May George be healthy and have free time in the future, so he fix all those relics...

kriesel 2021-03-11 16:08

Also p8U82187 and related .bu* (dated today and yesterday, produced by prime95 v30.4b9 LL DC of M[M]55882187[/M])
There are p(clear 9 digit exponent) files produced in the same folder during the same time frame, from other work types from other workers on that instance.

pA853833.* from PRP-CF of M10853833

(and more examples like the above)

chalsall 2021-03-11 16:30

[QUOTE=LaurV;573411]:davar55: Plus one for that! Well spotted! May George be healthy and have free time in the future, so he fix all those relics...[/QUOTE]

+1!

Thanks, George! :tu:

sp00n 2021-03-11 16:53

[QUOTE=Prime95;573379]Prime95 is a relic, There are 8.3 limits in some of the code. I'll boost the limits you mentioned in 30.5.[/QUOTE]
Great, thanks.

LaurV 2021-03-12 04:45

[QUOTE=kriesel;573415]Also p8U82187 of M[M]55882187[/M]
pA853833.* from PRP-CF of M10853833
(and more examples like the above)[/QUOTE]
To be fair, we know (and always knew) how to decode those, there is some explanation in those .txt files sent with P95, which no one reads them ever. But it would be indeed wonderful if George fix the checkpoint names and temp file names, to something more clear and palatable, considering the new invention called "long file names". :razz:
We wouldn't mind zero-filled names to 9 positions, so we can sort them properly in the folder when there are different numbers of digits (edit: like for example M098765432_blah_blah.bkp, to be sorted before M123456789_blah_blah.bkp, and not M98765432_blah_blah.bkp).

kriesel 2021-03-12 17:25

The readme.txt file list section seems to indicate they'll have alpha first char, numeric ASCII for exponent. But the 7 N's don't fit even current DC exponents.

[CODE]cNNNNNNN,cNNNNNNN.buN Intermediate files produced during certification runs.
pNNNNNNN,pNNNNNNN.buN Intermediate files produced by prime95.exe to resume computation where it left off.
pNNNNNNN.residues Large intermediate file produced during PRP test for constructing a PRP proof.
pNNNNNNN.proof PRP proof file.
eNNNNNNN,eNNNNNNN.buN Intermediate files produced during ECM factoring.
fNNNNNNN,fNNNNNNN.buN Intermediate files produced during trial factoring.
mNNNNNNN,mNNNNNNN.buN Intermediate files produced during P-1 factoring.
[/CODE]I didn't see an explanation for the leading or embedded alpha characters.
Nothing relevant to that found searching readme, whatsnew, or undoc, for "file" or "8.3".
Where's it to be found?

Prime95 2021-03-12 20:45

[QUOTE=kriesel;573513]Where's it to be found?[/QUOTE]

The usual answer: dig into C code. :smile:


All times are UTC. The time now is 02:38.

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