From 71e15327829bf7b049fbae599bf960a3b454c8d9 Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Mon, 24 Jul 2023 11:14:59 +0200 Subject: [PATCH] Remove --with_netlib_lapack flag This is tedious to type and the suffix causes environment names that are too long (spack can't create a valid shebang). --- conda/albany_supported.txt | 1 + conda/bootstrap.py | 7 +------ conda/petsc_supported.txt | 1 + conda/shared.py | 8 ++------ docs/developers_guide/deploying_spack.rst | 18 +++++++++--------- docs/developers_guide/quick_start.rst | 8 ++++---- 6 files changed, 18 insertions(+), 25 deletions(-) diff --git a/conda/albany_supported.txt b/conda/albany_supported.txt index bd9ff79467..12ce2817af 100644 --- a/conda/albany_supported.txt +++ b/conda/albany_supported.txt @@ -3,3 +3,4 @@ chicoma-cpu, gnu, mpich chrysalis, gnu, openmpi pm-cpu, gnu, mpich +morpheus, gnu, openmpi diff --git a/conda/bootstrap.py b/conda/bootstrap.py index 858561b48d..6e38a76257 100755 --- a/conda/bootstrap.py +++ b/conda/bootstrap.py @@ -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( @@ -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}' @@ -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, diff --git a/conda/petsc_supported.txt b/conda/petsc_supported.txt index 5bc50ab6ab..8aff04a7d0 100644 --- a/conda/petsc_supported.txt +++ b/conda/petsc_supported.txt @@ -7,4 +7,5 @@ chicoma-cpu, gnu, mpich chrysalis, intel, openmpi chrysalis, gnu, openmpi compy, intel, impi +morpheus, gnu, openmpi pm-cpu, gnu, mpich diff --git a/conda/shared.py b/conda/shared.py index c2c5358ed4..308ca24d6f 100644 --- a/conda/shared.py +++ b/conda/shared.py @@ -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 " diff --git a/docs/developers_guide/deploying_spack.rst b/docs/developers_guide/deploying_spack.rst index f417107324..1ea685a3e6 100644 --- a/docs/developers_guide/deploying_spack.rst +++ b/docs/developers_guide/deploying_spack.rst @@ -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 `_, @@ -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 ------------------------- @@ -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 git@github.com:scalandr/E3SM.git @@ -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 diff --git a/docs/developers_guide/quick_start.rst b/docs/developers_guide/quick_start.rst index 705508641e..c7cded691e 100644 --- a/docs/developers_guide/quick_start.rst +++ b/docs/developers_guide/quick_start.rst @@ -89,7 +89,7 @@ If you are on one of the :ref:`dev_supported_machines`, run: ./conda/configure_compass_env.py --conda \ -c [--mpi ] [-m ] [--with_albany] \ - [--with_netlib_lapack] [--with_petsc] + [--with_petsc] The ```` is typically ``~/mambaforge``. This is the location where you would like to install Mambaforge or where it is @@ -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). @@ -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