Giter Club home page Giter Club logo

fortran2018-examples's Introduction

Fortran 2018 Examples

Actions Status

Easy examples of scientific computing with modern, powerful, easy Fortran 2018 standard. Fortran 2018 began as the TS18508 extension, formerly known as Fortran 2015.

Modern Fortran benefits from modern CMake, which supports Fortran features such as

  • submodule
  • preprocessing
  • detecting specific support of Fortran features (so users know their compiler is too old)

Based on widespread compiler support and beneficial features, most new and upgraded Fortran programs should use at least portions of the Fortran 2008 standard.

Prereq

  • Linux: apt install cmake gfortran
  • Mac: brew install gcc cmake
  • Windows MSYS2: pacman -S mingw-w64-x86_64-gcc-fortran mingw-w64-x86_64-cmake

Build

cmake -B build
cmake --build build --parallel

cd build
ctest --output-on-failure

Programs

Each directory has its own README and examples.

  • array/: Array math in modern CMake and Fortran
  • block/: Highly useful block element is demonstrated
  • coarray: modern Fortran is the only major compiled language standard with intrinsic massively parallel arrays.
  • contiguous/: Fortran 2008 contiguous array examples, including Fortran preprocessor with modern CMake.
  • git/ Git tracability
  • mpi:
  • namelist/: Fortran 90 / 2003 Namelist parsing -- native text config files for Fortran
  • openmp/: OpenMP threading exmaples
  • random/: random numbers with modern Fortran

  • io/: modern Fortran File I/O including resolving absolute path

  • real/: Numerous examples dealing with practical features of real floating point numbers, including sentinel NaN and polymorphism.
  • character/: String handling is easy and performant in modern Fortran.
  • standard/: advanced features that can be done with Fortran standard coding
  • submodule: Fortran 2008 and CMake โ‰ฅ 3.12 enable even better large program architecture with submodule
  • system/: system (hardware) functionality accessible via Fortran

Companion libraries and examples

Resources

Fortran standards

Books

Compiler User Guides

Surveys

fortran2018-examples's People

Contributors

scivision 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.