|
21 | 21 | "name": "stderr", |
22 | 22 | "output_type": "stream", |
23 | 23 | "text": [ |
24 | | - "ERROR:2025-12-01 13:56:42,161:jax._src.xla_bridge:487: Jax plugin configuration error: Exception when calling jax_plugins.xla_cuda12.initialize()\n", |
| 24 | + "ERROR:2025-12-01 16:24:48,469:jax._src.xla_bridge:487: Jax plugin configuration error: Exception when calling jax_plugins.xla_cuda12.initialize()\n", |
25 | 25 | "Traceback (most recent call last):\n", |
26 | 26 | " File \"/ext3/miniforge3/lib/python3.12/site-packages/jax/_src/xla_bridge.py\", line 485, in discover_pjrt_plugins\n", |
27 | 27 | " plugin_module.initialize()\n", |
|
50 | 50 | }, |
51 | 51 | { |
52 | 52 | "cell_type": "code", |
53 | | - "execution_count": 3, |
| 53 | + "execution_count": 4, |
54 | 54 | "id": "e6a32b4c-2b9b-44d8-acd8-40d337ff4469", |
55 | 55 | "metadata": {}, |
56 | 56 | "outputs": [], |
|
69 | 69 | "from ABCMB.hyrex import hyrex" |
70 | 70 | ] |
71 | 71 | }, |
| 72 | + { |
| 73 | + "cell_type": "code", |
| 74 | + "execution_count": 15, |
| 75 | + "id": "9b915a2c-c524-4a6d-a8c0-5908b5791719", |
| 76 | + "metadata": {}, |
| 77 | + "outputs": [], |
| 78 | + "source": [ |
| 79 | + "from pytests import accuracy_test" |
| 80 | + ] |
| 81 | + }, |
| 82 | + { |
| 83 | + "cell_type": "markdown", |
| 84 | + "id": "74c70669-5a37-4c9b-98e4-74c4ab562b60", |
| 85 | + "metadata": {}, |
| 86 | + "source": [ |
| 87 | + "## accuracy_test.test_accuracy_checker()" |
| 88 | + ] |
| 89 | + }, |
72 | 90 | { |
73 | 91 | "cell_type": "markdown", |
74 | 92 | "id": "9be5e9c8-6f25-4f5e-9f15-bf9b3b0b81d9", |
|
79 | 97 | }, |
80 | 98 | { |
81 | 99 | "cell_type": "code", |
82 | | - "execution_count": 49, |
| 100 | + "execution_count": 22, |
83 | 101 | "id": "ee2e203f-8066-4223-a354-1d7c0050856c", |
84 | 102 | "metadata": {}, |
85 | | - "outputs": [], |
| 103 | + "outputs": [ |
| 104 | + { |
| 105 | + "data": { |
| 106 | + "text/plain": [ |
| 107 | + "{'A_s': 2.12424e-09,\n", |
| 108 | + " 'Delta_z_reion': 0.5,\n", |
| 109 | + " 'Delta_z_reion_He': 0.5,\n", |
| 110 | + " 'H0': Array(2.19141544e-18, dtype=float64),\n", |
| 111 | + " 'N_nu_massive': 1,\n", |
| 112 | + " 'N_nu_massless': Array(2.00200977, dtype=float64),\n", |
| 113 | + " 'Neff': Array(3.04399998, dtype=float64),\n", |
| 114 | + " 'R_b': Array(0.1475945, dtype=float64),\n", |
| 115 | + " 'R_nu': Array(0.40874594, dtype=float64),\n", |
| 116 | + " 'TCMB0': 0.000234865418,\n", |
| 117 | + " 'T_nu_massive': 0.71611,\n", |
| 118 | + " 'T_nu_massless': Array(0.71636856, dtype=float64, weak_type=True),\n", |
| 119 | + " 'YHe': 0.245,\n", |
| 120 | + " 'h': 0.6762,\n", |
| 121 | + " 'm_nu_massive': Array(0.06, dtype=float64, weak_type=True),\n", |
| 122 | + " 'n_s': 0.9709,\n", |
| 123 | + " 'omega_Lambda': Array(0.30475991, dtype=float64),\n", |
| 124 | + " 'omega_b': 0.0225,\n", |
| 125 | + " 'omega_cdm': 0.1293,\n", |
| 126 | + " 'omega_m': Array(0.15244471, dtype=float64),\n", |
| 127 | + " 'omega_r': Array(4.18259418e-05, dtype=float64),\n", |
| 128 | + " 'z_reion': 11.0,\n", |
| 129 | + " 'z_reion_He': 3.5}" |
| 130 | + ] |
| 131 | + }, |
| 132 | + "execution_count": 22, |
| 133 | + "metadata": {}, |
| 134 | + "output_type": "execute_result" |
| 135 | + } |
| 136 | + ], |
86 | 137 | "source": [ |
87 | 138 | "params = {\n", |
88 | 139 | " 'h': 0.6762,\n", |
|
94 | 145 | " 'YHe': 0.245,\n", |
95 | 146 | " 'TCMB0': 2.34865418e-4,\n", |
96 | 147 | " #'T_nu_massless' : 0.71636,\n", |
97 | | - " #'N_nu_massless' : 2,\n", |
| 148 | + " 'N_nu_massless' : 2,\n", |
98 | 149 | " 'N_nu_massive': 1,\n", |
99 | | - " #'T_nu_massive': 0.71611,\n", |
| 150 | + " 'T_nu_massive': 0.71611,\n", |
100 | 151 | " #'m_nu_massive': 0.06,\n", |
101 | 152 | " \"z_reion\": 11.,\n", |
102 | 153 | " \"Delta_z_reion\": 0.5,\n", |
|
125 | 176 | "\n", |
126 | 177 | "#model = main.Model(user_species=user_species, input_specs=specs, return_PTBG=True, bbn_type=\"linX\")\n", |
127 | 178 | "model = main.Model(user_species=user_species, input_specs=specs, return_PTBG=True)\n", |
128 | | - "#params = eqx.filter_jit(model.add_derived_parameters)(params)\n", |
| 179 | + "params = eqx.filter_jit(model.add_derived_parameters)(params)\n", |
129 | 180 | "#params = model.add_derived_parameters(params)\n", |
130 | | - "#params" |
| 181 | + "params" |
| 182 | + ] |
| 183 | + }, |
| 184 | + { |
| 185 | + "cell_type": "code", |
| 186 | + "execution_count": 66, |
| 187 | + "id": "b834848e-af29-480e-89db-f22e75d2b284", |
| 188 | + "metadata": {}, |
| 189 | + "outputs": [ |
| 190 | + { |
| 191 | + "data": { |
| 192 | + "text/plain": [ |
| 193 | + "Array(0.00611772, dtype=float64)" |
| 194 | + ] |
| 195 | + }, |
| 196 | + "execution_count": 66, |
| 197 | + "metadata": {}, |
| 198 | + "output_type": "execute_result" |
| 199 | + } |
| 200 | + ], |
| 201 | + "source": [ |
| 202 | + "params[\"N_nu_massless\"] * params[\"T_nu_massless\"]**4 / (4./11.)**(4/3)" |
131 | 203 | ] |
132 | 204 | }, |
133 | 205 | { |
|
0 commit comments