nested-fit 5.8.0.dev133__tar.gz → 6.0.0.dev134__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (244) hide show
  1. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/PKG-INFO +4 -4
  2. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/README.md +3 -3
  3. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/nested_fit.egg-info/PKG-INFO +4 -4
  4. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/pyproject.toml +2 -2
  5. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/Mod_gpu.f90 +6 -0
  6. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/Mod_likelihood.f90 +40 -18
  7. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/Mod_options.f90 +7 -5
  8. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/gpu/README.md +16 -10
  9. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/nested_fit.f90 +2 -2
  10. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/.github/dependabot.yml +0 -0
  11. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/.github/workflows/build_wheels.yml +0 -0
  12. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/.gitignore +0 -0
  13. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/CMakeLists.txt +0 -0
  14. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/LICENSE +0 -0
  15. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/STEPBYSTEP_INSTALL.md +0 -0
  16. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/ThirdParty.md +0 -0
  17. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/benchmarks_and_tests/benchmarks_and_tests.ipynb +0 -0
  18. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/benchmarks_and_tests/benefit_per_step.py +0 -0
  19. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/benchmarks_and_tests/gpu_performance_model.ipynb +0 -0
  20. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/benchmarks_and_tests/levers_matrix.py +0 -0
  21. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/benchmarks_and_tests/levers_matrix_a4000_2026-10-30.md +0 -0
  22. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/benchmarks_and_tests/levers_matrix_table.py +0 -0
  23. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/benchmarks_and_tests/sweep.py +0 -0
  24. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/benchmarks_and_tests/test_01_gauss_bg/he-histo.dat +0 -0
  25. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/benchmarks_and_tests/test_01_gauss_bg/nf_input.yaml +0 -0
  26. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/benchmarks_and_tests/test_03_4gauss_bg/he-histo.dat +0 -0
  27. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/benchmarks_and_tests/test_03_4gauss_bg/nf_input.yaml +0 -0
  28. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/benchmarks_and_tests/test_11_LJ17/nf_input.yaml +0 -0
  29. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/benchmarks_and_tests/test_12_gpu_crosscheck/README.txt +0 -0
  30. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/benchmarks_and_tests/test_12_gpu_crosscheck/nf_input.yaml +0 -0
  31. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/benchmarks_and_tests/test_12_gpu_crosscheck/out_points.csv +0 -0
  32. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/benchmarks_and_tests/variations_gain.ipynb +0 -0
  33. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/cmake/resman.cmake +0 -0
  34. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/cmake/write_manifest.cmake +0 -0
  35. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/README.md +0 -0
  36. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/01_simple_example/RANDOM_WALK/he-histo.dat +0 -0
  37. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/01_simple_example/RANDOM_WALK/nf_input.yaml +0 -0
  38. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/01_simple_example/RANDOM_WALK_NO_DB/he-histo.dat +0 -0
  39. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/01_simple_example/RANDOM_WALK_NO_DB/nf_input.yaml +0 -0
  40. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/01_simple_example/RANDOM_WALK_SYN/he-histo.dat +0 -0
  41. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/01_simple_example/RANDOM_WALK_SYN/nf_input.yaml +0 -0
  42. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/01_simple_example/README.txt +0 -0
  43. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/01_simple_example/internal_func_hard_writing/he-histo.dat +0 -0
  44. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/01_simple_example/internal_func_hard_writing/nf_input.yaml +0 -0
  45. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/01_simple_example/internal_func_input/he-histo.dat +0 -0
  46. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/01_simple_example/internal_func_input/nf_input.yaml +0 -0
  47. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/01_simple_example/internal_func_no_points_file/he-histo.dat +0 -0
  48. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/01_simple_example/internal_func_no_points_file/nf_input.yaml +0 -0
  49. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/01_simple_example/internal_func_no_stat/he-histo.dat +0 -0
  50. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/01_simple_example/internal_func_no_stat/nf_input.yaml +0 -0
  51. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/01_simple_example/latex_func_input/he-histo.dat +0 -0
  52. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/01_simple_example/latex_func_input/nf_input.yaml +0 -0
  53. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/01_simple_example/legacy_func_input/he-histo.dat +0 -0
  54. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/01_simple_example/legacy_func_input/nf_input.yaml +0 -0
  55. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/02_error_bars_data/README.txt +0 -0
  56. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/02_error_bars_data/eb_gauss_bg-x0_300-sigma_20-A_20000-p_to_bg_0.05-bin_1.dat +0 -0
  57. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/02_error_bars_data/nf_input.yaml +0 -0
  58. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/03_with_cluster_analysis/DBSCAN-RANDOM_WALK_SYN/he-histo.dat +0 -0
  59. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/03_with_cluster_analysis/DBSCAN-RANDOM_WALK_SYN/nf_input.yaml +0 -0
  60. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/03_with_cluster_analysis/DBSCAN-SLICE_SAMPLING/he-histo.dat +0 -0
  61. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/03_with_cluster_analysis/DBSCAN-SLICE_SAMPLING/nf_input.yaml +0 -0
  62. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/03_with_cluster_analysis/KNN-RANDOM_WALK_SYN/he-histo.dat +0 -0
  63. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/03_with_cluster_analysis/KNN-RANDOM_WALK_SYN/nf_input.yaml +0 -0
  64. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/03_with_cluster_analysis/KNN-SLICE_SAMPLING/he-histo.dat +0 -0
  65. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/03_with_cluster_analysis/KNN-SLICE_SAMPLING/nf_input.yaml +0 -0
  66. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/03_with_cluster_analysis/README.txt +0 -0
  67. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/03_with_cluster_analysis/agglomerative-RANDOM_WALK_SYN/he-histo.dat +0 -0
  68. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/03_with_cluster_analysis/agglomerative-RANDOM_WALK_SYN/nf_input.yaml +0 -0
  69. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/03_with_cluster_analysis/agglomerative-SLICE_SAMPLING/he-histo.dat +0 -0
  70. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/03_with_cluster_analysis/agglomerative-SLICE_SAMPLING/nf_input.yaml +0 -0
  71. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/03_with_cluster_analysis/mean-shift-RANDOM_WALK_SYN/he-histo.dat +0 -0
  72. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/03_with_cluster_analysis/mean-shift-RANDOM_WALK_SYN/nf_input.yaml +0 -0
  73. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/03_with_cluster_analysis/mean-shift-SLICE_SAMPLING/he-histo.dat +0 -0
  74. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/03_with_cluster_analysis/mean-shift-SLICE_SAMPLING/nf_input.yaml +0 -0
  75. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/04_set_of_datafiles/latex_func_input/gauss_bg-x0_300-sigma_20-A_300-p_to_bg_20-bin_1.dat +0 -0
  76. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/04_set_of_datafiles/latex_func_input/gauss_bg-x0_310-sigma_20-A_150-p_to_bg_10-bin_1.dat +0 -0
  77. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/04_set_of_datafiles/latex_func_input/nf_input.yaml +0 -0
  78. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/04_set_of_datafiles/legacy_func_input/gauss_bg-x0_300-sigma_20-A_300-p_to_bg_20-bin_1.dat +0 -0
  79. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/04_set_of_datafiles/legacy_func_input/gauss_bg-x0_310-sigma_20-A_150-p_to_bg_10-bin_1.dat +0 -0
  80. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/04_set_of_datafiles/legacy_func_input/nf_input.yaml +0 -0
  81. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/05_data_2D/README.txt +0 -0
  82. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/05_data_2D/nf_input.yaml +0 -0
  83. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/05_data_2D/test_matrix.dat +0 -0
  84. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/06_interpolation_function/ginterp.csv +0 -0
  85. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/06_interpolation_function/interp.csv +0 -0
  86. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/06_interpolation_function/nf_input.yaml +0 -0
  87. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/data_analysis/06_interpolation_function/pynf_interp.ipynb +0 -0
  88. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/function_integration/07_func_GAUSS/hard_writing/nf_input.yaml +0 -0
  89. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/function_integration/07_func_GAUSS/no_hard_writing/nf_input.yaml +0 -0
  90. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/function_integration/08_func_EGGBOX/nf_input.yaml +0 -0
  91. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/jupyter_notebooks/.ipynb_checkpoints/pandas_extended_analysis-checkpoint.ipynb +0 -0
  92. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/jupyter_notebooks/.ipynb_checkpoints/simple_analysis_visu-checkpoint.ipynb +0 -0
  93. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/jupyter_notebooks/LJ17/nf_input.yaml +0 -0
  94. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/jupyter_notebooks/LJ3/nf_input.yaml +0 -0
  95. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/jupyter_notebooks/LJ7/nf_input.yaml +0 -0
  96. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/jupyter_notebooks/LJ7_norm/nf_input.yaml +0 -0
  97. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/jupyter_notebooks/exploring_potentials.ipynb +0 -0
  98. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/jupyter_notebooks/pandas_extended_analysis.ipynb +0 -0
  99. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/jupyter_notebooks/pynf_interp.ipynb +0 -0
  100. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/jupyter_notebooks/quick_start_with_google_colab.ipynb +0 -0
  101. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/jupyter_notebooks/res_1gauss_bg/he-histo.dat +0 -0
  102. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/jupyter_notebooks/res_1gauss_bg/nf_input.yaml +0 -0
  103. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/jupyter_notebooks/res_2gauss_bg/he-histo.dat +0 -0
  104. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/jupyter_notebooks/res_2gauss_bg/nf_input.yaml +0 -0
  105. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/jupyter_notebooks/res_3gauss_bg/.ipynb_checkpoints/he-histo-checkpoint.dat +0 -0
  106. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/jupyter_notebooks/res_3gauss_bg/.ipynb_checkpoints/nf_input-checkpoint.dat +0 -0
  107. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/jupyter_notebooks/res_3gauss_bg/.ipynb_checkpoints/nf_input-checkpoint.yaml +0 -0
  108. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/jupyter_notebooks/res_3gauss_bg/he-histo.dat +0 -0
  109. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/jupyter_notebooks/res_3gauss_bg/nf_input.yaml +0 -0
  110. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/jupyter_notebooks/res_4gauss_bg/he-histo.dat +0 -0
  111. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/jupyter_notebooks/res_4gauss_bg/nf_input.yaml +0 -0
  112. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/jupyter_notebooks/set_of_datafiles/README.txt +0 -0
  113. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/jupyter_notebooks/set_of_datafiles/gauss_bg-x0_300-sigma_20-A_300-p_to_bg_20-bin_1.dat +0 -0
  114. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/jupyter_notebooks/set_of_datafiles/gauss_bg-x0_310-sigma_20-A_150-p_to_bg_10-bin_1.dat +0 -0
  115. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/jupyter_notebooks/set_of_datafiles/nf_input.yaml +0 -0
  116. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/jupyter_notebooks/set_of_files_analysis.ipynb +0 -0
  117. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/jupyter_notebooks/simple_analysis_visu.ipynb +0 -0
  118. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/jupyter_notebooks/simple_visualisation.ipynb +0 -0
  119. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/native_functions/example.cpp +0 -0
  120. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/native_functions/example.f90 +0 -0
  121. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/potential_exploration/09_ENERGY_HARM_3D/hard_writing/nf_energy.txt +0 -0
  122. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/potential_exploration/09_ENERGY_HARM_3D/hard_writing/nf_input.yaml +0 -0
  123. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/potential_exploration/09_ENERGY_HARM_3D/no_hard_writing/nf_energy.txt +0 -0
  124. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/potential_exploration/09_ENERGY_HARM_3D/no_hard_writing/nf_input.yaml +0 -0
  125. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/potential_exploration/10_Q_ENERGY_HARM_3D/hard_writing/nf_input.yaml +0 -0
  126. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/examples/potential_exploration/10_Q_ENERGY_HARM_3D/no_hard_writing/nf_input.yaml +0 -0
  127. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/exercises/.DS_Store +0 -0
  128. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/exercises/exercices_ICFO/ICFO2024_nested_fit_tutorial.ipynb +0 -0
  129. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/exercises/exercices_ICFO/res_1gauss_bg/he-histo.dat +0 -0
  130. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/exercises/exercices_ICFO/res_1gauss_bg/nf_input.yaml +0 -0
  131. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/exercises/exercises_QXRA/exercises_quantitative_xray_spectroscopy.ipynb +0 -0
  132. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/exercises/exercises_QXRA/with_U_1000_counts/c_U_1000_counts.dat +0 -0
  133. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/exercises/exercises_QXRA/with_U_100s/c_U_100s.dat +0 -0
  134. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/exercises/exercises_QXRA/with_U_1s/c_U_1s.dat +0 -0
  135. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/exercises/exercises_QXRA/with_U_1s/nf_input.dat +0 -0
  136. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/exercises/exercises_QXRA/without_U_100k_counts/s_U_100000_counts.dat +0 -0
  137. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/exercises/exercises_QXRA/without_U_1M_counts/nf_input.dat +0 -0
  138. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/exercises/exercises_QXRA/without_U_1M_counts/s_U_1000000_counts.dat +0 -0
  139. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/exercises/old_exercices/exercise1_piN_sampling/README.txt +0 -0
  140. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/exercises/old_exercices/exercise1_piN_sampling/nf_input.dat +0 -0
  141. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/exercises/old_exercices/exercise1_piN_sampling/piN-sum.dat +0 -0
  142. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/exercises/old_exercices/exercise2_pN_evidence/README.txt +0 -0
  143. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/exercises/old_exercices/exercise2_pN_evidence/nf_input.dat +0 -0
  144. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/exercises/old_exercices/exercise2_pN_evidence/piN-sum.dat +0 -0
  145. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/exercises/old_exercices/exercise2_pN_evidence/results_2000lp.txt +0 -0
  146. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/exercises/old_exercices/exercise3_He-like_U_from_scratch/README.txt +0 -0
  147. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/exercises/old_exercices/exercise3_He-like_U_from_scratch/he-histo.dat +0 -0
  148. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/exercises/old_exercices/exercise4_He-like_U_clusters/README.txt +0 -0
  149. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/exercises/old_exercices/exercise4_He-like_U_clusters/he-histo.dat +0 -0
  150. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/exercises/old_exercices/exercise4_He-like_U_clusters/nf_input.dat +0 -0
  151. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/exercises/old_exercices/exercise5_He-like_U_search_and_clusters_methods/README.txt +0 -0
  152. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/exercises/old_exercices/exercise5_He-like_U_search_and_clusters_methods/he-histo.dat +0 -0
  153. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/install.sh +0 -0
  154. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/nested_fit.egg-info/SOURCES.txt +0 -0
  155. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/nested_fit.egg-info/dependency_links.txt +0 -0
  156. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/nested_fit.egg-info/entry_points.txt +0 -0
  157. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/nested_fit.egg-info/requires.txt +0 -0
  158. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/nested_fit.egg-info/top_level.txt +0 -0
  159. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/nf_input.yaml +0 -0
  160. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/pynested_fit/__init__.py +0 -0
  161. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/pynested_fit/cliw.py +0 -0
  162. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/pynested_fit/evaluator.py +0 -0
  163. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/pynested_fit/metadata.py +0 -0
  164. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/pynested_fit/nested_res.py +0 -0
  165. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/pynested_fit/nested_run.py +0 -0
  166. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/pynested_fit/utils.py +0 -0
  167. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/pynested_fit/widgets/__init__.py +0 -0
  168. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/pynested_fit/widgets/bar.py +0 -0
  169. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/pynested_fit/widgets/errorui.py +0 -0
  170. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/pynested_fit/widgets/hfinder.py +0 -0
  171. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/pynested_fit/widgets/plot.py +0 -0
  172. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/pynested_fit/widgets/timer.py +0 -0
  173. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/pynested_fit/widgets/var.py +0 -0
  174. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/setup.cfg +0 -0
  175. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/setup.py +0 -0
  176. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/DIERCKX/curfit.f +0 -0
  177. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/DIERCKX/fpback.f +0 -0
  178. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/DIERCKX/fpbspl.f +0 -0
  179. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/DIERCKX/fpchec.f +0 -0
  180. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/DIERCKX/fpcurf.f +0 -0
  181. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/DIERCKX/fpdisc.f +0 -0
  182. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/DIERCKX/fpgivs.f +0 -0
  183. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/DIERCKX/fpknot.f +0 -0
  184. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/DIERCKX/fprati.f +0 -0
  185. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/DIERCKX/fprota.f +0 -0
  186. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/DIERCKX/splev.f +0 -0
  187. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/Makefile +0 -0
  188. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/Mod_array_tries.f90 +0 -0
  189. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/Mod_cluster_analysis.f90 +0 -0
  190. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/Mod_covariance_matrix.f90 +0 -0
  191. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/Mod_input_parse.f90 +0 -0
  192. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/Mod_integrated_func.f90 +0 -0
  193. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/Mod_interpolate.f90 +0 -0
  194. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/Mod_jsonio.f90 +0 -0
  195. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/Mod_likelihood_gen.f90 +0 -0
  196. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/Mod_logger.f90 +0 -0
  197. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/Mod_math.f90 +0 -0
  198. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/Mod_metadata.f90.in +0 -0
  199. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/Mod_parameters.f90 +0 -0
  200. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/Mod_perfprof.f90 +0 -0
  201. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/Mod_potentials.f90 +0 -0
  202. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/Mod_search_new_point.f90 +0 -0
  203. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/Mod_timestamp.f90 +0 -0
  204. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/Mod_userfcn.f90 +0 -0
  205. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/SLATEC/dpsort.f +0 -0
  206. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/SLATEC/fdump.f +0 -0
  207. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/SLATEC/i1mach.f +0 -0
  208. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/SLATEC/j4save.f +0 -0
  209. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/SLATEC/xercnt.f +0 -0
  210. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/SLATEC/xerhlt.f +0 -0
  211. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/SLATEC/xermsg.f +0 -0
  212. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/SLATEC/xerprn.f +0 -0
  213. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/SLATEC/xersve.f +0 -0
  214. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/SLATEC/xgetua.f +0 -0
  215. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/USERFCN.f +0 -0
  216. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/USERFCN_2D.f90 +0 -0
  217. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/USERFCN_SET.f +0 -0
  218. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/cli/argparse.f90 +0 -0
  219. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/funceval/auto_func.f90 +0 -0
  220. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/funceval/latex_parser.cpp +0 -0
  221. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/funceval/native_parser.cpp +0 -0
  222. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/functions/WOFZ.f +0 -0
  223. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/functions/internal.tex +0 -0
  224. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/functions/internal_funcs.f90 +0 -0
  225. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/gpu/nf_device_lib.h +0 -0
  226. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/gpu/nf_device_lib_src.h.in +0 -0
  227. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/gpu/nf_gpu.cpp +0 -0
  228. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/gpu/nf_gpu.h +0 -0
  229. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/helper/console.cpp +0 -0
  230. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/helper/halt.f90 +0 -0
  231. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/helper/hash.f90 +0 -0
  232. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/helper/int_stack.f90 +0 -0
  233. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/helper/resman.cpp.in +0 -0
  234. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/helper/rmhex.cpp +0 -0
  235. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/helper/strutil.f90 +0 -0
  236. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/helper/utils.cpp +0 -0
  237. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/init_interpolation.f +0 -0
  238. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/nested_sampling.f90 +0 -0
  239. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/rinteg.f +0 -0
  240. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/src/shirley_fitpack.f90 +0 -0
  241. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/test/CMakeLists.txt +0 -0
  242. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/test/README.md +0 -0
  243. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/test/str.f90 +0 -0
  244. {nested_fit-5.8.0.dev133 → nested_fit-6.0.0.dev134}/test/test.f90 +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nested_fit
