Skip to main content

KRATOS Multiphysics ("Kratos") is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.

Project description

Multilevel Monte Carlo Application

MultilevelMonteCarloApplication provides different algorithms, belonging to the Monte Carlo (MC) family, to estimate statistics of scalar and field quantities of interest. The application is designed for running on distributed and high performance computing systems, exploiting both OpenMP and MPI parallel strategies. The application contains several interfaces with external libraries.

Getting started

This application is part of the Kratos Multiphysics Platform. Instructions on how to download, install and run the software in your local machine for development and testing purposes are available for both Linux and Windows systems.

Prerequisites

Build Kratos and make sure to have

add_app ${KRATOS_APP_DIR}/MultilevelMonteCarloApplication

in the compilation configuration, in order to compile the MultilevelMonteCarloApplication application.

Hierarchical Monte Carlo methods

  • Repeatedly generate the random input and solve the associated deterministic problem.
  • Convergence to the exact statistics as the number of realizations grows.
  • Problem under consideration considered as a black-box.
  • Convergence rate independent from stochastic space dimension.

Monte Carlo

  • Monte Carlo (MC) is the reference method in the stochastic analysis of multiphysics problems with uncertainties in the data parameters.
  • Levels of parallelism:
    • Between samples,
    • On each sample at solver level.
  • Hierarchy update:
    • Deterministic,
    • Adaptive.

Multilevel Monte Carlo

  • Multilevel Monte Carlo (MLMC) requires a hierarchy of levels with increasing accuracy to solve the statistical problem. Convergence rate is faster with respect to MC if MLMC hypotheses are satisfied.
  • Computation of a large number of cheap and lower accuracy realizations, while only few expensive high accuracy realizations are run.
    • Low accuracy levels: capture statistical variability,
    • High accuracy levels: capture discretization error.
  • Example of hierarchy of computational grids, showing increasing accuracy levels (by decreasing mesh size):

Solution

  • Levels of parallelism:
    • Between levels,
    • Between samples,
    • On each sample at solver level.
  • Hierarchy update:
    • Deterministic,
    • Adaptive.

Continuation Multilevel Monte Carlo

  • A set of decreasing tolerances is used and updated on the fly to adaptively estimate the hierarchy and run MLMC.
  • Levels of parallelism:
    • Between levels,
    • Between samples,
    • On each sample at solver level.
  • Hierarchy update:
    • Adaptive.

Asynchronous Monte Carlo

  • This algorithm is equivalent to MC, but designed for running in distributed environments. It avoids idle times and keeps at maximum the computational efficiency.
  • Levels of parallelism:
    • Between batches,
    • Between samples,
    • On each sample at solver level.
  • Hierarchy update:
    • Deterministic.

Asynchronous Multilevel Monte Carlo

  • This algorithm is equivalent to MLMC, but designed for running in distributed environments. It avoids idle times and keeps at maximum the computational efficiency.
  • Levels of parallelism:
    • Between batches,
    • Between levels,
    • Between samples,
    • On each sample at solver level.
  • Hierarchy update:
    • Deterministic.

Statistical tools

Power sums

  • Update on the fly of power sums.
  • A power sum of order p is defined as:

    .

h-statistics

  • The h-statistic of order p is the unbiased estimator with minimal variance of the central moment of order p.
  • h-statistic dependencies are

    .

Convergence criteria

  • Convergence is achieved if the estimator of interest reaches a desired tolerance with respect to the true estimator with a given confidence.
  • The failure probability to satisfy (for expected value and MC) is

.

  • Other convergence criteria available:
    • Mean square error,
    • Sample variance criteria (MC only),
    • Higher order (up to the fourth) moments criteria (MC only).

Hierarchy

  • Hierarchy strategies:

    • stochastic adaptive refinement: hierarchy of levels built refining in space, performing solution-oriented adaptive space refinement. The coarsest mesh is shared between all realizations, and for each realization different meshes are generated, accordingly to the random variable. Requires compiling MESHING_APPLICATION.
    • deterministic adaptive refinement: hierarchy of levels built refining in space, performing solution-oriented adaptive space refinement. All meshes are shared between all realizations, and adaptive refinement is done at pre-process, exploiting a user-defined random variable. Requires compiling MESHING_APPLICATION.
    • standard: the user takes care of building the hierarchy, using the strategy he prefers (such as uniform refinement).
  • Metric strategies:

    • geometric error estimate: the analysis of the hessian of the numerical solution controls the mesh refinement.
    • divergence-free error estimate: the analysis of the mass conservation controls the mesh refinement (suitable only for CFD cases). Requires compiling EXAQUTE_SANDBOX_APPLICATION. In progress.

External Libraries

