This repository has been archived by the owner on Aug 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmodules.html
128 lines (118 loc) · 6.7 KB
/
modules.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="generator" content="pandoc">
<title>Software Carpentry: Software Applications on OSG</title>
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" type="text/css" href="css/bootstrap/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="css/bootstrap/bootstrap-theme.css" />
<link rel="stylesheet" type="text/css" href="css/swc.css" />
<link rel="alternate" type="application/rss+xml" title="Software Carpentry Blog" href="http://software-carpentry.org/feed.xml"/>
<meta charset="UTF-8" />
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body class="lesson">
<div class="container card">
<div class="banner">
<a href="http://software-carpentry.org" title="Software Carpentry">
<img alt="Software Carpentry banner" src="img/software-carpentry-banner.png" />
</a>
</div>
<article>
<div class="row">
<div class="col-md-10 col-md-offset-1">
<h1 class="title">Software Applications on OSG</h1>
<div class="objectives" markdown="1">
<h4 id="objectives">Objectives</h4>
<ul>
<li>Get to know what are the existing applications on OSG.</li>
<li>Learn how to use modules.</li>
<li>Learn how to use the <em>tutorial</em> command.</li>
</ul>
</div>
<h2>
Overview
</h2>
<p>Commonly used software and libraries on the Open Science Grid are available in a central repository (known as OASIS) and accessed via the <em>module</em> command. In this lesson, we will see how to search for, load, and use software packages.</p>
<p>This lesson will also cover the usage of the built-in <em>tutorial</em> command. Using <em>tutorial</em>, we load a variety of job templates that cover basic usage, specific use cases, and best practices.</p>
<h2>
Modules on OSG
</h2>
<p>Log in OSG with secure shell</p>
<pre><code>$ ssh [email protected]</code></pre>
<p>The first step in using the module command is to initialize the module system. This step consists of sourcing a shell specific file that adds the module command to your environment. For example, initializing module for bash is done as follows:</p>
<pre><code>$ source /cvmfs/oasis.opensciencegrid.org/osg/modules/lmod/5.6.2/init/bash</code></pre>
<p>For other shells such as sh, zsh, tcsh, csh, etc., you would replace bash with the shell name (e.g. zsh).</p>
<p>Once the distributed environment modules system is initialized, you can check the available modules:</p>
<pre><code>$ module avail
--------------------------- /cvmfs/oasis.opensciencegrid.org/osg/modules/modulefiles/Core ----------------------------
atlas fftw/fftw-3.3.4-gromacs lapack lmod/5.6.2 (D) python/3.4
blast gromacs/4.6.5 lmod/SiteHook namd/2.9 settarg/5.6.2
blender jpeg lmod/SitePackage python/2.7 (D)
Where:
(D): Default Module
Use "module spider" to find all possible modules.
Use "module keyword key1 key2 ..." to search for all possible modules matching any of the "keys".</code></pre>
<p>In order to load a module, you need to run “module load [modulename]”. Say for example you want to load R package,</p>
<pre><code>$ module load R </code></pre>
<p>This sets up the R package for you. Now you can do some test calculations with R.</p>
<pre><code>$ R # invoke R package
> cos(45) # simple on-screen calculation with cosine function
[1] 0.525322
</code></pre>
<p>If you want to unload a module, type</p>
<pre><code>$ module unload R </code></pre>
<h2>
Tutorial Command on OSG
</h2>
<p>The built-in <em>tutorial</em> command assists a user in getting started on OSG. To see the list of existing tutorials, type</p>
<pre><code>$ tutorial # will print a list tutorials</code></pre>
<p>Say for example, you are interested in learning how to run R scripts on OSG, the tutorial command sets up the R tutorial for you.</p>
<pre><code>$ tutorial R # prints the following message:
Application Example - R (statistical analysis)
This tutorial will introduce you to using the R statistical programming
language on OSG Connect. By the end of the tutorial:
* You will have set up R from the OSG OASIS service on the submit host
* You will know how to use the HAS_CVMFS_oasis_opensciencegrid_org job steering requirement.
Tutorial 'R' is set up. To begin:
cd ~/osg-R</code></pre>
<p>The “tutorial R” command creates a directory “osg-R” containing the neccessary script and input files.</p>
<pre><code>mciP.R # The example R script file
R-wrapper.sh # The job executation file
R.submit # The job submission file (will discuss later in the lesson HTCondor scripts)</code></pre>
<p>Lets focus on “mciP.R” and the “R-wrapper” scripts. The details of “R.submit” script will be discussed later when we learn HTCondor scripts.</p>
<p>The file “mciP.R” is a R script that calculates the value of <em>pi</em> using the Monte Carlo method. The R-wrapper.sh essentially loads the R module and runs the “mciP.R” script.</p>
<pre><code>#!/bin/bash # Defines the shell environment.
source /cvmfs/oasis.opensciencegrid.org/osg/modules/lmod/5.6.2/init/bash
module load R # Loads the module
Rscript mcpi.R # Executation of the R script</code></pre>
<p>Similar to the R tutorial, there are other tutorials available on OSG. The available tutorials serve as templates to develop your own scripts and run the calculations on OSG.</p>
<div class="keypoints" markdown="1">
<h4 id="key-points">Key Points</h4>
<ul>
<li>Many scientific applications are installed on OSG and available for the users.</li>
<li>To use an existing application use the module load command.</li>
<li>The command - <em>tutorial</em> helps to access the existing tutorials.<br />
</li>
</ul>
</div>
</div>
</div>
</article>
<div class="footer">
<a class="label swc-blue-bg" href="http://software-carpentry.org">Software Carpentry</a>
<a class="label swc-blue-bg" href="https://github.com/swcarpentry/lesson-template">Source</a>
<a class="label swc-blue-bg" href="mailto:[email protected]">Contact</a>
<a class="label swc-blue-bg" href="LICENSE.html">License</a>
</div>
</div>
<!-- Javascript placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="css/bootstrap/bootstrap-js/bootstrap.js"></script>
</body>
</html>