CliMA / CliMA/CalibrateEmulateSample.jl

Multithreading in Emulation/MCMC

Open
#200 2 comments 0 reactions 2 assignees Claimed by @odunbar View on GitHub
enhancement
Dominant language
Julia
Stars
90
Forks
16
PR merge metrics
No merged PRs in 30d

Description

## Issue
Easy gains in MCMC, by using multithreading within each step (and calling e.g. `julia --project -t 8 script.jl`) . For GP (and scalar RF) implementations,
- the prediction runs a loop over the scalar-valued models.
- the training stage also runs a loop over the scalar-valued models. (Here it may require extra memory management)

# Suggestion
1. For MCMC, add the decorator `Threads.@threads for i=1:M` to the loop https://github.com/CliMA/CalibrateEmulateSample.jl/blob/bf3df405753033e852b91c19d5cb11470dfdc91f/src/GaussianProcess.jl#L197-L199
This will increase speed of prediction within MCMC by e.g. 8x

3. For decorrelated problems, (i.e. GP and scalar RF) one can similarly train the models with such loop decorations.
This will increase the speed of training by e.g. 8x

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.