All Projects → N3PDF → vegasflow

N3PDF / vegasflow

Licence: Apache-2.0 License
VegasFlow: accelerating Monte Carlo simulation across multiple hardware platforms

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to vegasflow

lattice mc
Lattice gas Monte Carlo simulation code
Stars: ✭ 24 (+26.32%)
Mutual labels:  monte-carlo
tiny-path
An instructive one-file Ruby path tracer
Stars: ✭ 53 (+178.95%)
Mutual labels:  monte-carlo
websites
🔗 Effective Websites Collections
Stars: ✭ 55 (+189.47%)
Mutual labels:  efficiency
pmh-tutorial
Source code and data for the tutorial: "Getting started with particle Metropolis-Hastings for inference in nonlinear models"
Stars: ✭ 23 (+21.05%)
Mutual labels:  monte-carlo
FormTracer
A Mathematica Tracing Package Using FORM
Stars: ✭ 16 (-15.79%)
Mutual labels:  efficiency
Galaxia-Runtime
Galaxy generator for Unity 3D, with Custom Particle Distributors, DirectX 11 Particles and Highly customization, curve driven Generation.
Stars: ✭ 36 (+89.47%)
Mutual labels:  gpu-acceleration
environments
Determined AI public environments
Stars: ✭ 22 (+15.79%)
Mutual labels:  gpu-acceleration
rbcuda
CUDA bindings for Ruby
Stars: ✭ 57 (+200%)
Mutual labels:  gpu-acceleration
Birch
A probabilistic programming language that combines automatic differentiation, automatic marginalization, and automatic conditioning within Monte Carlo methods.
Stars: ✭ 80 (+321.05%)
Mutual labels:  monte-carlo
Mathematical-Modeling
A sharing of the learning process of mathematical modeling 数学建模常用工具模型算法分享:数学建模竞赛优秀论文,数学建模常用算法模型,LaTeX论文模板,SPSS工具分享。
Stars: ✭ 30 (+57.89%)
Mutual labels:  monte-carlo
GOMC
GOMC - GPU Optimized Monte Carlo is a parallel molecular simulation code designed for high-performance simulation of large systems
Stars: ✭ 41 (+115.79%)
Mutual labels:  monte-carlo
dpnp
NumPy drop-in replacement for Intel(R) XPUs
Stars: ✭ 42 (+121.05%)
Mutual labels:  gpu-acceleration
Obsidian
Obsidian Language Repository
Stars: ✭ 38 (+100%)
Mutual labels:  gpu-acceleration
mcx
Monte Carlo eXtreme (MCX) - GPU-accelerated photon transport simulator
Stars: ✭ 77 (+305.26%)
Mutual labels:  monte-carlo
mm-bp-snn
No description or website provided.
Stars: ✭ 30 (+57.89%)
Mutual labels:  gpu-acceleration
rulid.rs
Rust Universally Unique Lexicographically Sortable Identifier
Stars: ✭ 40 (+110.53%)
Mutual labels:  efficiency
pytorch-gpu-data-science-project
Template repository for a Python 3-based (data) science project with GPU acceleration using the PyTorch ecosystem.
Stars: ✭ 16 (-15.79%)
Mutual labels:  gpu-acceleration
neworder
A dynamic microsimulation framework for python
Stars: ✭ 15 (-21.05%)
Mutual labels:  monte-carlo
pyanime4k
An easy way to use anime4k in python
Stars: ✭ 80 (+321.05%)
Mutual labels:  gpu-acceleration
grand
A Python module for carrying out GCMC insertions and deletions of water molecules in OpenMM.
Stars: ✭ 23 (+21.05%)
Mutual labels:  monte-carlo

DOI cpc

Tests Documentation Status

VegasFlow

VegasFlow is a Monte Carlo integration library written in Python and based on the TensorFlow framework. It is developed with a focus on speed and efficiency, enabling researchers to perform very expensive calculation as quick and easy as possible.

Some of the key features of VegasFlow are:

  • Integrates efficiently high dimensional functions on single (multi-threading) and multi CPU, single and multi GPU, many GPUs or clusters.

  • Compatible with Python, C, C++ or Fortran.

  • Implementation of different Monte Carlo algorithms.

Documentation

The documentation for VegasFlow is available at vegasflow.readthedocs.io.

Installation

Anaconda-Server Badge AUR

The package can be installed with pip:

python3 -m pip install vegasflow

as well as conda, from the conda-forge channel:

conda install vegasflow -c conda-forge

If you prefer a manual installation you can clone the repository and run:

git clone https://github.com/N3PDF/vegasflow.git
cd vegasflow
python setup.py install

or if you are planning to extend or develop the code just use:

python setup.py develop

Examples

A number of examples (basic integration, cuda, external tools integration) can be found in the examples folder. A more detailed description can be found in the documention.

Below you can find a minimal workflow for using the examples provided with VegasFlow:

Firstly, one can install any extra dependencies required by the examples using:

pip install .[examples]

Minimal Working Example

from vegasflow import vegas_wrapper
import tensorflow as tf

def integrand(x, **kwargs):
    """ Function:
       x_{1} * x_{2} ... * x_{n}
       x: array of dimension (events, n)
    """
    return tf.reduce_prod(x, axis=1)

dimensions = 8
iterations = 5
events_per_iteration = int(1e5)
vegas_wrapper(integrand, dimensions, iterations, events_per_iteration, compilable=True)

Please feel free to open an issue if you would like some specific example or find any problems at all with the code or the documentation.

Citation policy

If you use the package please cite the following paper and zenodo references:

    @article{Carrazza:2020rdn,
        author = "Carrazza, Stefano and Cruz-Martinez, Juan M.",
        title = "{VegasFlow: accelerating Monte Carlo simulation across multiple hardware platforms}",
        eprint = "2002.12921",
        archivePrefix = "arXiv",
        primaryClass = "physics.comp-ph",
        reportNumber = "TIF-UNIMI-2020-8",
        doi = "10.1016/j.cpc.2020.107376",
        journal = "Comput. Phys. Commun.",
        volume = "254",
        pages = "107376",
        year = "2020"
    }


    @software{vegasflow_package,
        author       = {Juan Cruz-Martinez and
                        Stefano Carrazza},
        title        = {N3PDF/vegasflow: vegasflow v1.0},
        month        = feb,
        year         = 2020,
        publisher    = {Zenodo},
        version      = {v1.0},
        doi          = {10.5281/zenodo.3691926},
        url          = {https://doi.org/10.5281/zenodo.3691926}
    }
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].