Skip to content

Commit

Permalink
Single and double precision documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
scrasmussen committed Mar 28, 2024
1 parent 49d0f63 commit ee00840
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 5 deletions.
13 changes: 10 additions & 3 deletions scm/doc/TechGuide/chap_quick.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Obtaining Code
The source code for the SCM, CCPP, and their required components are provided through GitHub.
The latest release branch contains the tested and supported version for
general use, while the development branch (``main``) contains the latest
developer code, but may not be as stable or consistent with existing documentation.
developer code, but may not be as stable or consistent with existing documentation.
Instructions for using either option are discussed here.

Release Code
Expand Down Expand Up @@ -127,7 +127,7 @@ System Requirements, Libraries, and Tools
-----------------------------------------

The source code for the SCM and CCPP components is in the form of
programs written in FORTRAN 90 (with some required features from the
programs written in FORTRAN 90 (with some required features from the
FORTRAN 2008 standard), and C. In addition, the model I/O
relies on the NetCDF libraries. Beyond the standard scripts, the build
system relies on use of the Python scripting language, along with cmake,
Expand Down Expand Up @@ -301,7 +301,7 @@ If the download step fails, make sure that your system’s firewall does
not block access to GitHub. If it does, download the files ``comparison_data.tar.gz``,
``physics_input_data.tar.gz``, ``processed_case_input.tar.gz``, and ``raw_case_input.tar.gz``
from the GitHub release website using your browser and manually extract its
contents in the directory ``scm/data``. Similarly, do the same for
contents in the directory ``scm/data``. Similarly, do the same for
``thompson_tables.tar.gz`` and ``MG_INCCN_data.tar.gz`` and extract
to ``scm/data/physics_input_data/``.

Expand Down Expand Up @@ -373,6 +373,13 @@ components.
-DCMAKE_BUILD_TYPE=Debug
- Single Precision

.. code:: bash
-D32BIT=1
- One can also save the output of this step to a log file:

.. code:: bash
Expand Down
46 changes: 46 additions & 0 deletions scm/doc/TechGuide/chap_testing.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
.. _`chapter: testing`:

Testing
=========


Testing Overview
------------------

[TODO]


Precision:
-------------
To build in single precision the user can use the ``-D32BIT=1`` command line argument when setting up CMake. A user might be interested in how the output of any individual suite might turn out when compiling and running in single precision versus double precision. This capacity has been added in the ``precision_analysis.py`` tool found under the ``scme/etc/scripts`` directory.


.. _`precisinoanalysis`:
precision_analysis.py
Builds single and double precision versions of the code, runs them, compares the output and ggenerateds png images of the analysis. Without any arguments the script with configure, build, run, and perform post-processing analysis.


.. code:: bash
./precisionanalysis.py
[--configure|--configure32|--configure64]
[--build|--build32|--build64]
[--run|--run32|--run64]
[--post]
[-h, --help]
Optional arguments:

#. ``--configure``: Configure both single and double precision CMake builds.
#. ``--configure32``: Configure single precision CMake build.
#. ``--configure64``: Configure double precision CMake build.

#. ``--build``: Build both single and double precision CMake builds.
#. ``--build32``: Build single precision CMake build.
#. ``--build64``: Build double precision CMake build.

#. ``--run``: Run both single and double precision CMake builds.
#. ``--run32``: Run single precision CMake build.
#. ``--run64``: Run double precision CMake build.

#. ``--post``: Perform post-processing of data and produce png files of the mean squared error of variables.
3 changes: 1 addition & 2 deletions scm/doc/TechGuide/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@ CCPP Single Column Model (SCM) User and Technical Guide v6.0.0
chap_cases
chap_ccpp
chap_hsd


chap_testing

0 comments on commit ee00840

Please sign in to comment.