Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jun 17, 2026. It is now read-only.

jarpex/neorand

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

2 Commits

Repository files navigation

neorand

Version: v0.6.56 (Archived Snapshot, 2019)

High-performance quasi-random number generator utilizing NVIDIA CUDA and cuRAND.

⚠️ Disclaimer

This is an archived legacy project from 2019. It was developed to accelerate quasi-random number generation for Monte Carlo simulations during my time at the Skobeltsyn Institute of Nuclear Physics, Moscow State University (SINP MSU).

The code includes hardware profiling specifically tailored for the NVIDIA Tesla P100 (PCIe 12GB, GP100 architecture, 3584 CUDA cores) cluster we were running at the time.

Fun Fact: The logic was heavily tested on a consumer GTX 1080 Ti at home. Since the fully unlocked GP100 (P100) and GP102 (1080 Ti) share the same 3584 FP32 CUDA cores, the consumer card served as a perfect, accessible sandbox for debugging before deploying to the FP64-heavy scientific cluster.

Another Fun Fact: The copyright header in kernel.cu still reads v0.4.2. A classic reminder that updating version strings in every single file was the last priority before the 2019 deadline. The actual compiled release is v0.6.56.

Note: As a legacy v0.6.56 release, it contains known performance anti-patterns by modern standards (such as initializing curandState inside the kernel). It is provided "as-is" for historical and archival purposes.

Features (circa 2019)

  • Generates pseudo-random doubles using cuRAND for scientific computations.
  • CLI interface with short and long options.
  • Built-in GPU architecture info tool (with hardcoded core counts for Fermi, Kepler, Maxwell, Pascal, and Volta).

πŸ“Š Statistical Validation

The generated sequences were empirically validated for Monte Carlo suitability. Test results confirmed:

  • Mean: β‰ˆ 0.50 (Theoretical for $U(0,1)$: 0.5)
  • Standard Deviation: β‰ˆ 0.288 (Theoretical for $U(0,1)$: $\sqrt{1/12} \approx 0.288675$)
  • Pearson Correlation between parallel streams: β‰ˆ 0.0 (Confirming statistical independence of concurrent GPU threads, which is critical for parallel Monte Carlo).

πŸ“œ ΠžΡ€ΠΈΠ³ΠΈΠ½Π°Π»ΡŒΠ½Π°Ρ докумСнтация (2019)

ΠŸΡ€ΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅ Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚Π°Π½ΠΎ для ускорСния Π³Π΅Π½Π΅Ρ€Π°Ρ†ΠΈΠΈ ΠΊΠ²Π°Π·ΠΈ-Ρ€Π°Π½Π΄ΠΎΠΌΠΈΠ·ΠΈΡ€ΠΎΠ²Π°Π½Π½Ρ‹Ρ… чисСл. Для Π³Π΅Π½Π΅Ρ€Π°Ρ†ΠΈΠΈ чисСл ΠΏΡ€ΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅ ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΡƒΠ΅Ρ‚ ΡƒΠ½ΠΈΡ„ΠΈΡ†ΠΈΡ€ΠΎΠ²Π°Π½Π½Ρ‹Π΅ ΡˆΠ΅ΠΉΠ΄Π΅Ρ€Π½Ρ‹Π΅ Π±Π»ΠΎΠΊΠΈ. Π—Π° Π³Π΅Π½Π΅Ρ€Π°Ρ†ΠΈΡŽ ΠΎΡ‚Π²Π΅Ρ‡Π°Π΅Ρ‚ Π±ΠΈΠ±Π»ΠΈΠΎΡ‚Π΅ΠΊΠ° cuRAND.