3
- Version: 5.8.0.dev133
3
+ Version: 6.0.0.dev134
4
4
  Summary: The nested_fit package.
5
5
  Author: Martino Trassinelli, Lune Maillard, César Godinho
6
6
  Project-URL: Homepage, https://github.com/martinit18/nested_fit
@@ -84,8 +84,8 @@ pipx install nested_fit
84
84
 
85
85
  With an NVIDIA GPU, `pipx install "nested_fit[cuda]"` adds the runtime compiler the GPU backend
86
86
  needs; the driver is the only other requirement, no CUDA toolkit. The likelihood then runs on
87
- the GPU when that is faster than the CPU threads together, and on the CPU otherwise, with one
88
- log line saying which. Details and controls in `src/gpu/README.md`.
87
+ the GPU, on at most 8 threads, whenever a startup self-test finds that faster than all the CPU
88
+ threads together, and on the CPU otherwise, with one log line saying which. Details and controls in `src/gpu/README.md`.
89
89
 
90
90
  The `examples/` directory is bundled with the package. After installation you can
91
91
  copy it to a local working area in a couple of ways:
@@ -453,7 +453,7 @@ Examples of use of a legacy function can be found in `examples/data_analysis/aaa
453
453
 
454
454
  ## Present version and history of the past versions
455
455
 
456
- The present version is 5.8.0\
456
+ The present version is 6.0.0\
457
457
  New features:
458
458
  - Asynchronous parallel search of new points: each thread adds its new point to the main loop without waiting for the search of the other threads.
459
459
  This strongly improves the parallel efficiency when the search time of new points is very variable (e.g. Lennard-Jones clusters)
@@ -57,8 +57,8 @@ pipx install nested_fit
57
57
 
58
58
  With an NVIDIA GPU, `pipx install "nested_fit[cuda]"` adds the runtime compiler the GPU backend
59
59
  needs; the driver is the only other requirement, no CUDA toolkit. The likelihood then runs on
60
- the GPU when that is faster than the CPU threads together, and on the CPU otherwise, with one
61
- log line saying which. Details and controls in `src/gpu/README.md`.
60
+ the GPU, on at most 8 threads, whenever a startup self-test finds that faster than all the CPU
61
+ threads together, and on the CPU otherwise, with one log line saying which. Details and controls in `src/gpu/README.md`.
62
62
 
63
63
  The `examples/` directory is bundled with the package. After installation you can
64
64
  copy it to a local working area in a couple of ways:
@@ -426,7 +426,7 @@ Examples of use of a legacy function can be found in `examples/data_analysis/aaa
426
426
 