MultilevelMonteCarloApplication makes use of third part libraries. Information about these libraries can be found in their respective pages, which are listed below.

XMC

XMC is a Python library, with BSD 4 license, designed for hierarchical Monte Carlo methods. The library develops the above-mentioned algorithms, statistical tools and convergence criteria. The library presents a natural integration with Kratos, which is XMC default solver. By default, an internal version of the library is used. If one wants to use an external version of the library, the environment variable XMC_BACKEND=external should be set.

PyCOMPSs

PyCOMPSs is the Python library required in order to use task-based programming software COMPSs in a Python environment. By default PyCOMPSs is not required in order to run the application. In case one wants to run using this library, the environment variable EXAQUTE_BACKEND=pycompss must be set. The current version is able to run several thousands of samples at once exploiting PyCOMPSs in distributed systems, maximizing parallelism and computational efficiency. Optimal scalability up to 128 working nodes (6144 CPUs) has been demonstrated with both OpenMP and MPI parallelisms.

Instructions for the installation can be found in the Kratos wiki. To run with runcompss, the environment variable EXAQUTE_BACKEND=pycompss must be set to use the distributed computing capabilities. Additionally, running with runcompss requires to add to the PYTHONPATH the path of the XMC library, that is /path/to/Kratos/applications/MultilevelMonteCarloApplication/external_libraries/XMC. You can add the library to the PYTHONPATH either in the .bashrc file, or directly when running the code using the runcompss key --pythonpath. We refer to the Kratos wiki for details.

Mmg and ParMmg

Mmg is an open source software for simplicial remeshing. It provides 3 applications and 4 libraries. Instructions for installing Mmg can be found in the Kratos wiki. ParMmg is the MPI parallel version of the remeshing library Mmg. Instructions for installing ParMmg can be found in the Kratos wiki.

Scalability

AMC and AMLMC denote the asynchronous Monte Carlo and the asynchronous Multilevel Monte Carlo methods, respectively. Sources: [1] and [4].

Examples

Many examples can be found in the Kratos Multiphysics Examples repository.

License

The MultilevelMonteCarloApplication is OPEN SOURCE. The main code and program structure are available and aimed to grow with the need of any user willing to expand it. The BSD (Berkeley Software Distribution) licence allows to use and distribute the existing code without any restriction, but with the possibility to develop new parts of the code on an open or close basis depending on the developers.

Main References

[1] Tosi, R., Amela, R., Badia, R. M. & Rossi, R. (2021). A Parallel Dynamic Asynchronous Framework for Uncertainty Quantification by Hierarchical Monte Carlo Algorithms. Journal of Scientific Computing. https://doi.org/10.1007/s10915-021-01598-6

[2] Amela, R., Ayoul-Guilmard, Q., Badia, R. M., Ganesh, S., Nobile, F., Rossi, R., & Tosi, R. (2019). ExaQUte XMC. https://doi.org/10.5281/zenodo.3235833

[3] Krumscheid, S., Nobile, F., & Pisaroni, M. (2020). Quantifying uncertain system outputs via the multilevel Monte Carlo method — Part I: Central moment estimation. Journal of Computational Physics. https://doi.org/10.1016/j.jcp.2020.109466

[4] Ejarque, J., Böhm, S., Tosi, R., Núñez, M., & Badia, R. M. (2021). D4.5 Framework development and release. ExaQUte consortium.

Contact

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

KratosMultilevelMonteCarloApplication-9.0.1-cp39-cp39-win_amd64.whl (423.1 kB view details)

Uploaded CPython 3.9 Windows x86-64

KratosMultilevelMonteCarloApplication-9.0.1-cp38-cp38-win_amd64.whl (423.6 kB view details)

Uploaded CPython 3.8 Windows x86-64

KratosMultilevelMonteCarloApplication-9.0.1-cp37-cp37m-win_amd64.whl (423.5 kB view details)

Uploaded CPython 3.7m Windows x86-64

KratosMultilevelMonteCarloApplication-9.0.1-cp36-cp36m-win_amd64.whl (423.4 kB view details)

Uploaded CPython 3.6m Windows x86-64

KratosMultilevelMonteCarloApplication-9.0.0-cp39-cp39-win_amd64.whl (423.1 kB view details)

Uploaded CPython 3.9 Windows x86-64

KratosMultilevelMonteCarloApplication-9.0.0-cp38-cp38-win_amd64.whl (423.6 kB view details)

Uploaded CPython 3.8 Windows x86-64

KratosMultilevelMonteCarloApplication-9.0.0-cp37-cp37m-win_amd64.whl (423.5 kB view details)

Uploaded CPython 3.7m Windows x86-64

KratosMultilevelMonteCarloApplication-9.0.0-cp36-cp36m-win_amd64.whl (423.4 kB view details)

Uploaded CPython 3.6m Windows x86-64

File details

Details for the file KratosMultilevelMonteCarloApplication-9.0.1-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for KratosMultilevelMonteCarloApplication-9.0.1-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 555beebd69c79b23d96018898e3b850957d7ba79048491bb467dd14c0c06982f
MD5 09a2a5ad8b3c08b74b66398bee300652
BLAKE2b-256 9ce73ab7ca538f85beebb92bf68d955a8b8052c5bbe1dd3b4713a2b192fb1736

See more details on using hashes here.

Provenance

File details

Details for the file KratosMultilevelMonteCarloApplication-9.0.1-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for KratosMultilevelMonteCarloApplication-9.0.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 e16a555a127039649c93d40b6dfa24011faa06a3fe357d6af37e370dee93127c
MD5 0a1e054337b71722d27f74ace28f75ab
BLAKE2b-256 9b54b30927e2e06c8001c12955e5d140e0564caff34c079a4f49cecceae6b65a

See more details on using hashes here.

Provenance

File details

Details for the file KratosMultilevelMonteCarloApplication-9.0.1-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for KratosMultilevelMonteCarloApplication-9.0.1-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 494ebfb68fdac85087751a647c98df1221bb9838af532f01eeac48a84bbf7fb2
MD5 84c5b889d5a93932f3a58a5215ae21ea
BLAKE2b-256 e5176b803d4138b1e54fd94665f3a2050c41e4af70f50fca638b9690ecac61b1

See more details on using hashes here.

Provenance

File details

Details for the file KratosMultilevelMonteCarloApplication-9.0.1-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for KratosMultilevelMonteCarloApplication-9.0.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 38a6aa7d197be8ccd863761865bff56de2f3b9ff22e5e9d8ccd2011d3c149341
MD5 dd20e92d59aaab6e79df595d6033a676
BLAKE2b-256 96822c68048589e768b61a06703e39b33c0b812933d762443c6cd645e7955e32

See more details on using hashes here.

Provenance

File details

Details for the file KratosMultilevelMonteCarloApplication-9.0.1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for KratosMultilevelMonteCarloApplication-9.0.1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 d10efb6420ff33dc55f9e3ebd2f67c520677627ad00d8483bd96655991d057bd
MD5 765b362c4d3b193ce8c199e1f753d1a8
BLAKE2b-256 e079c4d3d669d8900cb1e8cacfee38fd7bf325452bfe200a89b4d95a641ce8c0

See more details on using hashes here.

Provenance

File details

Details for the file KratosMultilevelMonteCarloApplication-9.0.1-cp37-cp37m-win_amd64.whl.

File metadata

File hashes

Hashes for KratosMultilevelMonteCarloApplication-9.0.1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 79bba5f1b2fb0950544abf6257a1cd26304d233c4b8c7fb168750f538af69ae3
MD5 3d50cf67a7c400c8c44a3fb6045a4c4a
BLAKE2b-256 2c9e2f7f78eb76a51ad91142cbb76d9302988a6a8fc93460980ad32a27bbfeaf

See more details on using hashes here.

Provenance

File details

Details for the file KratosMultilevelMonteCarloApplication-9.0.1-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for KratosMultilevelMonteCarloApplication-9.0.1-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 f13116033279fe1fbdbea242f170468e7dc22fe4d83dc6da37cda606fba62223
MD5 3a5f905377402e39b11c34c16ab3723a
BLAKE2b-256 3742f609d55f4ef165d11f07d39537c6f4c42084af7a795ffe55b42ec60760dc

See more details on using hashes here.

Provenance

File details

Details for the file KratosMultilevelMonteCarloApplication-9.0.1-cp36-cp36m-win_amd64.whl.

File metadata

File hashes

Hashes for KratosMultilevelMonteCarloApplication-9.0.1-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 1a211a93d0c9306dfcd0ec827549a9306dddf666aa3c5abefa4e175fb0073232
MD5 677b9212fe20c94c21ad76aa3584afcf
BLAKE2b-256 144906a74e922638af61255d828055832aed7cfc97183eadc6060ee10e9edfa2

See more details on using hashes here.

Provenance

File details

Details for the file KratosMultilevelMonteCarloApplication-9.0.1-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for KratosMultilevelMonteCarloApplication-9.0.1-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 e3e74e1366c19fa22703ebad546181993312c2e6628493ed53f9fbf519ab1254
MD5 f2862ebe2198534dd6836e6590715ba3
BLAKE2b-256 ae7427d100ec71ffd73c335f8cef94454fd11fa9d52e76c3c4edaa176118364e

