From 778aa6feb23258f148f7c4eacc86c7e828613a26 Mon Sep 17 00:00:00 2001 From: Deaglan Bartlett Date: Wed, 16 Apr 2025 14:36:34 +0200 Subject: [PATCH] Minor change to config reading --- allocation_stats_0.txt | 5 +++++ example0.py | 10 +++++----- fft_wisdom | 2 ++ timing_stats_0.txt | 7 +++++++ 4 files changed, 19 insertions(+), 5 deletions(-) create mode 100644 allocation_stats_0.txt create mode 100644 fft_wisdom create mode 100644 timing_stats_0.txt diff --git a/allocation_stats_0.txt b/allocation_stats_0.txt new file mode 100644 index 0000000..fe5dea4 --- /dev/null +++ b/allocation_stats_0.txt @@ -0,0 +1,5 @@ +Memory still allocated at the end: 0 MB + +Statistics per context (name, allocated, freed, peak) +====================== + diff --git a/example0.py b/example0.py index 8d5b6c4..c141c1e 100644 --- a/example0.py +++ b/example0.py @@ -55,12 +55,12 @@ class MyLikelihood(borg.likelihood.BaseLikelihood): # Read the ini file self.ini_fname = ini_fname - config = configparser.ConfigParser() - config.read(ini_fname) - self.N = [int(config['system'][f'N{i}']) for i in range(3)] # Number of grid points per side - self.L = [float(config['system'][f'L{i}']) for i in range(3)] # Box size lenght Mpc/h + self.config = configparser.ConfigParser() + self.config.read(ini_fname) + self.N = [int(self.config['system'][f'N{i}']) for i in range(3)] # Number of grid points per side + self.L = [float(self.config['system'][f'L{i}']) for i in range(3)] # Box size lenght Mpc/h - self.sigma_dens = float(config['mock']['sigma_dens']) # Density scatter + self.sigma_dens = float(self.config['mock']['sigma_dens']) # Density scatter myprint(f"Likelihood initialized with {self.N} grid points and box size {self.L} Mpc/h") super().__init__(fwd, self.N, self.L) diff --git a/fft_wisdom b/fft_wisdom new file mode 100644 index 0000000..4cb1851 --- /dev/null +++ b/fft_wisdom @@ -0,0 +1,2 @@ +(fftw-3.3.10 fftw_wisdom #xb400f3dc #xe7b0abe3 #xf6045330 #xbdf50fd0 +) diff --git a/timing_stats_0.txt b/timing_stats_0.txt new file mode 100644 index 0000000..47a0088 --- /dev/null +++ b/timing_stats_0.txt @@ -0,0 +1,7 @@ +ARES version 6b1404bfd8011f03ee1b8635275f68d14d16bef3 modules + +Cumulative timing spent in different context +-------------------------------------------- +Context, Total time (seconds) + + [/home/bartlett/borg/libLSS/physics/forwards/adapt_generic_bias.cpp]void {anonymous}::bias_registrator() 1 8.1504e-05