427
427
  ## Present version and history of the past versions
428
428
 
429
- The present version is 5.8.0\
429
+ The present version is 6.0.0\
430
430
  New features:
431
431
  - Asynchronous parallel search of new points: each thread adds its new point to the main loop without waiting for the search of the other threads.
432
432
  This strongly improves the parallel efficiency when the search time of new points is very variable (e.g. Lennard-Jones clusters)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nested_fit
3
- Version: 5.8.0.dev133
3
+ Version: 6.0.0.dev134
4
4
  Summary: The nested_fit package.
5
5
  Author: Martino Trassinelli, Lune Maillard, César Godinho
6
6
  Project-URL: Homepage, https://github.com/martinit18/nested_fit
@@ -84,8 +84,8 @@ pipx install nested_fit
84
84
 
85
85
  With an NVIDIA GPU, `pipx install "nested_fit[cuda]"` adds the runtime compiler the GPU backend
86
86
  needs; the driver is the only other requirement, no CUDA toolkit. The likelihood then runs on
87
- the GPU when that is faster than the CPU threads together, and on the CPU otherwise, with one
88
- log line saying which. Details and controls in `src/gpu/README.md`.
87
+ the GPU, on at most 8 threads, whenever a startup self-test finds that faster than all the CPU
88
+ threads together, and on the CPU otherwise, with one log line saying which. Details and controls in `src/gpu/README.md`.
89
89
 
