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/06/19 09:42] – [Storategies and Codes] minomagicsquare6 [2025/08/15 14:08] (current) – [The number of magic squares of order six counted up to rotations and reflections] mino
Line 1: Line 1:
 +__[[magicsquare6-j|Move to the Japanese page]]__
 +
 ===== 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>
Line 4: Line 6:
 </file> </file>
  
-This number has been confirmed by completing the enumeration twice using hundreds of GPUs at cloud resource rental services. Though the number and models of GPUs used varied over time, the initial enumeration took about 80,000 hours of GeForce RTX-4090 and the second enumeration with an improved code took about 54,000 hours.+[[https://www.youtube.com/playlist?list=PLO7sVdtn8C_Dg5_JHmelPUmDpI6LZqzBM|YouTube video]] explaining the method to achieve the enumeration.  [[https://ms6.sakura.ne.jp/Manuscript.pdf|manuscript]]  [[https://ms6.sakura.ne.jp/Algorithm.pdf|presentation slides]]  
 + 
 +This number has been confirmed by completing the enumeration twice using hundreds of GPUs provided at cloud resource rental services. Though the number and models of GPUs used varied over time, the initial enumeration took about 80,000 hours of GeForce RTX-4090 and the second enumeration with an improved code took about 54,000 hours.
  
 As the result of the second enumeration, the initial result 17 753 889 189 701 384 304 As the result of the second enumeration, the initial result 17 753 889 189 701 384 304
Line 19: Line 23:
 ===== Correction history ===== ===== Correction history =====
  
-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 when a mismatch happened. There were following two cases where the initial result was incorrect.+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 when a mismatch happened. There were following two cases where the initial result was incorrect.
  
 ==== corrected on 2023.09.07 ==== ==== corrected on 2023.09.07 ====
Line 46: Line 50:
   * [[https://ms6.sakura.ne.jp/subsubtotal.txt.gz|List of subsubtotals]] (234MBytes .gz)    * [[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.)     * (18 of sub-subtoals are known to be incorrect, but are kept uncorrected intentionally.)
- ===== Storategies and Codes =====+ ===== Strategies and codes =====
 [[strategies|Strategies in counting magic squares]] [[strategies|Strategies in counting magic squares]]
  
Line 52: Line 56:
  [[ms-20240504.cu|CUDA code]] (corrected on 2023.11.28 and updated on 2024.05.04)  [[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 (91G magic squares/sec) on Nvidia GeForce RTX-4090 for order 6.
   * Nvidia GPU of Pascal architecture (sm_60) or newer is assumed.    * Nvidia GPU of Pascal architecture (sm_60) or newer is assumed. 
   * Multi GPU systems are supported. **[[https://forums.developer.nvidia.com/t/system-wide-atomic-operation-failure-on-multi-4090-systems/243273| Be cautious, however, when you use a multi-4090 system ]]**.   * Multi GPU systems are supported. **[[https://forums.developer.nvidia.com/t/system-wide-atomic-operation-failure-on-multi-4090-systems/243273| Be cautious, however, when you use a multi-4090 system ]]**.
Line 64: Line 68:
     * The code doesn't check the validity of parameters given by users. Invalid parameters will result in a wrong answer or a runtime error.     * The code doesn't check the validity of parameters given by users. Invalid parameters will result in a wrong answer or a runtime error.
  
-  *The code was corrected on 2023.11.28.\\ The code used in the initial enumeration was discovered to contain a mistake related to GPU thread synchronization. Corrected versions of the code were used in the second enumeration. No erroneous incident caused by this mistake was found.+  *The code was corrected on 2023.11.28.\\ The code used in the initial enumeration was discovered to contain a mistake related to GPU thread synchronization. Corrected versions of the code were used in the second enumeration. No erroneous result caused by this mistake was found.
  
 [[ms-20230918-m.c|Non-CUDA code in C using pthread]] (updated on 2023.09.18) [[ms-20230918-m.c|Non-CUDA code in C using pthread]] (updated on 2023.09.18)
Line 74: Line 78:
  ===== Semi-magic squares =====  ===== Semi-magic squares =====
  
-The latest code used in the second enumeration counted semi-magic squares besides magic squares and produced the same result as discovered by a very different approach[5]. This match is considered as a cross verification of the counting method and of computing resources used in the calculation. All [[semi_magic_subtotals|subtotals of semi-magic (including magic) squares]] are available.+The latest code used in the second enumeration counted semi-magic squares besides magic squares and produced the same result as discovered by a very different approach of A. Ripatti[5]. This match is considered as a cross verification of the counting method and of computing resources used in the calculation. All [[semi_magic_subtotals|subtotals of semi-magic (including magic) squares]] are available.
  
   * 5. A. Ripatti, On the number of semi-magic squares of order 6, arXiv:1807.02983, July 2018.   * 5. A. Ripatti, On the number of semi-magic squares of order 6, arXiv:1807.02983, July 2018.
magicsquare6.1718757764.txt.gz · Last modified: 2024/06/19 09:42 by mino

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki