Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pack all model matrices in a single struct #112

Merged
merged 1 commit into from
Jul 13, 2020
Merged

Conversation

giordano
Copy link
Member

@giordano giordano commented Jul 3, 2020

This is a draft because names will likely change (they aren't really "parameters")

@giordano giordano changed the title Pack all model parametres in a single struct Pack all model matrices in a single struct Jul 3, 2020
@giordano giordano marked this pull request as ready for review July 3, 2020 15:51
@giordano giordano requested a review from tkoskela July 3, 2020 15:51
@tkoskela
Copy link
Member

tkoskela commented Jul 10, 2020

Salvaging these from Slack history. Benchmarks run on Julia v1.5.0-rc1.0

parameters.yaml:

nprt: 1000
# no of particles
x_length: 400.0e3
y_length: 400.0e3
# total area is 400kmx400km
nx: 100
ny: 100
# dx is 4km
# dy is 4km
station_filename: "station_test.txt"
nobs: 14
n_time_step: 10
n_integration_step: 40
# 40 finite difference steps per data assimilation step
time_step: 4.0
# time for each assimilation step
obs_noise_std: 0.3
# std in metres for wave height observation
nu: 2.5
lambda: 10.0e3
sigma: 0.1
# parameters for the background noise
nu_initial_state: 2.5
lambda_initial_state: 10.0e3
sigma_initial_state: 0.0001
verbose: true
# save results in file named tdac.h5
random_seed: 6768
enable_timers: true

station_test.txt:

# co-ordinates in metres
# 1st set: spread diagonally around 104km, 104km
56.0e3, 152.0e3
72.0e3, 136.0e3
88.0e3, 120.0e3
104.0e3, 104.0e3
120.0e3, 88.0e3
136.0e3, 72.0e3
152.0e3, 56.0e3
# 2nd set: spread diagonally around 136km, 136km
88.0e3, 184.0e3
104.0e3, 168.0e3
120.0e3, 152.0e3
136.0e3, 136.0e3
152.0e3, 120.0e3
168.0e3, 104.0e3
184.0e3, 88.0e3

master:

────────────────────────────────────────────────────────────────────────────────
                                        Time                   Allocations      
                                ──────────────────────   ───────────────────────
       Tot / % measured:              145s / 100%             532MiB / 100%     

Section                 ncalls     time   %tot     avg     alloc   %tot      avg
────────────────────────────────────────────────────────────────────────────────
Particle State Update       10    70.7s  48.8%   7.07s   5.96MiB  1.12%   610KiB
Process Noise               10    64.9s  44.8%   6.49s   9.06KiB  0.00%     928B
Initialization               1    7.14s  4.93%   7.14s    515MiB  96.8%   515MiB
State Copy                  10    1.40s  0.96%   140ms      960B  0.00%    96.0B
Particle Variance           11    343ms  0.24%  31.2ms   1.55KiB  0.00%     144B
Particle Mean               11    290ms  0.20%  26.3ms   1.03KiB  0.00%    96.0B
True State Update           10   81.6ms  0.06%  8.16ms   4.22KiB  0.00%     432B
IO                          14   35.4ms  0.02%  2.53ms   8.37MiB  1.57%   612KiB
Observations                20   13.8ms  0.01%   690μs   2.74MiB  0.52%   140KiB
Weights                     10   2.29ms  0.00%   229μs     0.00B  0.00%    0.00B
Resample                    10    156μs  0.00%  15.6μs   79.4KiB  0.01%  7.94KiB
MPI Scatter                 10    141μs  0.00%  14.1μs   2.03KiB  0.00%     208B
MPI Gather                  20   87.8μs  0.00%  4.39μs   2.34KiB  0.00%     120B
────────────────────────────────────────────────────────────────────────────────

this PR:

────────────────────────────────────────────────────────────────────────────────
                                        Time                   Allocations      
                                ──────────────────────   ───────────────────────
       Tot / % measured:              144s / 100%             532MiB / 100%     

Section                 ncalls     time   %tot     avg     alloc   %tot      avg
────────────────────────────────────────────────────────────────────────────────
Particle State Update       10    70.8s  49.2%   7.08s   5.96MiB  1.12%   610KiB
Process Noise               10    63.7s  44.3%   6.37s   9.06KiB  0.00%     928B
Initialization               1    7.20s  5.01%   7.20s    515MiB  96.8%   515MiB
State Copy                  10    1.38s  0.96%   138ms      960B  0.00%    96.0B
Particle Variance           11    326ms  0.23%  29.6ms   1.55KiB  0.00%     144B
Particle Mean               11    278ms  0.19%  25.3ms   1.03KiB  0.00%    96.0B
True State Update           10   80.1ms  0.06%  8.01ms   4.22KiB  0.00%     432B
IO                          14   35.3ms  0.02%  2.52ms   8.37MiB  1.57%   612KiB
Observations                20   13.7ms  0.01%   685μs   2.74MiB  0.52%   140KiB
Weights                     10   1.97ms  0.00%   197μs     0.00B  0.00%    0.00B
Resample                    10    168μs  0.00%  16.8μs   79.4KiB  0.01%  7.94KiB
MPI Scatter                 10    137μs  0.00%  13.7μs   2.03KiB  0.00%     208B
MPI Gather                  20   82.9μs  0.00%  4.14μs   2.34KiB  0.00%     120B
────────────────────────────────────────────────────────────────────────────────

@giordano giordano merged commit 7e1e4a2 into master Jul 13, 2020
@giordano giordano deleted the mg/model-params branch July 13, 2020 11:10
@giordano giordano mentioned this pull request Jul 17, 2020
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants