CyberShake MareNostrum Training

From SCECpedia
Revision as of 20:51, 13 February 2020 by Scottcal (talk | contribs)
Jump to navigationJump to search

This page provides training for running the CyberShake TEST site on MareNostrum (MN4)

Training overview

Here are the basic steps involved in the training:

  • Set up needed files
  • Initialize database with run information
  • Create Strain Green Tensors
  • Create synthetic seismograms and intensity measures
  • Populate database with intensity measures
  • Populate Hazard Dataset
  • Plot hazard curves

Actions you need to take will be in bold.

Terminal commands and output will be in this font. Replace <username> or <working dir> with your username or your working directory, respectively.  My username is pr1ejg10 and my project is pr1ejg00.

Set up needed files

  1. Create a directory to work from. I recommend something in scratch.
  2. pr1ejg10@login2:~> cd /gpfs/scratch/pr1ejg00/<username>
    pr1ejg10@login2:/gpfs/scratch/pr1ejg00/pr1ejg10> mkdir TEST
    pr1ejg10@login2:/gpfs/scratch/pr1ejg00/pr1ejg10> cd TEST
    

    An overview of the code involved in CyberShake is provided here. For this test, we are using the SGT-related codes, the PP-related codes, and the Data Products codes, but not the Stochastic codes.

    Since MN4 does not permit outgoing connections, it is impossible to install CyberShake on MN4 directly from the repository. For the purposes of this training, I suggest you use my install directly. My CyberShake installation is located at:

    /gpfs/projects/pr1ejg00/CyberShake
    

    Due to the outgoing connection problem, on MN4 we are using a local SQLite database rather than a remote MySQL database, which is what SCEC's CyberShake install uses. Each trainee should work from their own database.

  3. Copy in my training database from /gpfs/projects/pr1ejg00/CyberShake/database/training.sqlite.
  4. pr1ejg10@login2:/gpfs/scratch/pr1ejg00/pr1ejg10/TEST> cp /gpfs/projects/pr1ejg00/CyberShake/database/training.sqlite .
    
  5. In order to look at this database, we need sqlite. Add the SQLite module to your environment.
  6. pr1ejg10@login2:/gpfs/scratch/pr1ejg00/pr1ejg10/TEST> module load sqlite
    
  7. Let's examine this database. Use sqlite3 to investigate the tables.
    pr1ejg10@login2:/gpfs/scratch/pr1ejg00/pr1ejg10/TEST> sqlite3 training.sqlite
    SQLite version 3.20.0 2017-07-10 19:08:59
    Enter ".help" for usage hints.
    sqlite> .tables
    CyberShake_Runs                      IM_Types                           
    CyberShake_Site_Regions              PeakAmplitudes                     
    CyberShake_Site_Ruptures             Rupture_Variation_Scenario_IDs     
    CyberShake_Site_Types                Rupture_Variation_Scenario_Metadata
    CyberShake_Sites                     Rupture_Variations                 
    ERF_IDs                              Ruptures                           
    ERF_Metadata                         SGT_Variation_IDs                  
    ERF_Probability_Models               Studies                            
    Hazard_Curve_Points                  Velocity_Model_Metadata            
    Hazard_Curves                        Velocity_Models                    
    Hazard_Datasets     
    sqlite> .schema Velocity_Models
    CREATE TABLE Velocity_Models
    (
    Velocity_Model_ID integer primary key AUTOINCREMENT not null ,
    Velocity_Model_Name varchar(50) not null,
    Velocity_Model_Version varchar(50) not null
    );
    sqlite> select * from Velocity_Models;
    1|CVM-S4.26|4.26
    
    

    For queries and insertions, SQLite uses practically identical syntax to MySQL. To quit, type .quit.

    Note that not all the tables defined in the full CyberShake schema here