JDBetteridge
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee
  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # Spack install Firedrake on Isambard ###### tags: `spack` We have only tried installing on the XCI (ARM/ThunderX2/TX2) system, not the MACS, A64FX or Phase3 portions of the machine. ## Prerequisites You should familiarise yourself with as much of Spack's functionality as possible. To achieve the same flexibility as we have on desktop installs the Firedrake Spack install leverages a lot of Spack's features. More information about Spack can be found on their [website](https://spack.readthedocs.io/en/latest/index.html). ## Spack ### Environment - The following clones the Spack repo, loads modules to setup the environment and activates Spack. ```bash git clone -c feature.manyFiles=true git@github.com:spack/spack.git module purge module load Base-opts module load PrgEnv-gnu module load pmi-lib module load cray-python/3.8.5.1 module load cray-mpich . spack/share/spack/setup-env.sh ``` ### Configuration 1. Populate `$SPACK_USER_CONFIG_PATH/cray/compilers.yaml` with <details> <summary> <code>$SPACK_USER_CONFIG_PATH/cray/compilers.yaml</code> </summary> ```yaml compilers: - compiler: spec: cce@11.0.4 paths: cc: cc cxx: CC f77: ftn fc: ftn flags: {} operating_system: cnl7 target: any modules: - PrgEnv-cray - cce/11.0.4 environment: {} extra_rpaths: [] - compiler: spec: gcc@9.3.0 paths: cc: cc cxx: CC f77: ftn fc: ftn flags: {} operating_system: cnl7 target: any modules: - PrgEnv-gnu - gcc/9.3.0 environment: {} extra_rpaths: [] ``` </details> 1. Populate `$SPACK_USER_CONFIG_PATH/packages.yaml` with <details> <summary> <code>$SPACK_USER_CONFIG_PATH/packages.yaml</code> </summary> ```yaml packages: all: providers: mpi: [cray-mpich] pkg-config: externals: - spec: pkg-config@0.29.2 prefix: /usr buildable: False pkgconf: externals: - spec: pkgconf@0.29.2 prefix: /usr buildable: False cray-mpich: externals: - spec: cray-mpich@7.7.17%gcc@9.3.0 modules: - PrgEnv-gnu - gcc/9.3.0 - cray-mpich/7.7.17 - spec: cray-mpich@7.7.17%cce@11.0.4 modules: - PrgEnv-cray - cce/11.0.4 - cray-mpich/7.7.17 buildable: False cray-libsci: externals: - spec: cray-libsci@20.09.1 modules: - cray-libsci/20.09.1 - spec: cray-libsci@19.06.1 modules: - cray-libsci/19.06.1 buildable: False python: externals: - spec: python@3.8.5.1 modules: - cray-python/3.8.5.1 - spec: cray-python@3.7.3.2 modules: - cray-python/3.7.3.2 buildable: False ``` </details> 4. Esure `$SPACK_USER_CONFIG_PATH/upstreams.yaml` does not exist. Upstream (system level installed Spack packages) for Isambard cause the Cray tools (compiler wrappers) to break. ### Firedrake 1. Clone the repo: ```bash git clone https://github.com/firedrakeproject/firedrake-spack.git # or git clone git@github.com:firedrakeproject/firedrake-spack.git ``` 1. Add the repository to spack `spack repo add <repo directory> ` 1. Create an spack environment `spack env create -d ./firedrake` 1. Activate that environment `spack env activate -p ./firedrake` 1. To avoid a bunch of errors add a whole bunch of packages to the development package list: ```bash spack develop py-firedrake@develop spack develop libsupermesh@develop spack develop petsc@develop spack develop chaco@petsc spack develop py-fiat@develop spack develop py-finat@develop spack develop py-islpy@develop spack develop py-petsc4py@develop spack develop py-pyadjoint@develop spack develop py-pyop2@develop spack develop py-coffee@develop spack develop py-loopy@develop spack develop py-cgen@develop spack develop py-codepy@develop spack develop py-genpy@develop spack develop py-tsfc@develop spack develop py-ufl@develop ``` 1. Add Firedrake: ```bash spack add py-firedrake@develop \ %gcc@9.3.0 \ ^python@3.8.5.1 \ ^cray-mpich@7.7.17%gcc@9.3.0 \ ^cray-libsci@20.09.1 \ ^firedrake.petsc@develop+fftw cflags=\"-O3 -march=native -mtune=native\" cxxflags=\"-O3 -march=native -mtune=native\" fflags=\"-O3 -march=native -mtune=native -ffree-line-length-512\" ``` 1. Add to `$SPACK_ENV/spack.yaml`: ```yaml spack: packages: all: compiler: [gcc@9.3.0] providers: mpi: [cray-mpich] blas: [cray-libsci] lapack: [cray-libsci] scalapack: [cray-libsci] netlib-scalapack: externals: # Pretend cray-libsci is netlib-scalapack - spec: netlib-scalapack@20.09.1 modules: - cray-libsci/20.09.1 buildable: False ``` 1. Concretize (and log) `spack concretize -f 2>&1 | tee $SPACK_ENV/conc.log` * Splitting the concretize and install steps into 2 distinct parts allows you to review what is being installed before the lengthy installation process begins. 1. Install (and log) `spack install --fail-fast 2>&1 | tee $SPACK_ENV/spack-firedrake-install.log` ### Testing Testing must be run on a compute node. An interactive session can be started using ```bash qsub -I -q arm-dev -l walltime=00:10:00 ``` Alternatively submit a jobscript, see [additional notes](#Additional-notes). 1. Test you can import Firedrake by running `python -c "from firedrake import *"` - If this fails, before trying anything else, deactivate the environment with `spack env deactivate` and reactivate with `spack env activate -p ./firedrake` (as above) and try running `python -c "from firedrake import *"` again. This appears to be a shortcoming of spack. 1. Run the basic functionality tests: ```bash cd $SPACK_ENV/py-firedrake pytest tests/regression/ -m "not parallel" -k "poisson_strong or stokes_mini or dg_advection" ``` - When running the environment on the compute nodes the variable `$HOME` needs to be set to something like `/work/_projectcode_/_projectcode_/_username_` or `/tmp` as many dependencies expect to find configuration in `$HOME`. - We don't run parallel tests due to an issue with the current parallel pytest hook, this is in the process of being fixed. 1. Run the full test suite: ```bash cd $SPACK_ENV/src/firedrake pytest tests -m "not parallel" ``` ## Additional notes Isambard maintains an installation of Spack, but it is not up to date and does not contain many of the fixes required to install Firedrake. Documentation is available on the [Isambard spack docs](https://gw4-isambard.github.io/docs/user-guide/spack.html) page.

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully