Giter Club home page Giter Club logo

cholla's Introduction

CHOLLA

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

Getting started

This is the stable branch of the Cholla code. Cholla is designed to be run using NVIDIA GPUs, and can be run in serial mode using one GPU or with MPI.

An example makefile is included in this directory. After downloading the code, you should be able to configure it for your machine by modifying the makefile appropriately.

Configuration Notes

Most of the configuration options available in Cholla are selected by commenting/uncommenting the appropriate line within the makefile, e.g. single vs double precision, output format, the reconstruction method, Riemann solver, integrator, and cooling. The entire code must be recompiled any time you change the configuration.

A few options must be specified on the 'FLAGS' line in the makefile. These include the h correction (-DH_CORRECTION), dual energy (-DDE), the static gravity module (-DSTATIC_GRAV), and the passive scalar flag (-DSCALAR). It is strongly recommended that you include the dual energy flag when cooling is turned on.

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

./cholla tests/1D/Sod.txt

in the directory with the cholla binary. Some output will be generated in the terminal, and output files will be written in the directory specified in the input parameter file.

To run Cholla in parallel mode, the CHOLLA_MPI flag in the makefile must be uncommented. Then you can run using

mpirun -np 4 ./cholla tests/1D/Sod.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).

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

Other Notes

Cholla can be run without GPUs by commenting out CUDA in the makefile, but this configuration is not recommended. Because Cholla was designed with GPUs in mind, the CPU performance is lackluster at best. In addition, some of the configuration options are not available in the non-CUDA mode (and warnings are not always included).

When running tests 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.

In practice, we have found the Van Leer integrator to be the most stable. Cholla is set to run with a default CFL coefficient of 0.3, but this can be changed within the grid initialization function.

Currently, Cholla is not designed to be able to run very large (>1e6) 1 dimensional problems. If this is a functionality you are interested in, please let us know.

cholla's People

Contributors

evaneschneider avatar brantr avatar brantr-test avatar

Watchers

Tim Waters 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.