Skip to content

Commit

Permalink
Make a repo for Machines for E3SM (mache)
Browse files Browse the repository at this point in the history
  • Loading branch information
xylar committed Aug 30, 2021
1 parent a606c33 commit e1833e8
Show file tree
Hide file tree
Showing 22 changed files with 6,503 additions and 0 deletions.
141 changes: 141 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# pycharm
.idea/
107 changes: 107 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
========================
mache: Machines for E3SM
========================

A package for providing configuration data relate to E3SM supported machines.

Example usage:

.. code-block:: python
#!/usr/bin/env python
from mache import MachineInfo
machinfo = MachineInfo(machine='anvil')
print(machinfo)
This loads machine info for Anvil and prints it:

.. code-block:: none
Machine: anvil
E3SM Supported Machine? True
Compilers: intel, gnu
MPI libraries: mvapich, impi
OS: LINUX
E3SM-Unified:
Base path: /lcrc/soft/climate/e3sm-unified
E3SM-Unified is not currently loaded
Diagnostics:
Base path: /lcrc/group/e3sm/diagnostics
If you are on the login node of one of the following E3SM supported machines,
you don't need to provide the machine name. It will be recognized from the
host name:

* acme1

* andes

* anvil

* badger

* chrysalis

* compy

* cooley

* cori-haswell (but you will get a warning)

* grizzly

If you are on a compute node or want info about a machine you're not currently
on, give the ``machine`` name in all lowercase.


Attributes
----------

The attributes currently available are:

machine : str
The name of an E3SM supported machine

config : configparser.ConfigParser
Config options for this machine

e3sm_supported : bool
Whether this machine supports running E3SM itself, and therefore has
a list of compilers, MPI libraries, and the modules needed to load them

compilers : list
A list of compilers for this machine if ``e3sm_supported == True``

mpilibs : list
A list of MPI libraries for this machine if ``e3sm_supported == True``

os : str
The machine's operating system if ``e3sm_supported == True``

e3sm_unified_mpi : {'nompi', 'system', None}
Which MPI type is included in the E3SM-Unified environment (if one is
loaded)

e3sm_unified_base : str
The base path where E3SM-Unified and its activation scripts are
installed if ``e3sm_unified`` is not ``None``

e3sm_unified_activation : str
The activation script used to activate E3SM-Unified if ``e3sm_unified``
is not ``None``

diagnostics_base : str
The base directory for diagnostics data

License
-------

Copyright (c) 2021, Energy Exascale Earth System Model Project
All rights reserved

SPDX-License-Identifier: (BSD-3-Clause)

See `LICENSE <./LICENSE>`_ for details

Unlimited Open Source - BSD 3-clause Distribution ``LLNL-CODE-819717``
4 changes: 4 additions & 0 deletions mache/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from mache.machine_info import MachineInfo

__version_info__ = (1, 0, 0)
__version__ = '.'.join(str(vi) for vi in __version_info__)
Empty file.
Loading

0 comments on commit e1833e8

Please sign in to comment.