Skip to content

Commit dcb8fbc

Browse files
committed
Instructions on building with macos/linux modulefiles
1 parent c448c00 commit dcb8fbc

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

scm/doc/TechGuide/chap_quick.rst

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -214,12 +214,9 @@ However, we have provided an example procedure in
214214
The main downside to spack-stack is that it contains a large number of libraries and utilities used by the whole
215215
Unified Forecast System and related applications, only a minority of which are required for the SCM. Users may
216216
install libraries manually if they wish, but they will need to make sure the appropriate environment variables
217-
are set to the correct values so that the build system can find them, as described in the following chapter.
217+
are set to the correct values so that the build system can find them, as described in the following paragraphs.
218218

219219

220-
Setting up compilation environment
221-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
222-
223220
For users on a pre-configured platform, you can load the spack-stack environment via one of the provided modules in ``scm/etc/modules/``.
224221
For example, users on the NSF NCAR machine Derecho who wish to use Intel compilers can do the following:
225222

@@ -244,6 +241,19 @@ compilers (``CC``, ``CXX``, ``FC``), as well as the root directories for the lib
244241
provided Dockerfile in ``ccpp-scm/docker/``, so users can reference that file for guidance on how to install this software
245242
and set these variables.
246243

244+
If libraries were installed via spack-stack, users can load modules similarly to those available on pre-configured platforms.
245+
For a user on MacOS, who has installed spack-stack with ``clang``/``gfortran`` compilers, they can set up the build environment
246+
by setting the SPACK_STACK_DIR variable to the appropriate path, and loading the module as on pre-configured platforms described above.
247+
248+
::
249+
250+
export SPACK_STACK_DIR=[/path/to/spack-stack]
251+
cd [path/to/ccpp-scm/]
252+
module use scm/etc/modules/
253+
module load macos_clang
254+
255+
A module file is also provided for a generic linux platform with gnu compilers. For other platforms/combinations, you may be able
256+
to modify the provided modulefiles to work with your spack-stack install, otherwise reference the above procedure for manually installed libraries.
247257

248258
Python requirements
249259
"""""""""""""""""""""

0 commit comments

Comments
 (0)