Skip to content

Commit b7c5495

Browse files
committed
release v1.1
- output refined - add dProofs31.txt & dProofs{33,35}-unfiltered33+.txt info - readme: multi-node computing - exemplary log files - avoid warnings / standard compliance
1 parent 1900e26 commit b7c5495

File tree

10 files changed

+478
-15
lines changed

10 files changed

+478
-15
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ data/*
2727
!data/pmproofs-old.txt
2828
!data/dProofs-with*/
2929
!data/dProofs-with*/dProofs*.7z
30+
log/*
31+
!log/*.log
3032
Debug*/
3133
Release*/
3234

README.html

Lines changed: 42 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
Update instructions:
44
1. Manually replace <body>[...]</body> with that of the updated version
55
2. RegEx replace-all: [FIND]class\=\"markdown-content\"[/FIND], [REPLACE]id\=\"readme\"[/REPLACE] (1 occurence)
6-
3. RegEx replace-all: [FIND] class\=\" *\b(?!\bmarkdown-container ltr\b)[^\"]*\b *\"[/FIND], [REPLACE][/REPLACE] (249 occurences)
6+
3. RegEx replace-all: [FIND] class\=\" *\b(?!\bmarkdown-container ltr\b)[^\"]*\b *\"[/FIND], [REPLACE][/REPLACE] (289 occurences)
77
4. RegEx replace-all: [FIND]<p><img src\=\"icon\/icon-readme\.png\" align\=\"left\"><\/p>[/FIND], [REPLACE]<img src\=\"icon\/icon-readme\.png\" align\=\"left\">[/REPLACE] (1 occurence)
88
5. RegEx replace-all: [FIND]id\=\"-xamidi-pmgenerator\"[/FIND], [REPLACE]id\=\"xamidi-pmgenerator\"[/REPLACE] (1 occurence)
9-
6. RegEx replace-all: [FIND]<(/|)span>[/FIND], [REPLACE][/REPLACE] (494 occurences)
9+
6. RegEx replace-all: [FIND]<(/|)span>[/FIND], [REPLACE][/REPLACE] (570 occurences)
1010
(NOTE: Use RegEx replacements to not invalidate these instructions. Further content may require more bugfixes as by steps 4, 5 and 6.)
1111
-->
1212
<html>
@@ -214,7 +214,7 @@
214214
</head>
215215
<body><div class="markdown-container ltr"><div id="readme"><img src="icon/icon-readme.png" align="left">
216216
<h1 id="xamidi-pmgenerator">@xamidi/pmGenerator</h1>
217-
<p>Code extracted from <a href="https://github.com/deontic-logic/proof-tool" title="GitHub repository">deontic-logic/proof-tool</a> (still private; <a href="https://deontic-logic.github.io/readme.html">readme</a>). Can be used to generate improved versions of <a href="https://us.metamath.org/mmsolitaire/pmproofs.txt" title="us.metamath.org/mmsolitaire/pmproofs.txt">pmproofs.txt</a> of the <a href="https://us.metamath.org/mmsolitaire/mms.html" title="us.metamath.org/mmsolitaire/mms.html">mmsolitaire</a> project.<br>Exemplary generated results are available at <a href="https://github.com/xamidi/mmsolitaire" title="GitHub repository">xamidi/mmsolitaire</a>.<br>Eligible for high-performance computing. If you have access to a powerful computer, please consider to use this tool to further contribute to our knowledge regarding minimal proofs.<br>The following table exemplary shows progress that has already been made.</p>
217+
<p>Code initially extracted from <a href="https://github.com/deontic-logic/proof-tool" title="GitHub repository">deontic-logic/proof-tool</a> (still private; <a href="https://deontic-logic.github.io/readme.html">readme</a>). Can be used to generate improved versions of <a href="https://us.metamath.org/mmsolitaire/pmproofs.txt" title="us.metamath.org/mmsolitaire/pmproofs.txt">pmproofs.txt</a> of the <a href="https://us.metamath.org/mmsolitaire/mms.html" title="us.metamath.org/mmsolitaire/mms.html">mmsolitaire</a> project.<br>Exemplary generated results are available at <a href="https://github.com/xamidi/mmsolitaire" title="GitHub repository">xamidi/mmsolitaire</a>.<br>Eligible for high-performance computing. If you have access to a powerful computer, please consider to use this tool to further contribute to our knowledge regarding minimal proofs.<br>The following table exemplary shows progress that has already been made.</p>
218218
<table>
219219
<thead>
220220
<tr>
@@ -238,18 +238,36 @@ <h1 id="xamidi-pmgenerator">@xamidi/pmGenerator</h1>
238238
<td style="text-align:right"><a href="https://www.wolframalpha.com/input?i=2161632450%2F516720692" title="size(dProofs31-unfiltered31+.txt) / size(dProofs29.txt)">4.1833...</a></td>
239239
</tr>
240240
<tr>
241+
<td><a href="https://mega.nz/file/P1ki0IKQ#mb0QCboSu0Ofgr9nxspZTdcGUaAHPLzt-rQ8y0TN27k" title="1'741'338'664 bytes compressed into 89'327'496 bytes (ratio approx. 19.4939)">dProofs31.txt</a><sup></sup></td>
242+
<td style="text-align:right">2 477 015 626</td>
243+
<td style="text-align:right">7.95</td>
244+
<td style="text-align:right"><a href="https://www.wolframalpha.com/input?i=1741338664%2F516720692" title="size(dProofs31.txt) / size(dProofs29.txt)">3.3699...</a></td>
245+
</tr>
246+
<tr>
241247
<td><a href="https://mega.nz/file/3gVQSIJL#Qfa9CoUwsHWYYNHXYaP1mg61QQSJ1NSl1CHudK4g7BA" title="8'349'023'875 bytes compressed into 402'886'507 bytes (ratio approx. 20.7230)">dProofs33‑unfiltered31+.txt</a></td>
242248
<td style="text-align:right">11 246 333 287</td>
243249
<td style="text-align:right">36.49</td>
244250
<td style="text-align:right"><a href="https://www.wolframalpha.com/input?i=8349023875%2F2161632450" title="size(dProofs33-unfiltered31+.txt) / size(dProofs31-unfiltered31+.txt)">3.8623...</a></td>
245251
</tr>
246252
<tr>
253+
<td><a href="https://mega.nz/file/ixshHB7S#ktigbEzeOvCvFP8pruhC0NFfeK91p__eS_uZxBtIy0w" title="7'295'621'951 bytes compressed into 352'588'174 bytes (ratio approx. 20.6916)">dProofs33‑unfiltered33+.txt</a></td>
254+
<td style="text-align:right">10 192 931 363</td>
255+
<td style="text-align:right">29.43</td>
256+
<td style="text-align:right"><a href="https://www.wolframalpha.com/input?i=7295621951%2F1741338664" title="size(dProofs33-unfiltered33+.txt) / size(dProofs31.txt)">4.1896...</a></td>
257+
</tr>
258+
<tr>
247259
<td><a href="https://mega.nz/file/2893yZ7S#JlCHv4uOajgBJPPE2W87F_LAPzkH0-FlF4_2OrccuC4" title="30'717'801'573 bytes compressed into 1'400'853'331 bytes (ratio approx. 21.9279)">dProofs35‑unfiltered31+.txt</a></td>
248260
<td style="text-align:right">41 964 134 860</td>
249261
<td style="text-align:right">130.52</td>
250262
<td style="text-align:right"><a href="https://www.wolframalpha.com/input?i=30717801573%2F8349023875" title="size(dProofs35-unfiltered31+.txt) / size(dProofs33-unfiltered31+.txt)">3.6792...</a></td>
251263
</tr>
252264
<tr>
265+
<td><a href="https://mega.nz/file/WwNViKRa#UBiPOFN4wRkMgetY60eAQi1oXVQ3fQdkcg7hFxB-Dfk" title="28'223'320'428 bytes compressed into 1'290'589'236 bytes (ratio approx. 21.8686)">dProofs35‑unfiltered33+.txt</a></td>
266+
<td style="text-align:right">38 416 251 791</td>
267+
<td style="text-align:right">108.87</td>
268+
<td style="text-align:right"><a href="https://www.wolframalpha.com/input?i=28223320428%2F7295621951" title="size(dProofs35-unfiltered33+.txt) / size(dProofs33-unfiltered33+.txt)">3.8685...</a></td>
269+
</tr>
270+
<tr>
253271
<td><a href="https://mega.nz/file/6wUyDQzT#DQIJOLd5dCn-6V9sJWiJXeGRPUTUaA-7LqbGfLStjV0" title="113'174'356'461 bytes compressed into 4'897'020'927 bytes (ratio approx. 23.1109)">dProofs37‑unfiltered31+.txt</a><sup></sup></td>
254272
<td style="text-align:right">155 138 491 321</td>
255273
<td style="text-align:right">485.12</td>
@@ -295,7 +313,27 @@ <h4 id="usage">Usage</h4>
295313
pmGenerator -f 0 -o data/dProofs-withoutConclusions_ALL/dProofs -d
296314
pmGenerator -p -s -d -p -s -t -x 50 -y 100 -o data/plot_data_x50_y100.txt
297315
pmGenerator -m 17 -s
298-
</code></pre><h4 id="navigation">Navigation</h4>
316+
</code></pre><h4 id="multi-node-computing">Multi-node Computing</h4>
317+
<p>For MPI-based filtering, each spawned process is multithreaded and attempts to use as many threads as the hardware specifies as concurrent. Therefore, it is ideal to spawn the same amount of processes and nodes.<br>The following exemplary <a href="https://slurm.schedmd.com/documentation.html">Slurm</a> batch script has been used via <a href="https://slurm.schedmd.com/sbatch.html">sbatch</a> in order to reduce <code>dProofs31‑unfiltered31+.txt</code> to <code>dProofs31.txt</code>.</p>
318+
<pre><code>#!/bin/zsh
319+
#SBATCH --job-name=pmGen-20
320+
#SBATCH --output=output_%J.txt
321+
#SBATCH --partition=c18m
322+
#SBATCH --account=rwth1392
323+
#SBATCH --time=3-00:00:00
324+
#SBATCH --mem-per-cpu=3900M
325+
#SBATCH --cpus-per-task=48
326+
#SBATCH --mail-user=&lt;email&gt;
327+
#SBATCH --mail-type=END,FAIL,TIME_LIMIT
328+
## Number of nodes to use ; Also update #processes (via srun)!
329+
#SBATCH --nodes=6
330+
srun -n 6 ./pmGenerator -m 31
331+
</code></pre><p>A subsequent query with <a href="https://slurm.schedmd.com/squeue.html">squeue</a> would then reveal the following information:</p>
332+
<pre><code>$ squeue -o "%.9i %.8j %.9P %.11a %.8u %.5C %.5D %.8T %.10M %.10l %.19S %R" -u &lt;userID&gt;
333+
JOBID NAME PARTITION ACCOUNT USER CPUS NODES STATE TIME TIME_LIMIT START_TIME NODELIST(REASON)
334+
34762453 pmGen-20 c18m rwth1392 &lt;userID&gt; 288 6 RUNNING 3:34 3-00:00:00 2023-05-04T07:52:24 ncm[0297,0306-0307,0315,0320-0321]
335+
</code></pre><p>You may have a look at the <a href="log/dProofs31_6node_288cpu.log">log file</a> generated by that computation.</p>
336+
<h4 id="navigation">Navigation</h4>
299337
<ul>
300338
<li><a href="https://github.com/xamidi/pmGenerator/tree/c++11">C++11 branch</a></li>
301339
<li><a href="https://github.com/xamidi/pmGenerator/tree/master">C++20 branch</a></li>

