Coder Social home page Coder Social logo

bcaddy / cholla Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cholla-hydro/cholla

1.0 0.0 0.0 21.8 MB

A GPU-based hydro code

Home Page: https://github.com/cholla-hydro/cholla/wiki

License: MIT License

C++ 41.33% Cuda 35.09% C 1.86% Python 2.13% Makefile 0.24% Shell 0.73% Jupyter Notebook 18.55% Dockerfile 0.07%

cholla's Introduction

Build & Lint Code Formatting

CHOLLA

A 3D GPU-based hydrodynamics code (Schneider & Robertson, ApJS, 2015).

cholla_logo.mp4

Getting started

This is the stable branch of the Cholla hydrodynamics code.

Cholla is designed to be run using (AMD or NVIDIA) GPUs, and can be run in serial mode using one GPU or with MPI for multiple GPUs.

See the Wiki associated with this repository for more details.

Configuration Notes

Most of the configuration options available in Cholla are selected by commenting/uncommenting the appropriate line in a make.type file or by setting environment variables in a make.host file. A Makefile is included in the top level directory, but this Makefile is not intended to be modified directly. Instead, after downloading the code, you should be able to configure it for your machine by creating a build script based on one of the make.host examples in the builds directory (see the wiki for more details). Examples of configurations that require edits to a make.type file include single vs double precision, output format, the reconstruction method, Riemann solver, integrator, and cooling. Examples of configurations that require edits to a make.host file include library paths, compiler options, and gpu-enabled MPI. The entire code must be recompiled any time you change the configuration. For more information on the various options, see the "Makefile" page of the wiki.

Running Cholla

To run the code after it is compiled, you must supply an input file with parameters and a problem that matches a function in the initial_conditions file. For example, to run a 1D Sod Shock Tube test, you would type

./bin/cholla.[host].hydro examples/1D/Sod.txt

in the directory with the cholla binary (where [host] depends on your machine name). Some output will be generated in the terminal, and output files will be written in the directory specified in the input parameter file. More information on input parameters can be found on the "Input File" page of the wiki.

To run Cholla in parallel mode, the CHOLLA_MPI macro must be defined at compile time, by including it in the build script (see make.type.hydro for an example). Then you can run using a command like the following:

srun -n4 ./cholla.[host].hydro examples/3D/sound_wave.txt

Each process will be assigned a GPU. Cholla cannot be run with more processes than available GPUs, so MPI mode is most useful on a cluster (or for testing parallel behavior with a single process). Note that more recent AMD devices have 2 GPUs (or GCDs) per accelerator device, so you can run with 2x the number of MPI tasks.

More information about compiling and running Cholla can be found in the wiki associated with this repository.

Other Notes

When running in fewer than 3 dimensions, Cholla assumes that the X direction will be used first, then the Y, then Z. This is to say, in 1D nx must always be greater than 1, and in 2D nx and ny must be greater than 1.

cholla's People

Contributors

alwinm avatar bcaddy avatar brantr avatar brantr-test avatar bvillasen avatar evaneschneider avatar evazlimen avatar helenarichie avatar mabruzzo avatar ojwg avatar reubendb avatar ryarza avatar trey-ornl avatar wmwv avatar

Stargazers

 avatar

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.