Giter Club home page Giter Club logo

stella's Introduction

stella

Github Actions badge

stella solves the gyrokinetic-Poisson system of equations in the local limit using an operator-split, implicit-explicit numerical scheme. It is capable of evolving electrostatic fluctuations with fully kinetic electrons and an arbitrary number of ion species in general magnetic geometry, including stellarators.

Dependencies

stella requires MPI, and has several optional dependencies:

  • netCDF Fortran
  • FFTW3
  • LAPACK

Installation

There are two ways to build stella: with CMake (experimental) or with plain make.

CMake

Note: If you have previously built stella with plain make you must run make clean before attempting to build with CMake, or the existing built objects will interfere with the CMake build.

Building stella with CMake requires CMake >= 3.16. You can download the latest version from the CMake website, but it is often easier to install with pip:

pip install cmake

Building stella is then a matter of first configuring the build:

cmake . -B build

and then building proper:

cmake --build build

You may need to pass a few flags to the first cmake command to tell it where to find some dependencies:

cmake . -B build \
  -DnetCDFFortran_ROOT=/path/to/netcdf/fortran
  -DFFTW_ROOT=/path/to/fftw

There are a few build options:

  • STELLA_ENABLE_LAPACK: Enable LAPACK (default: on)
  • STELLA_ENABLE_FFT: Enable FFTs (default: on)
  • STELLA_ENABLE_NETCDF: Enable NetCDF (default: on)
  • STELLA_ENABLE_DOUBLE: Promotes precisions of real and complex to double (default: on)
  • STELLA_ENABLE_LOCAL_SPFUNC: Enable local special functions" (default: off)
  • STELLA_ENABLE_NAGLIB: Use the NAG library (default: off)
  • STELLA_ENABLE_POSIX: Enable POSIX functions for command line functionality (default: off)
  • STELLA_ENABLE_F200X: Enable use of F2003/F2008 functionality (default: on)

You can turn these on or off with -D<option name>=ON/OFF. You can get a complete list of options by running the following in a build directory:

cmake -LH

Makefiles

The other build system uses plain make:

  1. Set GK_SYSTEM='system', with system replaced by the appropriate system on which you are running. See the Makefiles directory for a list of supported systems.
  2. Optionally, set the following environment variables to override the locations in the GK_SYSTEM Makefile:
    • FFTW_LIB_DIR: directory containing libfftw3
    • FFTW_INC_DIR: directory including fftw3.f
    • NETCDF_LIB_DIR: directory containing libnetcdff
    • NETCDF_INC_DIR: directory including netcdf.inc
  3. Set the environment variable MAKEFLAGS=-IMakefiles, or set -IMakefiles when you run make
  4. Run make

For example, to compile on Ubuntu:

# using bash:
export GK_SYSTEM=gnu_ubuntu
export MAKEFLAGS=-IMakefiles
make

# or in one line:
make -IMakefiles GK_SYSTEM=gnu_ubuntu

stella's People

Contributors

densto avatar mabarnes avatar zedthree avatar hannethienpondt avatar d7919 avatar antoniog-jerez avatar alexvboe avatar jregana avatar sstroteich avatar jfparisi avatar landreman avatar

stella's Issues

When linking mini_libstell.a compiler flags are not propagated

If running make mini_libstell.a it seems that F90FLAGS are not picked up by the sub-make (unlike the similar make vmec which does pick up these flags). A slightly related issue is that make vmec builds test_vmec_to_stella_geometry_interface but this doesn't pass the compiler flags at the link stage. This can cause issues when using certain flags such as -fsanitize=address or -flto which are required at both compile and link time.

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.