README.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# @xamidi/pmGenerator
44

5-
Code extracted from [deontic-logic/proof-tool](https://github.com/deontic-logic/proof-tool "GitHub repository") (still private; [readme](https://deontic-logic.github.io/readme.html)). Can be used to generate improved versions of [pmproofs.txt](https://us.metamath.org/mmsolitaire/pmproofs.txt "us.metamath.org/mmsolitaire/pmproofs.txt") of the [mmsolitaire](https://us.metamath.org/mmsolitaire/mms.html "us.metamath.org/mmsolitaire/mms.html") project.
5+
Code initially extracted from [deontic-logic/proof-tool](https://github.com/deontic-logic/proof-tool "GitHub repository") (still private; [readme](https://deontic-logic.github.io/readme.html)). Can be used to generate improved versions of [pmproofs.txt](https://us.metamath.org/mmsolitaire/pmproofs.txt "us.metamath.org/mmsolitaire/pmproofs.txt") of the [mmsolitaire](https://us.metamath.org/mmsolitaire/mms.html "us.metamath.org/mmsolitaire/mms.html") project.
66
Exemplary generated results are available at [xamidi/mmsolitaire](https://github.com/xamidi/mmsolitaire "GitHub repository").
77
Eligible for high-performance computing. If you have access to a powerful computer, please consider to use this tool to further contribute to our knowledge regarding minimal proofs.
88
The following table exemplary shows progress that has already been made.
@@ -11,8 +11,11 @@ The following table exemplary shows progress that has already been made.
1111
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------:| -------------------------------:| ----------------------------------------------------------------------------------------------------------------------------------------------------:|
1212
| [dProofs29.txt](https://github.com/xamidi/pmGenerator/tree/master/data/dProofs-withConclusions "735'676'962 bytes compressed into 41'959'698 bytes (ratio approx. 17.5329)") | 735 676 962 | 2.68 | [3.3613...](https://www.wolframalpha.com/input?i=516720692%2F153725015 "size(dProofs29.txt) / size(dProofs27.txt)") |
1313
| [dProofs31&#x2011;unfiltered31+.txt](https://mega.nz/file/G18AWIpC#B04xOdtQj_2PJJP0yNQxbim7pOgd-hwv1i1EVU6ZsTM "2'161'632'450 bytes compressed into 112'364'583 bytes (ratio approx. 19.2377)") | 2 897 309 412 | 9.84 | [4.1833...](https://www.wolframalpha.com/input?i=2161632450%2F516720692 "size(dProofs31-unfiltered31+.txt) / size(dProofs29.txt)") |
14+
| [dProofs31.txt](https://mega.nz/file/P1ki0IKQ#mb0QCboSu0Ofgr9nxspZTdcGUaAHPLzt-rQ8y0TN27k "1'741'338'664 bytes compressed into 89'327'496 bytes (ratio approx. 19.4939)")<sup>✻</sup> | 2 477 015 626 | 7.95 | [3.3699...](https://www.wolframalpha.com/input?i=1741338664%2F516720692 "size(dProofs31.txt) / size(dProofs29.txt)") |
1415
| [dProofs33&#x2011;unfiltered31+.txt](https://mega.nz/file/3gVQSIJL#Qfa9CoUwsHWYYNHXYaP1mg61QQSJ1NSl1CHudK4g7BA "8'349'023'875 bytes compressed into 402'886'507 bytes (ratio approx. 20.7230)") | 11 246 333 287 | 36.49 | [3.8623...](https://www.wolframalpha.com/input?i=8349023875%2F2161632450 "size(dProofs33-unfiltered31+.txt) / size(dProofs31-unfiltered31+.txt)") |
16+
| [dProofs33&#x2011;unfiltered33+.txt](https://mega.nz/file/ixshHB7S#ktigbEzeOvCvFP8pruhC0NFfeK91p__eS_uZxBtIy0w "7'295'621'951 bytes compressed into 352'588'174 bytes (ratio approx. 20.6916)") | 10 192 931 363 | 29.43 | [4.1896...](https://www.wolframalpha.com/input?i=7295621951%2F1741338664 "size(dProofs33-unfiltered33+.txt) / size(dProofs31.txt)") |
1517
| [dProofs35&#x2011;unfiltered31+.txt](https://mega.nz/file/2893yZ7S#JlCHv4uOajgBJPPE2W87F_LAPzkH0-FlF4_2OrccuC4 "30'717'801'573 bytes compressed into 1'400'853'331 bytes (ratio approx. 21.9279)") | 41 964 134 860 | 130.52 | [3.6792...](https://www.wolframalpha.com/input?i=30717801573%2F8349023875 "size(dProofs35-unfiltered31+.txt) / size(dProofs33-unfiltered31+.txt)") |
18+
| [dProofs35&#x2011;unfiltered33+.txt](https://mega.nz/file/WwNViKRa#UBiPOFN4wRkMgetY60eAQi1oXVQ3fQdkcg7hFxB-Dfk "28'223'320'428 bytes compressed into 1'290'589'236 bytes (ratio approx. 21.8686)") | 38 416 251 791 | 108.87 | [3.8685...](https://www.wolframalpha.com/input?i=28223320428%2F7295621951 "size(dProofs35-unfiltered33+.txt) / size(dProofs33-unfiltered33+.txt)") |
1619
| [dProofs37&#x2011;unfiltered31+.txt](https://mega.nz/file/6wUyDQzT#DQIJOLd5dCn-6V9sJWiJXeGRPUTUaA-7LqbGfLStjV0 "113'174'356'461 bytes compressed into 4'897'020'927 bytes (ratio approx. 23.1109)")<sup>✻</sup> | 155 138 491 321 | 485.12 | [3.6843...](https://www.wolframalpha.com/input?i=113174356461%2F30717801573 "size(dProofs37-unfiltered31+.txt) / size(dProofs35-unfiltered31+.txt)") |
1720

1821
This tool has been [posted](https://groups.google.com/g/metamath/c/6DzIY33mthE/m/K0I6UNoiAgAJ) to the Metamath mailing list.
@@ -56,6 +59,32 @@ This tool has been [posted](https://groups.google.com/g/metamath/c/6DzIY33mthE/m
5659
pmGenerator -p -s -d -p -s -t -x 50 -y 100 -o data/plot_data_x50_y100.txt
5760
pmGenerator -m 17 -s
5861

62+
#### Multi-node Computing
63+
For MPI-based filtering, each spawned process is multithreaded and attempts to use as many threads as the hardware specifies as concurrent. Therefore, it is ideal to spawn the same amount of processes and nodes.
64+
The following exemplary [Slurm](https://slurm.schedmd.com/documentation.html) batch script has been used via [sbatch](https://slurm.schedmd.com/sbatch.html) in order to reduce `dProofs31‑unfiltered31+.txt` to `dProofs31.txt`.
65+
66+
#!/bin/zsh
67+
#SBATCH --job-name=pmGen-20
68+
#SBATCH --output=output_%J.txt
69+
#SBATCH --partition=c18m
70+
#SBATCH --account=rwth1392
71+
#SBATCH --time=3-00:00:00
72+
#SBATCH --mem-per-cpu=3900M
73+
#SBATCH --cpus-per-task=48
74+
#SBATCH --mail-user=<email>
75+
#SBATCH --mail-type=END,FAIL,TIME_LIMIT
76+
## Number of nodes to use ; Also update #processes (via srun)!
77+
#SBATCH --nodes=6
78+
srun -n 6 ./pmGenerator -m 31
79+
80+
A subsequent query with [squeue](https://slurm.schedmd.com/squeue.html) would then reveal the following information:
81+
82+
$ squeue -o "%.9i %.8j %.9P %.11a %.8u %.5C %.5D %.8T %.10M %.10l %.19S %R" -u <userID>
83+
JOBID NAME PARTITION ACCOUNT USER CPUS NODES STATE TIME TIME_LIMIT START_TIME NODELIST(REASON)
84+
34762453 pmGen-20 c18m rwth1392 <userID> 288 6 RUNNING 3:34 3-00:00:00 2023-05-04T07:52:24 ncm[0297,0306-0307,0315,0320-0321]
85+
86+
You may have a look at the [log file](log/dProofs31_6node_288cpu.log) generated by that computation.
87+
5988
#### Navigation
6089
- [C++11 branch](https://github.com/xamidi/pmGenerator/tree/c++11)
6190
- [C++20 branch](https://github.com/xamidi/pmGenerator/tree/master)

helper/FctHelper.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ bool cmpStringGrow::operator()(const string& a, const string& b) const {
2626
return a < b;
2727
}
2828

29+
string FctHelper::mpi_nodeName() {
30+
int len;
31+
ManagedArray<char> arr(MPI_MAX_PROCESSOR_NAME);
32+
MPI_Get_processor_name(arr.data, &len);
33+
return arr.data;
34+
}
35+
2936
// Templates for using values, static arrays and dynamic arrays on MPI_Send and MPI_Recv ("block until received", with extra mode "receive only if sent")
3037
template<typename T> void mpi_send(int rank, int count, MPI_Datatype type, const T* val, int dest, int tag, bool debug, auto printer) {
3138
if (debug)

helper/FctHelper.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,12 @@ struct ManagedArray { // for RAII on dynamic arrays
3636
ManagedArray() : data(nullptr) { }
3737
ManagedArray(std::size_t size) : data(new T[size]) { }
3838
ManagedArray(ManagedArray<T>&& old) : data(old.data) { old.data = nullptr; } // move ; prohibit copying ; data shall be managed by a single object
39-
~ManagedArray() { delete data; }
40-
void alloc(std::size_t size) { delete data; data = new T[size]; }
39+
~ManagedArray() { delete[] data; }
40+
void alloc(std::size_t size) { delete[] data; data = new T[size]; }
4141
};
4242

4343
struct FctHelper {
44+
static std::string mpi_nodeName();
4445
enum mpi_tag : int {
4546
mpi_tag_unspecified = 0, // not used by any helper function
4647
mpi_tag_bool = 1,

0 commit comments

Comments
 (0)