Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Removed the Docker instructions until they can be cleaned up
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Mar 1, 2024
1 parent 257464b commit b86e297
Showing 1 changed file with 1 addition and 73 deletions.
74 changes: 1 addition & 73 deletions docs/getting-started-guide/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -203,79 +203,7 @@ You may need to run the above command as root or with sudo if you are installing
Building the exectuable using Docker
------------------------------------

The Swiftest project contains a Dockerfile
that may be used to generate an executable without needing to provide
any external dependencies, other than the Docker engine itself (see
`here <https://docs.docker.com/get-docker/>`__ for instructions on
obtaining Docker). Once Docker is installed and the Docker engine is
running, execute::

$ docker build --target=export-driver \
--output=./bin \
--build-arg MACHINE_CODE_VALUE="Host" \
[ -f Dockerfile.GNU-Linux | -f Dockerfile.Intel ] \
[ --build-arg BUILD_TYPE="*RELEASE*|DEBUG|TESTING|PROFILE" ] \
[ --build-arg EXTRA_CMAKE_OPTIONS="-D<Additional option you want to pass to CMake>" ] .

The Docker build will download and compile all of the library
dependencies (HDF5, NetCDF-C, and NetCDF-Fortran) as static libraries
and the Swiftest driver using Intel compilers. Once completed, the
Swiftest executable, called ``swiftest_driver``, should now be created
in the ``bin/`` directory.

Note: The Dockerfile is designed to build an executable that is
compatible with a broad range of CPU architectures by specifying the
SSE2 instruction as a target for SIMD instructions using the ``-x``
compiler option. When compiling on the same CPU archictecture you
plan to execute the driver program, for the highest possible SIMD
performance, use
``--build-arg MACHINE_CODE_VALUE="Host"`` to override the default ``MACHINE_CODE_VALUE=“SSE2”``.
For additional options see
`here <https://www.intel.com/content/www/us/en/docs/fortran-compiler/developer-guide-reference/2023-1/x-qx.html>`__.

The optional Docker argument ``EXTRA_CMAKE_OPTIONS`` is provided to pass any additional CMake arguments (see `supported CMake options <gs-cmake-options-table_>`_)


Download the executable as a Docker or Singularity container.
-------------------------------------------------------------

The Swiftest driver is available as a Docker container on DockerHub in
two versions: Intel and GNU. The Intel version was compiled for the
x86_64 CPU using the Intel classic Fortran compiler. The GNU version was
compliled for the x86_64 CPU using gfortran. The Intel version is faster
than the GNU version (though not as fast as a native compile to the
target CPU that you wish to run it on due to vectorization optimizations
that Swiftest takes advantage of), however it is much larger: The Intel
version is ~2.7GB while the GNU version is ~300MB. The Singularity
container pulls from the same DockerHub container.

To facilitate installation of the container, we provide a set of shell
scripts to help automate the process of installing container versions of
the executable. To install the default Intel version of the docker
container from within the ``swiftest\`` project directory::

$ cd docker
$ . ./install.sh

To install the GNU version::

$ cd docker
$ . ./install.sh gnu

The Singularity versions are installed the same way, just replace
``cd docker`` with ``cd singularity`` above.

Whether installing either the Docker or Singularity containers, the
install script will copy an executable shell script ``swiftest_driver``
into ``swiftest/bin/``. Not that when installing the Singularity
container, the install script will set an environment variable called
``SWIFTEST_SIF`` that must point to the aboslute path of the container
file called ``swiftest_driver.sif``. To use the driver script in a
future shell, rather than running the install script again, we suggest
adding the environment variable definition to your shell startup script
(e.g. add
``export SWIFTEST_SIF="/path/to/swiftest/singularity/swiftest.sif"`` to
your ``.zshrc``)
TBD



Expand Down

0 comments on commit b86e297

Please sign in to comment.