Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Andes support #455

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions tests/integration/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,34 @@ def check_mismatched_images(

# Inspired by https://github.com/E3SM-Project/e3sm_diags/blob/master/docs/source/quickguides/generate_quick_guides.py

def get_andes_expansions(config):
# Note: `os.environ.get("USER")` also works. Here we're already using mache but not os, so using mache.
username = config.get("web_portal", "username")
web_base_path = config.get("web_portal", "base_path")
d = {
"bundles_walltime": "02:00:00",
"constraint": "",
# To run this test, replace conda environment with your e3sm_diags dev environment
# TODO: Get conda working on Andes
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried following the conda directions for E3SM Diags at https://e3sm-project.github.io/e3sm_diags/_build/html/master/install.html#others-local, but I get:

$ which conda
/usr/bin/which: no conda in (/sw/andes/spack-envs/base/opt/linux-rhel8-x86_64/gcc-9.3.0/openmpi-4.0.4-skxqfeiocc5jtuw3y6dwtnxzzqjp5ffs/bin:/sw/andes/gcc/9.3.0/bin:/sw/sources/hpss/bin:/sw/andes/bin:/opt/ibm/spectrumcomputing/lsf/10.1/linux3.10-glibc2.17-x86_64/etc:/opt/ibm/spectrumcomputing/lsf/10.1/linux3.10-glibc2.17-x86_64/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sw/sources/cgroup_tool/bin:/opt/puppetlabs/bin:/usr/lpp/mmfs/bin:/opt/dell/srvadmin/bin)

I tried following the mamba directions for zppy at https://e3sm-project.github.io/zppy/_build/html/main/getting_started.html#others-local, but I get:

$ which mamba
/usr/bin/which: no mamba in (/sw/andes/spack-envs/base/opt/linux-rhel8-x86_64/gcc-9.3.0/openmpi-4.0.4-skxqfeiocc5jtuw3y6dwtnxzzqjp5ffs/bin:/sw/andes/gcc/9.3.0/bin:/sw/sources/hpss/bin:/sw/andes/bin:/opt/ibm/spectrumcomputing/lsf/10.1/linux3.10-glibc2.17-x86_64/etc:/opt/ibm/spectrumcomputing/lsf/10.1/linux3.10-glibc2.17-x86_64/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sw/sources/cgroup_tool/bin:/opt/puppetlabs/bin:/usr/lpp/mmfs/bin:/opt/dell/srvadmin/bin)

@xylar @tomvothecoder Would either of you know how to get some form of conda working on Andes?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you just need to log in with a new terminal after you install. The instruction:

Do you wish the installer to initialize Miniconda3 by running conda init? [yes|no] yes

is adding something to your .bashrc and that doesn't take effect unless you either do source .bashrc or you log in to a fresh terminal.

Copy link
Contributor

@xylar xylar Jul 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If that doesn't work, you should instead do:

source ~/mambaforge/etc/profile.d/conda.sh
source ~/mambaforge/etc/profile.d/mamba.sh
mamba activate

if you installed Miniconda3 instead of Mambaforge -- ☹️ -- you will need to just do:

source ~/miniconda3/etc/profile.d/conda.sh
conda activate

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

source ~/mambaforge/etc/profile.d/conda.sh
source ~/mambaforge/etc/profile.d/mamba.sh
mamba activate

Ah, that appears to work, thanks!

"diags_environment_commands": "source /ccs/home/forsyth2/miniconda3/etc/profile.d/conda.sh; conda activate e3sm_diags_dev_20220614",
"diags_walltime": "2:00:00",
"environment_commands_test": "source /gpfs/alpine/proj-shared/cli115/e3sm-unified/load_e3sm_unified_1.8.1_andes.sh",
# TODO: Determine expected dir. Globus transfer necessary files over to Andes.
"expected_dir": "/lcrc/group/e3sm/ipublic_html/zppy_test_resources/",
"partition_long": "batch",
"partition_short": "batch",
# TODO: Determine correct qos
"qos_long": "regular",
"qos_short": "regular",
"scratch": f"/ccs/home/{username}/",
# TODO: Determine user_input. Globus transfer necessary files over to Andes.
"user_input": "/lcrc/group/e3sm/ac.forsyth2/",
# TODO: Determine user_output.
"user_output": f"/lcrc/group/e3sm/{username}/",
# TODO: Modify zppy to handle machines without a web server.
"user_www": f"",
}
return d

def get_chyrsalis_expansions(config):
# Note: `os.environ.get("USER")` also works. Here we're already using mache but not os, so using mache.
Expand Down
2 changes: 2 additions & 0 deletions zppy/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ def main(): # noqa: C901
config["default"]["account"] = "e3sm"
elif config["default"]["machine"] == "anvil":
config["default"]["account"] = "condo"
elif config["default"]["machine"] == "andes":
config["default"]["account"] = "cli115"
else:
raise ValueError(f"Invalid machine {config['default']['machine']}")
# Determine partition
Expand Down
2 changes: 1 addition & 1 deletion zppy/templates/slurm_header.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#SBATCH --output={{ scriptDir }}/{{ prefix }}.o%j
#SBATCH --exclusive
#SBATCH --time={{ walltime }}
{% if machine in ['anvil', 'chrysalis'] %}
{% if machine in ['andes', 'anvil', 'chrysalis'] %}
#SBATCH --partition={{ partition }}

{% elif machine == 'compy' %}
Expand Down