90
90
  The `examples/` directory is bundled with the package. After installation you can
91
91
  copy it to a local working area in a couple of ways:
@@ -453,7 +453,7 @@ Examples of use of a legacy function can be found in `examples/data_analysis/aaa
453
453
 
454
454
  ## Present version and history of the past versions
455
455
 
456
- The present version is 5.8.0\
456
+ The present version is 6.0.0\
457
457
  New features:
458
458
  - Asynchronous parallel search of new points: each thread adds its new point to the main loop without waiting for the search of the other threads.
459
459
  This strongly improves the parallel efficiency when the search time of new points is very variable (e.g. Lennard-Jones clusters)
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "nested_fit"
7
- version = "5.8.0.dev133"
7
+ version = "6.0.0.dev134"
8
8
  description = "The nested_fit package."
9
9
  readme = "README.md"
10
10
 
@@ -69,7 +69,7 @@ archs = ["x86_64", "arm64"]
69
69
  archs = ["x86_64"]
70
70
 
71
71
  [tool.setuptools_scm]
72
- fallback_version = "5.8.0.dev133"
72
+ fallback_version = "6.0.0.dev134"
73
73
 
74
74
  [options]
75
75
  python_requires = ">=3.8"
@@ -6,6 +6,8 @@ MODULE MOD_GPU
6
6
  LOGICAL :: gpu_on = .FALSE.
7
7
  INTEGER :: gpu_threads = -1 ! threads 0..gpu_threads-1 evaluate on the device, the rest on the CPU; -1 = all
8
8
  LOGICAL :: gpu_mixed = .FALSE. ! per-term precision: NF_TERM terms in single, the large ones in double
9
+ LOGICAL :: gpu_precision_auto = .FALSE. ! the precision was chosen from the model (search.gpu_precision: auto)
10
+ LOGICAL :: gpu_threads_auto = .FALSE. ! the thread split is left to the self-test (search.gpu_threads: -1)
9
11
  CHARACTER(LEN=16) :: gpu_pref = 'auto' ! the device preference in force: NESTED_FIT_DEVICE, else search.device
10
12
 
11
13
  INTERFACE
@@ -119,6 +121,9 @@ CONTAINS
119
121
  prec = precision_pref
120
122
  CALL GET_ENVIRONMENT_VARIABLE('NESTED_FIT_GPU_PRECISION', env, STATUS=st)
121
123
  IF (st == 0 .AND. LEN_TRIM(env) > 0) prec = env
124
+ gpu_precision_auto = (prec(1:1) == 'a' .OR. prec(1:1) == 'A')
125
+ ! auto: a model that marks its additive terms with NF_TERM asked for per-term precision
126
+ IF (gpu_precision_auto) prec = MERGE('mixed ', 'double', INDEX(c_body, 'NF_TERM') > 0)
122
127
  gpu_mixed = (prec(1:1) == 'm' .OR. prec(1:1) == 'M')
123
128
  CALL nf_gpu_set_precision(TRIM(prec)//c_null_char)
124
129
  IF (nf_gpu_set_function(TRIM(c_body)//c_null_char, TRIM(param_ids)//c_null_char, npar) /= 0) THEN
@@ -129,6 +134,7 @@ CONTAINS
129
134
  gpu_threads = threads_pref
130
135
  CALL GET_ENVIRONMENT_VARIABLE('NESTED_FIT_GPU_THREADS', env, STATUS=st)
131
136
  IF (st == 0) READ(env, *, IOSTAT=st) gpu_threads
137
+ gpu_threads_auto = (gpu_threads < 0)
132
138
  IF (gpu_threads == 0) THEN
133
139
  why = 'gpu_threads = 0'
134
140
  CALL nf_gpu_free()
@@ -19,7 +19,7 @@ MODULE MOD_LIKELIHOOD
19
19
 
20
20
  ! String manipulation
21
21
  USE MOD_STRUTIL
22
- USE MOD_GPU, ONLY: gpu_on, gpu_threads, gpu_mixed, gpu_pref, nf_gpu_loglike, nf_gpu_device_name, GPU_SETUP, C_STR, READ_TEXT_FILE
22
+ USE MOD_GPU, ONLY: gpu_on, gpu_threads, gpu_mixed, gpu_pref, gpu_precision_auto, gpu_threads_auto, nf_gpu_loglike, nf_gpu_device_name, GPU_SETUP, C_STR, READ_TEXT_FILE
23
23
  !$ USE omp_lib, ONLY: omp_get_thread_num
24
24
 
25
25
  !$ USE OMP_LIB
@@ -376,15 +376,12 @@ CONTAINS
376
376
  CALL GPU_SETUP(x(1:n,1), nc(1:n,1), nc(1:n,1), n, like_kind, nth, src, gpu_param_ids, n_par, why, opt_device, opt_gpu_min_points, opt_gpu_threads, opt_gpu_precision)
377
377
  END IF
378
378
  IF (gpu_on) THEN
379
- IF (gpu_threads > 0 .AND. gpu_threads < nth) THEN
380
- WRITE(why, '(a,i0,a,i0,a)') ' on ', gpu_threads, ' of ', nth, ' threads, the others on the CPU'
381
- ELSE
382
- why = ''
383
- END IF
379
+ why = ''
380
+ IF (gpu_precision_auto) why = ', chosen from the model'
384
381
  IF (gpu_mixed) THEN
385
- CALL LOG_MESSAGE('GPU: likelihood on '//TRIM(C_STR(nf_gpu_device_name()))//' (per-term mixed precision: NF_TERM in single, large terms in double)'//TRIM(why))
382
+ CALL LOG_MESSAGE('GPU: '//TRIM(C_STR(nf_gpu_device_name()))//' found; per-term mixed precision (NF_TERM terms in single, the large ones in double'//TRIM(why)//')')
386
383
  ELSE
387
- CALL LOG_MESSAGE('GPU: likelihood on '//TRIM(C_STR(nf_gpu_device_name()))//' (double precision)'//TRIM(why))
384
+ CALL LOG_MESSAGE('GPU: '//TRIM(C_STR(nf_gpu_device_name()))//' found; double precision'//TRIM(why))
388
385
  END IF
389
386
  CALL GPU_SELF_TEST()
390
387
  ELSE
@@ -398,7 +395,8 @@ CONTAINS
398
395
  ! per-term mixed to 1e-6, or the device is refused. Also the first measurement a user sees:
399
396
  ! one evaluation on the device against one CPU thread.
400
397
  REAL(8), DIMENSION(npar) :: p
401
- REAL(8) :: cpu, dev, t_cpu, t_dev, worst, tol
398
+ REAL(8) :: cpu, dev, t_cpu, t_dev, worst, tol, r
399
+ INTEGER, PARAMETER :: streams_max = 8 ! threads the run keeps when the GPU is used: 8 saturate an RTX A4000 in per-term precision (2 do not, 128 are 2.3x slower)
402
400
  INTEGER(8) :: t0, t1, rate
403
401
  INTEGER :: k
404
402
  CHARACTER(LEN=16) :: name
@@ -424,21 +422,45 @@ CONTAINS
424
422
  WRITE(msg, '(a,a,a,es8.1,a,es9.2,a,es9.2,a,f8.1,a)') 'GPU: self-test, ', TRIM(name), ': max relative difference to the CPU ', worst, &
425
423
  '; one evaluation ', t_dev*1d3, ' ms on the device, ', t_cpu*1d3, ' ms on one CPU thread (', t_cpu/t_dev, 'x)'
426
424
  CALL LOG_MESSAGE(TRIM(msg))
427
- ! The decision "install and it decides": with device = auto the card is used only when it
428
- ! beats the CPU threads together. One evaluation per launch costs ~20 us on the host side,
429
- ! so a cheap model on a few thousand points is faster on the cores (measured: every example
430
- ! of the suite), and a heavy one is faster on the card by 20-200x (measured: a 284-term Voigt
431
- ! model on 16 501 points). The ratio of the two self-test timings, against the thread count,
432
- ! is that boundary; search.device = cuda/hip (or NESTED_FIT_DEVICE) forces the card regardless.
433
- IF (TRIM(gpu_pref) == 'auto' .AND. t_cpu/t_dev < DBLE(nth)) THEN
425
+ ! The decision "install and it decides". One launch costs ~20 us on the host side, so a cheap
426
+ ! model on a few thousand points is faster on the cores (measured: every example of the suite)
427
+ ! and a heavy one is faster on the GPU by 20-200x per evaluation (measured: a 284-term Voigt
428
+ ! model on 16 501 points). r = the ratio of the two self-test timings, one evaluation on one
429
+ ! CPU thread over one on the GPU. With search.gpu_threads left to -1:
430
+ ! 4 r < nth the GPU, fed by 8 threads, does not beat the CPU threads together (8 streams
431
+ ! deliver about half their nominal rate on a workstation GPU): not used;
432
+ ! search.device: cuda forces it
433
+ ! otherwise the run keeps MIN(nth, 8) threads, all of them on the GPU. More host threads
434
+ ! only add in-flight evaluations (128 threads on the GPU: 2.3x slower than 8),
435
+ ! and CPU threads beside the GPU threads starve them (8 on the GPU + 120 on the
436
+ ! CPU: 6x slower than 8 alone), both measured on an EPYC 7452 with an RTX A4000.
437
+ ! An explicit gpu_threads is kept as given: that many on the GPU, the others on the CPU.
438
+ r = t_cpu/t_dev
439
+ IF (gpu_threads_auto) THEN
440
+ IF (TRIM(gpu_pref) /= 'auto' .OR. 4d0*r >= DBLE(nth)) THEN
441
+ nth = MIN(nth, streams_max)
442
+ gpu_threads = nth
443
+ ELSE
444
+ gpu_threads = 0
445
+ END IF
446
+ END IF
447
+ IF (gpu_threads == 0) THEN
434
448
  gpu_on = .FALSE.
435
- WRITE(msg, '(a,es9.2,a,es9.2,a,i0,a)') 'GPU: not used (one evaluation ', t_dev*1d3, ' ms on the device vs ', t_cpu*1d3, &
436
- ' ms on one CPU thread: the ', nth, ' CPU threads are faster together; search.device: cuda forces the card)'
449
+ WRITE(msg, '(a,es9.2,a,es9.2,a,f7.1,a,i0,a)') 'GPU: not used (one evaluation ', t_dev*1d3, ' ms on the GPU vs ', t_cpu*1d3, &
450
+ ' ms on one CPU thread, ', r, 'x: fed by 8 threads it does not beat the ', nth, ' CPU threads together; search.device: cuda forces it)'
437
451
  CALL LOG_MESSAGE(TRIM(msg))
438
452
  ELSE IF (worst > tol .OR. worst /= worst) THEN
439
453
  gpu_on = .FALSE.
440
454
  WRITE(msg, '(a,a,a,es8.1,a)') 'GPU: not used (self-test failed: ', TRIM(name), ' precision differs from the CPU by more than ', tol, ' in log L)'
441
455
  CALL LOG_MESSAGE(TRIM(msg))
456
+ ELSE IF (gpu_threads < nth) THEN
457
+ WRITE(msg, '(a,i0,a,i0,a,f7.1,a,i0,a)') 'GPU: used on ', gpu_threads, ' of ', nth, ' threads (one evaluation ', r, &
458
+ 'x one CPU thread); the other ', nth - gpu_threads, ' threads stay on the CPU'
459
+ CALL LOG_MESSAGE(TRIM(msg))
460
+ ELSE
461
+ WRITE(msg, '(a,i0,a,f7.1,a)') 'GPU: used; the run keeps ', nth, ' threads, all on the GPU (one evaluation ', r, &
462
+ 'x one CPU thread; more host threads were measured slower)'
463
+ CALL LOG_MESSAGE(TRIM(msg))
442
464
  END IF
443
465
  END SUBROUTINE GPU_SELF_TEST
444
466
 
@@ -22,12 +22,14 @@ MODULE MOD_OPTIONS
22
22
  ! function, compiled for the device at run time. params[i] is the parameter with npar = i+1.
23
23
  CHARACTER(LEN=512) :: opt_gpu_source = ''
24
24
  ! `search.gpu_threads`: how many of the OpenMP threads evaluate on the device; the others
25
- ! use the CPU, so both are busy. -1 (default) = all of them.
25
+ ! use the CPU, so both are busy. -1 (default): decided by the startup self-test, which keeps
26
+ ! at most 8 threads, all on the GPU, when it uses the GPU (GPU_SELF_TEST).
26
27
  INTEGER :: opt_gpu_threads = -1
27
- ! `search.gpu_precision`: 'double' (default: the CPU's closed forms, the CPU's bits) or
28
- ! 'mixed' (per-term: NF_TERM terms in float, the large ones in double; 7-10x the double
29
- ! rate on consumer and workstation cards). Env NESTED_FIT_GPU_PRECISION overrides.
30
- CHARACTER(LEN=16) :: opt_gpu_precision = 'double'
28
+ ! `search.gpu_precision`: 'auto' (default: 'mixed' when the model marks its terms with
29
+ ! NF_TERM, 'double' otherwise), 'double' (the CPU's closed forms, the CPU's bits) or 'mixed'
30
+ ! (per-term: NF_TERM terms in float, the large ones in double; 7-10x the double rate on
31
+ ! consumer and workstation GPUs). Env NESTED_FIT_GPU_PRECISION overrides.
32
+ CHARACTER(LEN=16) :: opt_gpu_precision = 'auto'
31
33
 
32
34
  CHARACTER(LEN=512) :: opt_cpp_comp_cmd = 'g++ -c -shared -O3 -w -fPIC'
33
35
  CHARACTER(LEN=512) :: opt_f90_comp_cmd = 'gfortran -cpp -c -shared -O3 -w -fPIC -ffree-line-length-0'
@@ -58,7 +58,8 @@ is the same work as writing the Fortran was.
58
58
 
59
59
  **Precision.** `search.gpu_precision` (env `NESTED_FIT_GPU_PRECISION`):
60
60
 
61
- * `double` (default): the CPU's closed forms, the CPU's bits.
61
+ * `auto` (default): `mixed` when the model marks its terms with `NF_TERM`, `double` otherwise.
62
+ * `double`: the CPU's closed forms, the CPU's bits.
62
63
  * `mixed`: per-term precision. A model written with `NF_TERM(multiplier, function, args...)`
63
64
  around its additive terms has each term evaluated in single precision and recomputed in
64
65
  double only when it exceeds a tenth of the data's noise at that point
@@ -70,19 +71,24 @@ is the same work as writing the Fortran was.
70
71
  dependent, and far more than the evidence tolerates.
71
72
 
72
73
  **Threads.** `search.gpu_threads` (env `NESTED_FIT_GPU_THREADS`): how many of the OpenMP
73
- threads evaluate on the device; the others keep the CPU closed forms, so both are busy. -1
74
- (default) sends every thread to the GPU. A workstation GPU serialises the launches of many
75
- host threads: on an RTX A4000 two device threads evaluate 108 times per second where eight
76
- evaluate 83, so `gpu_threads: 2` with the remaining threads on 46 cores is 1.47× the GPU
77
- alone in double; in per-term precision the cores add about a tenth.
74
+ threads evaluate on the GPU; the others keep the CPU closed forms. -1 (default) leaves the choice
75
+ to the startup self-test, from r = one evaluation on one CPU thread over one on the GPU: when
76
+ 4 r < threads the GPU is not used, otherwise the run keeps at most 8 threads, all of them on the
77
+ GPU. Measured on an EPYC 7452 (128 threads) with an RTX A4000, per-term precision, 100 steps of
78
+ the Voigt model: 8 threads on the GPU 26 s; 128 threads on the GPU 60 s (more in-flight
79
+ evaluations, 93 ms per launch); 8 on the GPU and 120 on the CPU over 900 s (the CPU threads starve
80
+ the ones feeding the GPU). An explicit number is kept as given, that many on the GPU and the rest
81
+ on the CPU: `gpu_threads: 2` with the other threads on the cores was 1.47× the GPU alone in double
82
+ precision on an 8-thread host, and is a setting, not a default.
78
83
 
79
84
  **Startup self-test.** When a device is used, the likelihood is evaluated on both backends at
80
85
  three points of the prior box before sampling starts. The log reports the largest relative
81
86
  difference and the time of one evaluation on the device against one CPU thread; above 10⁻⁸
82
87
  in double, or 10⁻⁶ in per-term mixed precision, the device is refused and the run continues
83
88
  on the CPU. A wrong port of a user function cannot reach the evidence. With `device: auto` the
84
- GPU is also refused when one evaluation on it is not faster than the CPU threads together
85
- (a cheap model on a few thousand points: every example of the suite); `device: cuda` forces it.
89
+ GPU is also refused when, fed by 8 threads, it would not beat the CPU threads together, i.e. when
90
+ 4 r < threads (a cheap model on a few thousand points: every example of the suite); otherwise the
91
+ run keeps at most 8 threads, all on the GPU (see Threads); `device: cuda` forces the GPU.
86
92
 
87
93
  One parameter vector per launch: about break-even with a CPU thread at ~1000 data points of a
88
94
  cheap model, growing with data size and with the cost per point. Batching the search's
@@ -97,8 +103,8 @@ its `nf_input.yaml` alone, and `nf_output_res.json` records `input.search.device
97
103
  search:
