Skip to content

tcadsoftware/charon

Repository files navigation

Charon | tcad-charon

Charon is an open-source semiconductor device modeling code, widely referred to as a TCAD (technology computer-aided design) code, developed at Sandia National Laboratories. It is written in C++ and relies on another Sandia open-source project, Trilinos, for supporting code, such as nonlinear and linear solvers, finite-element and finite-volume libraries, I/O, etc. In addition to running on most Linux-based computers, Charon also supports simulation of extremely large problems on massively parallel computing systems that support the MPI standard.

Contents

  1. Getting Up and Running with Charon
    1. Git Instruction
    2. Git LFS
    3. Set Up your Compiler Toolchain
    4. Clone the Repositories
    5. Configure, Build, and Test
    6. Updating Charon
  2. Where to Ask Questions
  3. Contributing to Charon
  4. License

Getting Up and Running with Charon

Git Instruction

Charon uses the git version control system. If you are unfamiliar with how to use git and GitLab, the following resources will likely be beneficial:

↑ Contents

Git LFS

Charon also uses git LFS in many of its repositories.

You must have git LFS installed and configured on your machine before you'll be able to work with Charon.

Visit this wiki page to read up on what it is, how to install it, and how to use it.

↑ Contents

Set Up your Compiler Toolchain

Center 1400's Software Engineering Maintenance and Support group (SEMS) provides almost all the compilers and third-party libraries (TPLs) that Charon requires. These are now widely available on Sandia machines, including the SON, SRN, CEE LAN and HPC. This is our preferred standardized source for TPLs and they are consistent with our testing environment. See this page for instructions on how to gain access to the SEMS modules, and if you need help, contact the SEMS team for assistance.

Once you have access to the modules, you'll need to load the following:

  • a compiler (gcc, intel, clang)
  • OpenMPI
  • CMake
  • Python
  • Boost
  • HDF5
  • NetCDF

↑ Contents

Clone the Repositories

Getting all the Charon repositories set up in the right places is mostly automated. First, make sure you have SSH keys setup on cee-gitlab by following these instructions

Next clone this repository with

cd <someBaseDirectory>
git clone git@cee-gitlab.sandia.gov:Charon/tcad-charon

and then run the setup script with

cd tcad-charon
./scripts/setup

Follow the prompts as the script sets everything up for you. If you accept the default build directory location, you should have the following directory structure:

<someBaseDirectory>/ # a.k.a. ${WORKSPACE}
  build/
    configure
    tcad-charon/
  tcad-charon/
    ...
    docs/
    ...
    src/
    test/
      heavyTests/
      heavyTestsOUO/
      nightlyTests/
      nightlyTestsOUO/
      unitTests/
    ...
    Trilinos/

↑ Contents

Configure, Build, and Test

To configure Charon cd to a build directory, either the one that was created above or one of your own. It is generally a good idea to create another subdirectory utilizing a name representative of the build you will be performing. For example, if you're using the GNU compilers and building with debug support

cd ../build
mkdir gnu.dbg
cd gnu.dbg

You can then configure with

../../tcad-charon/scripts/build/all/build_charon.py

If the configure is successful, you can build with

make -j <numProcs>

Assuming the build is successful, you can run the test suite with

ctest -j <numProcs> -L nightly

additionally, if you build a debug version you'll want to run ctest like

ctest -j <numProcs> -L nightly -LE debugexclude

For futher details on the charon build script, build_charon.py, see its associated wiki page.

↑ Contents

Updating Charon

Any time you need to grab the latest from all the Charon repositories:

cd path/to/tcad-charon
gitdist checkout develop
gitdist pull

The gitdist command will run those git commands across all of Charon's repositories. For more details on what it is and how to use it, see this wiki page.

↑ Contents

Where to Ask Questions

If you need help with Charon, feel free to ask questions by creating an issue. Select the ~Question issue template, and that will pre-populate the Description field, giving you instructions on submitting the issue.

↑ Contents

Contributing to Charon

If you're interested in contributing to Charon, we welcome your collaboration. Please read our contributing guidelines for details on our workflow, submitting merge requests, etc.

↑ Contents

License

See Copyright.txt.

↑ Contents