User Tools

Site Tools


magicsquare6

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
magicsquare6 [2024/05/04 21:44] – [The number of magic squares of order six counted up to rotations and reflections] minomagicsquare6 [2024/06/01 17:49] (current) – [Code corrected (2023.11.28)] mino
Line 1: Line 1:
 ===== The number of magic squares of order six counted up to rotations and reflections ===== ===== The number of magic squares of order six counted up to rotations and reflections =====
 <file - nms6.txt> <file - nms6.txt>
-   17 753 889 197 660 635 632 updated  on 2024.02.17 and still to be confirmed. +   17 753 889 197 660 635 632
-  (17 753 889 189 701 385 264 updated  on 2023.09.07.) +
-  (17 753 889 189 701 384 304 reported on 2023.07.18.)+
 </file> </file>
  
-This result is consistent with stochastic estimates 1.7745(16)·10<sup>19</sup>[1]1.775392(12)·10<sup>19</sup>[2] and 1.77543(73)·10<sup>19</sup>[3].+This number has been confirmed by completing the enumeration twice using hundreds of GPUs at cloud resource rental servicesThough the number and models of GPUs used varied over timethe initial enumeration took about 80,000 hours of GeForce RTX-4090 and the second enumeration with an improved code took about 54,000 hours.
  
-Using hundreds of GPUs at cloud resource rental services, it took about six months to complete the countingThough the number and models of GPUs used varied over time, the total computation time amounts to about 80,000 hours of GeForce RTX-4090.+As the result of the second enumeration, the initial result 17 753 889 189 701 384 304 
 +obtained in July 2023 was found to be incorrect. More details of the errors are described in the next section.
  
