<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Trebuchet MS";
        panose-1:2 11 6 3 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hi All, We are going through our first setup of ood and have a question regarding environments.  If I were to submit a job outside of the ood browser using a submission script like this to PBS:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:.5in">#!/bin/bash<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">#PBS -V<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">#PBS -l select=1:ncpus=2:mpiprocs=2<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">#PBS -l walltime=01:00<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">#PBS -N hostname.pbs<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">#PBS -j oe<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:.5in">module load prun/1.1 gnu7/7.1.0 openmpi/1.10.7 ohpc<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">mpirun hostname<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Resulting in an output file similar to this:<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">compute-0-1<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">compute-0-1<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">If I submit the same job through the ood console using the Job Composer I end up getting this error:<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">/var/spool/pbs/mom_priv/jobs/29.vbcluster1.nor-tech.com.SC: line 9: module: command not found<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">/var/spool/pbs/mom_priv/jobs/29.vbcluster1.nor-tech.com.SC: line 11: mpirun: command not found<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I have been able to get around this issue by sourcing the lmod init script inside my job script like this:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:.5in">#!/bin/bash<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">#PBS -V<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">#PBS -l select=1:ncpus=2:mpiprocs=2<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">#PBS -N hostname.pbs<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">#PBS -j oe<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:.5in">export MODULEPATH=/opt/ohpc/pub/moduledeps/gnu7-openmpi:/opt/ohpc/pub/moduledeps/gnu7:/opt/ohpc/pub/modulefiles<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">source /opt/ohpc/admin/lmod/lmod/init/bash<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">module load prun/1.1 gnu7/7.1.0 openmpi/1.10.7 ohpc<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:.5in">mpirun hostname<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
<p class="MsoNormal">Is there a way to pass the user’s full environment to the job so we don’t have to do the sourcing above?  Usually in PBS you’d use the ‘#PBS –V’ option but that is not working with the ood.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks in advance, Kyle<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#1F497D">Kyle Gross |
</span><span style="color:#1F497D"><a href="mailto:kyleg@nor-tech.com"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:green">kyleg@nor-tech.com</span></a></span><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#1F497D"><br>
</span><span style="font-size:7.5pt;font-family:"Trebuchet MS",sans-serif;color:gray">Senior HPC Technician<br>
901 East Cliff Road, Burnsville, MN 55337<br>
Direct 952-229-2086 | Fax 952-229-2061</span><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Trebuchet MS",sans-serif;color:#1F497D"><img border="0" width="89" height="37" style="width:.927in;height:.3854in" id="Picture_x0020_0" src="cid:image001.jpg@01D3434F.E160C810" alt="NT logo.jpg"></span><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#1F497D">Burnsville,
 Minn.<o:p></o:p></span></p>
<p class="MsoNormal"><b><i><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:teal">People Friendly Technology with a Global Reach</span></i></b><span style="font-size:10.0pt;color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>