Skip to content

Latest commit

 

History

History
78 lines (54 loc) · 1.71 KB

CONTRIBUTING.md

File metadata and controls

78 lines (54 loc) · 1.71 KB

Contributing to fxarray

Thank you for your interest in contributing to fxarray! This document provides guidelines for building, testing, and submitting changes.

Getting Started

Prerequisites

  • Fortran compiler (gfortran >= 11)
  • C and C++ compilers
  • CMake >= 3.18
  • NetCDF-Fortran (via pkg-config: netcdf-fortran)
  • HDF5 with Fortran bindings
  • Kokkos (CMake package)

Optional

  • MPI (for parallel computing)
  • fpm (for alternative lightweight builds)

Build Environment

We recommend using the Spack environment unistate to avoid ABI mismatches between system and Spack-provided HDF5/NetCDF libraries.

Building with CMake

cmake -B build -S .
cmake --build build -j$(nproc)

Parallel builds

cmake -B build-mpi -S . -DUSE_MPI=ON
cmake --build build-mpi -j$(nproc)

Running Tests

cd build && ctest --output-on-failure

Run a single test:

cd build && ctest -R test_Dataset --output-on-failure

Building with fpm

fpm builds the core Fortran API (Kokkos GPU backends require CMake):

fpm test --compiler gfortran

Code Style

  • All functionality lives in modules with implicit none and private
  • Only expose API via public
  • Type Foo lives in module Foo_Mod
  • Use select type for polymorphic Data_Buffer dispatch
  • Call destroy() methods for cleanup in tests

Submitting Changes

  1. Fork the repository and create a feature branch
  2. Make your changes with clear, focused commits
  3. Ensure all tests pass with both CMake and fpm
  4. Update documentation if your change affects user-facing behavior
  5. Open a Pull Request with a clear description

Questions?

Open a GitHub Issue for questions, bug reports, or feature requests.