-Because of the extraordinary volume of the calculation, it is not easy to deny a possibility that the result is contaminated by accidental errorsI am currently performing a [[doublecheck|thorough double-check]] and it is 60% completedI would appreciate confirmations or disputes by others.+The result is consistent with stochastic estimates 1.8(2)・10<sup>19</sup>[1], 1.7745(16)·10<sup>19</sup>[2], 1.775392(12)·10<sup>19</sup>[3] and 1.77543(73)·10<sup>19</sup>[4].
  
 +  - Y. Ohishi, in Japanese, Estimation of number of solutions of 6th order magic square by random sampling, Sugei Puzzle No.177, April 1992
   - K. Pinn and C. Wieczerkowski, Number of Magic Squares From Parallel Tempering Monte Calrlo, International Journal of Modern Physics C, 9 April 1998.    - K. Pinn and C. Wieczerkowski, Number of Magic Squares From Parallel Tempering Monte Calrlo, International Journal of Modern Physics C, 9 April 1998. 
   - W. Trump, [[https://www.trump.de/magic-squares/normal-6/index.html|Estimate of the number of magic squares of order 6]].   - W. Trump, [[https://www.trump.de/magic-squares/normal-6/index.html|Estimate of the number of magic squares of order 6]].
Line 17: Line 17:
  
  
-===== Errors found =====+===== Correction history =====
  
-In the enumeration, more than five hundreds of instances were created, and some of them were unfortunately faulty and produced wrong results. The followings are such cases I discovered so far by recounting subtotals+More than thousand of instances of GPU server were used in the enumeration and some of them were unfortunately faulty and produced wrong results. To find and correct such errors, every subtotal was calculated at least twice and extra counting was done to determine the correct answer in the case of mismatch. Two cases where the initial result was incorrect are listed below.
  
-==== updated on 2024.02.17 ====+==== corrected on 2023.09.07 ==== 
 + 
 +During the thorough double-check, it was discovered that a portion of the results generated by an instance was incorrect. The instance ran with two RTX-4090s for 60 hours and generated 3,771 sub-subtotals. Out of those sub-subtotals, only 12 were incorrect and all incorrect results were generated by only one of the two RTX-4090s. It is unlikely that these errors are due to logical flaws or coding mistakes. Hardware defects or instability are the most probable causes. 
 + 
 +As the result of the correction, the number increased by 960(40x24). 
 + 
 +==== corrected on 2024.02.17 ====
  
 Another erroneous instance was found. It ran with an RTX-4090 for about one month and produced about 19,000 sub-subtotals. Out of those sub-subtotals, 6 were incorrect. All of the incorrect results were produced in the last one hour of the lifetime of the instance. After the erroneous behavior, the GPU of the instance became unusable with an error message of "invalid memory access". Another erroneous instance was found. It ran with an RTX-4090 for about one month and produced about 19,000 sub-subtotals. Out of those sub-subtotals, 6 were incorrect. All of the incorrect results were produced in the last one hour of the lifetime of the instance. After the erroneous behavior, the GPU of the instance became unusable with an error message of "invalid memory access".
Line 27: Line 33:
 As the result of the correction, the number increased by 7 959 250 368 (331 635 432 x24). As the result of the correction, the number increased by 7 959 250 368 (331 635 432 x24).
  
-==== updated on 2023.09.07 ==== 
-During the thorough double-check, it was discovered that a portion of the results generated by an instance was incorrect. The instance ran with two RTX-4090s for 60 hours and generated 3,771 sub-subtotals. Out of those sub-subtotals, only 12 were incorrect and all incorrect results were generated by only one of the two RTX-4090s. It is unlikely that these errors are due to logical flaws or coding mistakes. Hardware defects or instability are the most probable causes. 
- 
-As the result of the correction, the number increased by 960(40x24). 
  
-While these errors have not damaged my confidence in the logic and the code used in the calculation, it is possible that errors of similar nature may still be contained in the result. Therefore, the results should be considered unconfirmed until the thorough double-check is completed. 
  
-===== Code corrected (2023.11.30) =====+===== Code corrected (2023.11.28) =====
  
-The code used in the initial enumeration was discovered to contain a mistake related to GPU thread synchronization. A corrected version of the code is currently running for the thorough double-check. No discrepancy due to the mistake has been found so far.+The code used in the initial enumeration was discovered to contain a mistake related to GPU thread synchronization. A corrected version of the code is used in the second enumeration. No erroneous incident caused by this mistake was found.
  
 ===== Subsets and subtotals ===== ===== Subsets and subtotals =====
Line 43: Line 44:
  
   * [[Defintion of subsets|Definition of subsets]]   * [[Defintion of subsets|Definition of subsets]]
-  * [[subtotals|List of 4,329 subtotals]] (3 of subtotals are known to be incorrect, but are kept uncorrected intentionally.) +  * [[subtotals|List of 4,329 subtotals]]  
-  * [[https://ms6.sakura.ne.jp/subsubtotal.txt.gz|List of subsubtotals]] (234MBytes .gz) (18 of sub-subtoals are known to be incorrect, but are kept uncorrected intentionally.)+    * (3 of subtotals are known to be incorrect, but are kept uncorrected intentionally.) 
 +  * [[https://ms6.sakura.ne.jp/subsubtotal.txt.gz|List of subsubtotals]] (234MBytes .gz)  
 +    * (18 of sub-subtoals are known to be incorrect, but are kept uncorrected intentionally.)
  ===== Codes =====  ===== Codes =====
 [[strategies|Strategies in counting magic squares]] [[strategies|Strategies in counting magic squares]]
  
  
- [[ms-20240410.cu|CUDA code]] (corrected on 2023.11.28 and updated on 2024.04.10)+ [[ms-20240504.cu|CUDA code]] (corrected on 2023.11.28 and updated on 2024.05.04)
   * Counts magic squares of an order from 3 to 6 up to [[https://oeis.org/A266237|M-transformations]].   * Counts magic squares of an order from 3 to 6 up to [[https://oeis.org/A266237|M-transformations]].
   * Runs at a typical speed of 3.8G counts/sec on Nvidia GeForce RTX-4090 for order 6.   * Runs at a typical speed of 3.8G counts/sec on Nvidia GeForce RTX-4090 for order 6.
Line 72: Line 75:
 ===== Time stamps ===== ===== Time stamps =====
  
-  * CUDA code: 2023.04.10 version [[https://ms6.sakura.ne.jp/ms-20240410.cu|file]] [[https://ms6.sakura.ne.jp/ms-20240410.cu.ots|timestamp]]+  * CUDA code: 2023.05.04 version [[https://ms6.sakura.ne.jp/ms-20240504.cu|file]] [[https://ms6.sakura.ne.jp/ms-20240504.cu.ots|timestamp]]
   * pthread code: 2023.09.18 version [[https://ms6.sakura.ne.jp/ms-20230918-m.c|file]] [[https://ms6.sakura.ne.jp/ms-20230918-m.c.ots|timestamp]]   * pthread code: 2023.09.18 version [[https://ms6.sakura.ne.jp/ms-20230918-m.c|file]] [[https://ms6.sakura.ne.jp/ms-20230918-m.c.ots|timestamp]]
   * [[https://opentimestamps.org/|verification site]]   * [[https://opentimestamps.org/|verification site]]
  
 --------------------------------- ---------------------------------
-2024/04/10\\+2024/05/31\\
  --- //[[hidetoshimino@gmail.com|Hidetoshi Mino]]//, Ph.D.  --- //[[hidetoshimino@gmail.com|Hidetoshi Mino]]//, Ph.D.
 Professor emeritus, University of Yamanashi, Japan Professor emeritus, University of Yamanashi, Japan
magicsquare6.1714826661.txt.gz · Last modified: 2024/05/04 21:44 by mino

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki