Skip to content

Commit

Permalink
Remove --with_netlib_lapack flag
Browse files Browse the repository at this point in the history
This is tedious to type and the suffix causes environment names
that are too long (spack can't create a valid shebang).
  • Loading branch information
xylar committed Jul 31, 2023
1 parent 83c80e5 commit 71e1532
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 25 deletions.
1 change: 1 addition & 0 deletions conda/albany_supported.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
chicoma-cpu, gnu, mpich
chrysalis, gnu, openmpi
pm-cpu, gnu, mpich
morpheus, gnu, openmpi
7 changes: 1 addition & 6 deletions conda/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,6 @@ def get_env_setup(args, config, machine, compiler, mpi, env_type, source_path,
else:
config.set('deploy', 'albany', 'None')

if args.with_netlib_lapack:
lib_suffix = f'{lib_suffix}_netlib_lapack'
else:
config.set('deploy', 'lapack', 'None')

if args.with_petsc:
lib_suffix = f'{lib_suffix}_petsc'
log_message(
Expand All @@ -198,6 +193,7 @@ def get_env_setup(args, config, machine, compiler, mpi, env_type, source_path,
args.without_openmp = True
else:
config.set('deploy', 'petsc', 'None')
config.set('deploy', 'lapack', 'None')

activ_suffix = f'{activ_suffix}{lib_suffix}'

Expand Down Expand Up @@ -1039,7 +1035,6 @@ def main(): # noqa: C901
check_env(script_filename, conda_env_name, logger)

if env_type == 'release' and not (args.with_albany or
args.with_netlib_lapack or
args.with_petsc):
# make a symlink to the activation script
link = os.path.join(activ_path,
Expand Down
1 change: 1 addition & 0 deletions conda/petsc_supported.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ chicoma-cpu, gnu, mpich
chrysalis, intel, openmpi
chrysalis, gnu, openmpi
compy, intel, impi
morpheus, gnu, openmpi
pm-cpu, gnu, mpich
8 changes: 2 additions & 6 deletions conda/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,10 @@ def parse_args(bootstrap):
action='store_true',
help="Whether to include albany in the spack "
"environment")
parser.add_argument("--with_netlib_lapack", dest="with_netlib_lapack",
action='store_true',
help="Whether to include Netlib-LAPACK in the spack "
"environment")
parser.add_argument("--with_petsc", dest="with_petsc",
action='store_true',
help="Whether to include PETSc in the spack "
"environment")
help="Whether to include PETSc and Netlib-LAPACK in "
"the spack environment")
parser.add_argument("--without_openmp", dest="without_openmp",
action='store_true',
help="If this flag is included, OPENMP=false will "
Expand Down
18 changes: 9 additions & 9 deletions docs/developers_guide/deploying_spack.rst
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@ discussed below.
Testing spack with PETSc (and Netlib LAPACK)
--------------------------------------------

If you want to build PETSc (and Netlib LAPACK), use the ``--with_petsc`` and
``--with_netlib_lapack`` flags. Currently, this only works with some
If you want to build PETSc (and Netlib LAPACK), use the ``--with_petsc`` flag.
Currently, this only works with some
compilers, but that may be more that I was trying to limit the amount of work
for the compass support team. There is a file,
`petsc_supported.txt <https://github.com/MPAS-Dev/compass/blob/main/conda/petsc_supported.txt>`_,
Expand All @@ -249,10 +249,10 @@ Here is an example:
--spack /lcrc/group/e3sm/${USER}/spack_test \
--tmpdir ${TMPDIR} \
--compiler intel gnu \
--mpi openmpi openmpi \
--with_netlib_lapack \
--mpi openmpi \
--with_petsc \
--recreate
--recreate \
--verbose
Testing spack with Albany
-------------------------
Expand Down Expand Up @@ -383,7 +383,7 @@ branch.
.. code-block:: bash
# source whichever load script is appropriate
source load_dev_compass_1.2.0-alpha.5_chrysalis_intel_openmpi_netlib_lapack_petsc.sh
source load_dev_compass_1.2.0-alpha.5_chrysalis_intel_openmpi_petsc.sh
git submodule update --init
cd E3SM-Project
git remote add scalandr/E3SM [email protected]:scalandr/E3SM.git
Expand Down Expand Up @@ -473,7 +473,7 @@ Deploying spack with PETSc (and Netlib LAPACK)
--update_spack \
--tmpdir ${TMPDIR} \
--compiler intel gnu \
--mpi openmpi openmpi \
--with_netlib_lapack \
--mpi openmpi \
--with_petsc \
--recreate
--recreate \
--verbose
8 changes: 4 additions & 4 deletions docs/developers_guide/quick_start.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ If you are on one of the :ref:`dev_supported_machines`, run:
./conda/configure_compass_env.py --conda <base_path_to_install_or_update_conda> \
-c <compiler> [--mpi <mpi>] [-m <machine>] [--with_albany] \
[--with_netlib_lapack] [--with_petsc]
[--with_petsc]
The ``<base_path_to_install_or_update_conda>`` is typically ``~/mambaforge``.
This is the location where you would like to install Mambaforge or where it is
Expand Down Expand Up @@ -125,8 +125,8 @@ will be linked in to MPAS-Ocean.
Environments with PETSc and Netlib-LAPACK
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If you are working with MPAS-Ocean test cases that need PETSC and
Netlib-LAPACK, you should specify ``--with_petsc --with_netlib_lapack`` to
If you are working with MPAS-Ocean test cases that need PETSc and
Netlib-LAPACK, you should specify ``--with_petsc`` to
point to Spack environments where these libraries are included. Appropriate
environment variables for pointing to these libraries will be build into the
resulting load script (see below).
Expand Down Expand Up @@ -192,7 +192,7 @@ you, this script will also:
* with the ``--with_albany`` flag, creates or uses an existing Spack
environment that includes Albany and Trilinos.

* with the ``--with_petsc --with_netlib_lapack`` flags, creates or uses an
* with the ``--with_petsc`` flag, creates or uses an
existing Spack environment that includes PETSc and Netlib-LAPACK.

* make an activation script called ``load_*.sh``, where the details of the
Expand Down

0 comments on commit 71e1532

Please sign in to comment.