Cmr guide

From CMR-Project
Revision as of 21:52, 5 March 2021 by Said lababidi (talk | contribs)
Jump to navigation Jump to search

CMR (Coastal Model Repository)

Introduction

CMR is a cloud-ready repository of open-source coastal modeling tools which enable scientists and engineers to use high performance computers to study a variety of physical and ecological processes. The system leverages Jupyter notebooks, Docker, Singularity, and the Agave Platform to create a platform for running jobs and analyzing data in a way that is intuitive, repeatable, and collaborative.


The system is built upon the following:

  • Jupyter Notebook: to create a customizable, interactive tool for science discoveries and engineering analyses.
  • Agave Framework: to simplify sharing of data and accessing high performance computing resources.
  • Singularity: to deploy and run simulation codes on cloud-enabled resources.
  • Docker: to construct the images for singularity and to deploy the Jupyter notebooks to user machines and workstations.

The integration of these technologies provides an intuitive and easy-to-use way for users to interact both with high performance computers and with each other.


The system incorporates several opensource numerical models commonly used by the coastal science and engineering community:

  • SWAN (Simulating WAve Nearshore): a third-generation wave model, developed at Delft University of Technology, that computes random, short-crested wind-generated waves in coastal regions and inland waters.
  • FUNWAVE-TVD: is the Total Variation Diminishing (TVD) version of the fully nonlinear Boussinesq wave model (FUNWAVE) a phase-resolving, time-stepping Boussinesq model for ocean surface wave propagation in the nearshore.
  • CaFUNWAVE: a port of the Funwave-TVD to the Cactus Framework which can make use of AMR (Adaptive Mesh Refinement).
  • OpenFOAM (Open source Field Operation And Manipulation): an open-source C++ toolbox for solving the Navier–Stokes equations for fluid dynamics.


Installing & Running CMR

In order to run the CMR, a number of prerequisites are needed:

  1. Install Docker
    • You can download and install Docker for Mac, Windows or Linux from Docker Installation Webpage.
    • Pick the one for your platform and follow the step-by-step guide to install it.
    • Make sure to check the system requirements and install any prerequisites required before proceeding for the installation.
  2. Install Docker-compose
    • Docker-Compose relies on Docker Engine for any meaningful work, so make sure you have Docker Engine installed before proceeding.
    • On desktop systems like Docker Desktop for Mac and Windows, Docker Compose is included as part of those desktop installs.
    • For Linux systems, first install Docker Engine then proceed to install Docker Compose.
    • You can download and install Docker-Compose for Mac, Windows or Linux from Docker-Compose Installation Webpage.
  3. Get a Tapis/TACC or Agave account
    • The Tapis/TACC and Agave are software platforms that aim to help researchers more easily leverage powerful supercomputers and integrate and manage data from different and distant sources.
    • You can create an Agave account on Agave Platform Webpage.
    • You can create a Tapis/TACC account on TACC User Portal.
  4. Enable the Linux Subsystem (on Windows)
    • First you need to setup the Windows Subsystem for Linux (WSL)
      1. A Full step-by-step guide on how to setup the Windows Subsystem for Linux on Windows 10 is available on Microsoft’s Website.
      2. There are two options for installation: Simplified Installation and a Manual Installation.
      3. The Simplified Installation requires you to join the Windows Insider Program and install a preview build of Windows 10 (OS build 20262 or higher).
      4. For the Manual Installation, make sure to follow the steps consecutively and accurately.
      5. You can access Windows PowerShell from the search bar in the taskbar.
      6. Make sure you run PowerShell as an Administrator.
      7. Ubuntu is recommended as a Linux distribution.
    • Get Docker working on (WSL)
      1. A Full step-by-step guide for setting up Docker for Windows and WSL is available on Nick Janetakis Website.
      2. Make sure to read the full guide thoroughly.
      3. When you copy/paste commands into your WSL terminal, copy and paste them one-by-one. Don’t copy and paste multiple commands at once; that will lead to running the first command only and skipping the later ones.
      4. When opening your profile with nano ~/.profile, “ ^ ” means CTRL.
    • Optional: The default bash on WSL is not so great. I recommend WSL Terminal. You can use it instead of the default bash.
    • Optional: If you want to use X-Windows under WSL, I recommend VCX. You to start it up every time you start Windows.
    • Optional: After setting up the WSL, I recommend making your home directory under Linux a symbolic link to your Win 10 home directory. This is just for convenience in copying things.
    • At this point you’ve completed the installation. The following steps are for running the CMR.
  5. Get the docker-compose.yml file for the CMR.
To do that you need to run the following command from a bash window (Ubuntu):
curl -LO https://raw.githubusercontent.com/ysboss/agave-model/newmodel/docker/docker-compose.yml
      • This is just a curl command to get the docker-compose.
        • You might have to install “curl” on your Linux system. This Link will guide you for the installation.
  1. Get the docker image
In your bash window (Ubuntu) rub the following command to pull the latest image from Dockerhub:
docker-compose pull