See more details on using hashes here.

Provenance

File details

Details for the file KratosMultilevelMonteCarloApplication-9.0.0-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for KratosMultilevelMonteCarloApplication-9.0.0-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 756f87ce768c96d12b463bb0dfb32ae1e9c67c0ecc54a19c27cf6508ae408dec
MD5 a703f10edd641685c6e24967f3d2f73b
BLAKE2b-256 3e31d69c0a178a494b0f0a454019ad4f0ea40d4984029388a7e369fcbe52c4eb

See more details on using hashes here.

Provenance

File details

Details for the file KratosMultilevelMonteCarloApplication-9.0.0-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for KratosMultilevelMonteCarloApplication-9.0.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 e10cd44e6aa34f5f9abbc97b87799abb152de05e9f37a2b94276e359b364871c
MD5 ed885f122ffcb7298253925c87e0118f
BLAKE2b-256 2c2f9caf96c2be04395763f101c5435cbadaf05b94d3def0aa024fe7d121796d

See more details on using hashes here.

Provenance

File details

Details for the file KratosMultilevelMonteCarloApplication-9.0.0-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for KratosMultilevelMonteCarloApplication-9.0.0-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 cb0c921be8d0c5e9f17192ba3f5a1b4c0bf3271c2534fefa0f631bbff7a1c75c
MD5 a87b12524c49ec9cd21ee613131b5535
BLAKE2b-256 0fe7dacb63a26110bb90418f4ddc24b742e864138b1ff6e7ded1ed2702c94e4d

See more details on using hashes here.

Provenance

File details

Details for the file KratosMultilevelMonteCarloApplication-9.0.0-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for KratosMultilevelMonteCarloApplication-9.0.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 ff29039dc379df74f4dc1bc8794a99ee1470cbc1d9e72eee112ac67e8fae12a0
MD5 43485f7d684283b303206dcab3810678
BLAKE2b-256 b9dc8aeeb33765fe86e29824184b84c515b0c45df1e79f491f5897c42571e3bb

See more details on using hashes here.

Provenance

File details

Details for the file KratosMultilevelMonteCarloApplication-9.0.0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for KratosMultilevelMonteCarloApplication-9.0.0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 2d4ff7043ea5ab7685bf202cdb58bd6fa56929bdc12f71873d1ac1737bfb73d5
MD5 bb48d5aa087d0c97acfb5ead9ad98eb5
BLAKE2b-256 dec400e8ca73aa07b5877aec0115c00a188a6a257bb0425585a9d7d8daf83994

See more details on using hashes here.

Provenance

File details

Details for the file KratosMultilevelMonteCarloApplication-9.0.0-cp37-cp37m-win_amd64.whl.

File metadata

File hashes

Hashes for KratosMultilevelMonteCarloApplication-9.0.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 f1f068d9a043b7fe4895c67781366d105387d257cd83723c4d1772c7cbc484c2
MD5 68d8631ea165aad06cd80f38348ed15e
BLAKE2b-256 3b979e65d57b3895074124a9a5f16fe25e532f17781a623aefbc6a41dc86fd53

See more details on using hashes here.

Provenance

File details

Details for the file KratosMultilevelMonteCarloApplication-9.0.0-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for KratosMultilevelMonteCarloApplication-9.0.0-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 7e599070ef70f0235468af7ef29e753a43521a2626e8b40abcc829a9e32cb667
MD5 018402663acc7027546867e3698e6b00
BLAKE2b-256 a33ff8fe7413dda1b781d752212547ddcce5f00783804c75091e99c677d90965

See more details on using hashes here.

Provenance

File details

Details for the file KratosMultilevelMonteCarloApplication-9.0.0-cp36-cp36m-win_amd64.whl.

File metadata

File hashes

Hashes for KratosMultilevelMonteCarloApplication-9.0.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 f3efac65229336255a0b5901542920d282592e7f533f438b16739efabf3c972e
MD5 be5b0ecce54ba4eff918d26ae5b245d3
BLAKE2b-256 d67fa906e577ea71b740e2609f7595fba2ee1536d78c4a6d08076ef6a633ae80

See more details on using hashes here.

Provenance

File details

Details for the file KratosMultilevelMonteCarloApplication-9.0.0-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for KratosMultilevelMonteCarloApplication-9.0.0-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 2f7189e7bbd41a04c3080576d62662398d69b3cd3466c4dacc8a2cd621e7f3e4
MD5 bb2489b6b7a2a1c18b5c670e2a8b9002
BLAKE2b-256 c9fe171e70495dda214f9898326a9951b5a0c0b295fef2a4e78407bcb804c2c6

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page