98
104
  device: auto # auto (default) | cuda | hip | cpu
99
105
  gpu_min_points: 0 # use the GPU only above this many data points
100
- gpu_threads: -1 # threads that evaluate on the device (-1: all), the others on the CPU
101
- gpu_precision: double # double (default) | mixed (per-term, NF_TERM)
106
+ gpu_threads: -1 # -1 (default): the self-test keeps at most 8 threads, all on the GPU; N: N on the GPU, the others on the CPU
107
+ gpu_precision: auto # auto (default: mixed if the model uses NF_TERM) | double | mixed
102
108
  ```
103
109
 
104
110
  Environment variables override the file (useful for sweeps without editing it):
@@ -424,8 +424,8 @@ PROGRAM NESTED_FIT
424
424
  CALL FIELD_FROM_INPUT_CHARACTER(input_config, 'search.device' , opt_device , MANDATORY=.FALSE.) ! 'auto' by default: GPU if present, else CPU
425
425
  CALL FIELD_FROM_INPUT_INTEGER (input_config, 'search.gpu_min_points', opt_gpu_min_points, MANDATORY=.FALSE.) ! 0 by default
426
426
  CALL FIELD_FROM_INPUT_CHARACTER(input_config, 'function.gpu_source' , opt_gpu_source , MANDATORY=.FALSE.) ! device source of a legacy user function
427
- CALL FIELD_FROM_INPUT_INTEGER (input_config, 'search.gpu_threads' , opt_gpu_threads , MANDATORY=.FALSE.) ! -1 by default: every thread uses the device
428
- CALL FIELD_FROM_INPUT_CHARACTER(input_config, 'search.gpu_precision' , opt_gpu_precision, MANDATORY=.FALSE.) ! 'double' by default
427
+ CALL FIELD_FROM_INPUT_INTEGER (input_config, 'search.gpu_threads' , opt_gpu_threads , MANDATORY=.FALSE.) ! -1 by default: the self-test decides
428
+ CALL FIELD_FROM_INPUT_CHARACTER(input_config, 'search.gpu_precision' , opt_gpu_precision, MANDATORY=.FALSE.) ! 'auto' by default
429
429
  CALL FIELD_FROM_INPUT_LOGICAL (input_config, 'search.hard_writing' , hard_writing_parameters , MANDATORY=.FALSE.) ! True by default
430
430
  CALL FIELD_FROM_INPUT_INTEGER (input_config, 'search.max_steps' , maxstep_try , MANDATORY=.NOT.hard_writing_parameters) ! 100000 by default, mandatory if not hard writing parameters
431
431