Giter Club home page Giter Club logo

oscars's Introduction

OSCARS - Open Source Code for Advanced Radiation Simulation

Build Status Build status

This is the OSCARS developer repository. The main OSCARS website is http://oscars.bnl.gov

Installation - Basic

The easiest way to install OSCARS is:

pip install oscars

That is all you need to do. It is recommended that you also install jupyter, but it is not necessary.

Installation - Intermediate : Python virtualenv

One way to install OSCARS is using a python virtual environment:

# Create virtual env
python3 -m venv oscarsenv

# Activate the oscars conda environment
source oscarsenv/bin/activate

# Install OSCARS
pip install oscars

# Install other useful utilities
pip install numpy
pip install scipy
pip install matplotlib
pip install jupyter

At this point you should be able to run jupyter notebook (not necessairy, but nice)

jupyter notebook

and point your browser to http://localhost:8888/ if it hasn't taken you there already. Next, you are likely ready to try some of the examples on http://oscars.bnl.gov/examples.php

Installation - Intermediate : Conda

One way to install OSCARS is using a conda environment. First:

# Fix for temporary conda bug for some distributions
conda install -n root pyyaml

# Create oscars environment (python=3.6 is optional, but recommended)
conda create --name oscars python=3.6

# Activate the oscars conda environment
source activate oscars

# Install OSCARS
pip install oscars

# Install other useful utilities
pip install numpy
pip install scipy
pip install matplotlib
pip install jupyter

At this point you should be able to run jupyter notebook (not necessairy, but nice)

jupyter notebook

and point your browser to http://localhost:8888/ if it hasn't taken you there already. Next, you are likely ready to try some of the examples on http://oscars.bnl.gov/examples.php

Installation Advanced - GPU Utilities

Compiling for the GPU requires the nvidia compiler nvcc:

Once this is installed you need to download OSCARS and run the following:

make
python setup.py install

The first command will build the gpu library lib/OSCARSSR_Cuda.o and the second will compile the rest of OSCARS and install it. The complete picture for this using conda is given below:

# Install git in your root conda environment (if you don't already have it).
conda install -n root git

# Fix for temporary conda bug for some distributions
conda install -n root pyyaml

# Download OSCARS
git clone https://github.com/dhidas/OSCARS -b 2.1.8

# Create a new "conda environment" and install the required Python packages.
cd OSCARS
conda env create -f environment.yml

# Activate the oscars conda environment
source activate oscars

# Build and install OSCARS with GPU support
make
python setup.py install

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.