Для получСния числа Π½Π΅ΠΎΠ±Ρ…ΠΎΠ΄ΠΈΠΌΠΎ Π·Π°Π΄Π°Ρ‚ΡŒ ΠΊΠ°ΠΊ ΠΌΠΈΠ½ΠΈΠΌΡƒΠΌ Π΄Π²Π° Π°Ρ€Π³ΡƒΠΌΠ΅Π½Ρ‚Π°: количСство SM-Π±Π»ΠΎΠΊΠΎΠ² для Π΄Π°Π½Π½ΠΎΠΉ ΠΎΠΏΠ΅Ρ€Π°Ρ†ΠΈΠΈ, Π° Ρ‚Π°ΠΊΠΆΠ΅ количСство ΠΏΠΎΡ‚ΠΎΠΊΠΎΠ². Π‘Ρ‚ΠΎΠΈΡ‚ ΠΎΠ±Ρ€Π°Ρ‚ΠΈΡ‚ΡŒ Π²Π½ΠΈΠΌΠ°Π½ΠΈΠ΅ Π½Π° Ρ‚ΠΎ, Ρ‡Ρ‚ΠΎ ΠΊΠ°ΠΆΠ΄Ρ‹ΠΉ GPU ΠΈΠΌΠ΅Π΅Ρ‚ Π°ΠΏΠΏΠ°Ρ€Π°Ρ‚Π½ΠΎΠ΅ ΠΎΠ³Ρ€Π°Π½ΠΈΡ‡Π΅Π½ΠΈΠ΅ для ΠΊΠ°ΠΆΠ΄ΠΎΠ³ΠΎ ΠΈΠ· Π΄Π²ΡƒΡ… Π²Ρ‹ΡˆΠ΅ΠΏΠ΅Ρ€Π΅Ρ‡ΠΈΡΠ»Π΅Π½Π½Ρ‹Ρ… Π°Ρ€Π³ΡƒΠΌΠ΅Π½Ρ‚ΠΎΠ², Π² связи с Ρ‡Π΅ΠΌ Π½Π΅ΠΎΠ±Ρ…ΠΎΠ΄ΠΈΠΌΠΎ ΠΎΠ·Π½Π°ΠΊΠΎΠΌΠΈΡ‚ΡŒΡΡ с тСхничСской Π΄ΠΎΠΊΡƒΠΌΠ΅Π½Ρ‚Π°Ρ†ΠΈΠ΅ΠΉ прСдоставлСнного оборудования ΠΏΠ΅Ρ€Π΅Π΄ Π½Π°Ρ‡Π°Π»ΠΎΠΌ Ρ€Π°Π±ΠΎΡ‚Ρ‹.

Бписок Π°Ρ€Π³ΡƒΠΌΠ΅Π½Ρ‚ΠΎΠ² ΠΊΠΎΠΌΠ°Π½Π΄Π½ΠΎΠΉ строки:

АргумСнт ОписаниС
-b [число] / --blocks [число] ΠšΠΎΠ»ΠΈΡ‡Π΅ΡΡ‚Π²ΠΎ SM-Π±Π»ΠΎΠΊΠΎΠ²
-t [число] / --threads [число] ΠšΠΎΠ»ΠΈΡ‡Π΅ΡΡ‚Π²ΠΎ ΠΏΠΎΡ‚ΠΎΠΊΠΎΠ²
-h / --help Π‘ΠΏΡ€Π°Π²ΠΊΠ° ΠΏΠΎ Ρ€Π°Π±ΠΎΡ‚Π΅ с ΠΏΡ€ΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅ΠΌ
-v / --version ВСрсия прилоТСния
-i / --info ΠšΠΎΠ½Ρ„ΠΈΠ³ΡƒΡ€Π°Ρ†ΠΈΡ устройства

πŸ›  How to build (Linux)

# Extract the archive
tar -zxvf neorand_v0.6.56.tar.gz
# Compile (requires NVIDIA CUDA Toolkit)
nvcc kernel.cu -o neorand
# Check GPU info
./neorand -i
# Run generation (e.g., 120 blocks, 256 threads per block)
./neorand -b 120 -t 256

πŸ“„ License

This project is licensed under the MIT License - see the copyright header in kernel.cu for details.

About

🧊 Archived legacy snapshot (v0.6.56, 2019). High-performance CUDA quasi-random number generator for Monte Carlo simulations. Originally developed and statistically validated for the NVIDIA Tesla P100 cluster at SINP MSU.

Topics

Resources

License

Stars

Watchers

Forks

Packages

Contributors

Languages

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /