Skip to content

Commit

Permalink
Hid some content when not logging in
Browse files Browse the repository at this point in the history
  • Loading branch information
henricasanova committed Sep 26, 2022
1 parent 6538787 commit a61b642
Show file tree
Hide file tree
Showing 23 changed files with 3,622 additions and 3,414 deletions.
2 changes: 1 addition & 1 deletion web/src/components/simulation/content_signin.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const ContentSignIn = ({content}) => {
/>
<strong>eduWRENCH Pedagogic Modules</strong>
<br />
Sign in on the top of the page to access the {content}.
Sign in on the top of the page to access {content}.
</div>
)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
import React from "react"
import React, {useState} from "react"
import { Divider, Header, Segment } from "semantic-ui-react"
import TeX from "@matejmazur/react-katex"
import LearningObjectives from "../../../components/learning_objectives"
import GanttChart from "../../../images/vector_graphs/batch_scheduling/gantt_chart.svg"
import Basics from "../../../images/vector_graphs/batch_scheduling/basics.svg";
import FeedbackActivity from "../../../components/feedback/feedback_activity";
import FeedbackQuestions from "../../../components/feedback_questions";
import SigninCheck from "../../../components/signin_check";

const BatchQueue = ({ module, tab }) => {

const [auth, setAuth] = useState("false")


return (
<>
<LearningObjectives module={module} tab={tab} />
Expand All @@ -25,22 +30,22 @@ const BatchQueue = ({ module, tab }) => {
</p>

<p>
<b>The diagram below</b> shows an example scenario, or "batch
schedule", for a hypothetical 5-node cluster. Two jobs, shown
in red, are currently running. They both use 2 compute nodes,
one of them with still 3 hours to go, and the other with still
4h to go. Two jobs are "stuck" in the batch queue. The first
job in the batch queue (which will likely run next) is depicted
in green. This job has requested 4 nodes and plans to use them
for 3 hours. Since there is only one node available right now,
it cannot run and has to wait in the queue. The second job in
the queue, meaning that it arrived after the green job, is
depicted in yellow. The green and the yellow job will never be
able to run at the same time since together they request more
than 5 compute nodes. <b>If, right now, you were submit a job that
requests one compute node for less than 4 hours, then this job
would run right away.</b> Most batch schedulers allow jobs to <i>jump ahead in the queue</i> provided they don't delay jobs that are
already in the queue. This is called "backfilling".
<b>The diagram below</b> shows an example scenario, or "batch
schedule", for a hypothetical 5-node cluster. Two jobs, shown
in red, are currently running. They both use 2 compute nodes,
one of them with still 3 hours to go, and the other with still
4h to go. Two jobs are "stuck" in the batch queue. The first
job in the batch queue (which will likely run next) is depicted
in green. This job has requested 4 nodes and plans to use them
for 3 hours. Since there is only one node available right now,
it cannot run and has to wait in the queue. The second job in
the queue, meaning that it arrived after the green job, is
depicted in yellow. The green and the yellow job will never be
able to run at the same time since together they request more
than 5 compute nodes. <b>If, right now, you were submit a job that
requests one compute node for less than 4 hours, then this job
would run right away.</b> Most batch schedulers allow jobs to <i>jump ahead in the queue</i> provided they don't delay jobs that are
already in the queue. This is called "backfilling".

</p>

Expand All @@ -57,83 +62,90 @@ const BatchQueue = ({ module, tab }) => {
and completion.
</p>

<h2>Simulated scenario</h2>
<p>
As with the simulated scenario in the previous tab, you can access
a simulated terminal on the 32-node cluster's head node by
running the following command on your computer in a terminal (a.k.a. command prompt) to start a Docker container:
</p>
<SigninCheck data={[
<>

<Segment raised>
<code>
docker run -p 8808:8808 --rm -it wrenchproject/eduwrench-slurm-terminal ./run_it.sh tab3
</code>
</Segment>
<h2>Simulated scenario</h2>
<p>
As with the simulated scenario in the previous tab, you can access
a simulated terminal on the 32-node cluster's head node by
running the following command on your computer in a terminal (a.k.a. command prompt) to start a Docker container:
</p>

<p>and, in a new browser window, navigate to: <a href="http://localhost:8808"
target="_blank">http://localhost:8808</a>.</p>
<Segment raised>
<code>
docker run -p 8808:8808 --rm -it wrenchproject/eduwrench-slurm-terminal ./run_it.sh tab3
</code>
</Segment>

<p>
As in the previous tab, again, your home directory in the simulated terminal contains the <code>myprogram</code>
program and the <code>batch.slurm</code> batch script.
</p>
<p>and, in a new browser window, navigate to: <a href="http://localhost:8808"
target="_blank">http://localhost:8808</a>.</p>

<Divider />
<p>
As in the previous tab, again, your home directory in the simulated terminal contains the <code>myprogram</code>
program and the <code>batch.slurm</code> batch script.
</p>

<Header as="h3" block>
Questions
</Header>
<Divider />

<p>
Interact with the simulated terminal to perform the following steps and answer the questions answer the questions (recall that <tt>myprogram</tt> runs
in <TeX math="2 + 20/n " /> hours on <TeX math="n" /> nodes).
</p>
<Header as="h3" block>
Questions
</Header>

<p><strong>[C.1.q3.1] Inspecting the batch queue:</strong></p>
<ul>
<li> Submit a job to run <code>myprogram</code> on 25 nodes with enough requested time so that it will
successfully complete.
</li>
<li> Use <code>squeue</code> to inspect the state of the batch queue. You should see that your job is running.
</li>
<li> Soon after, submit another job to run <code>myprogram</code> successfully again (you can modify the
same <code>.slurm</code> file, or copy it), but using 10 nodes.
</li>
<li> Use <code>squeue</code> to inspect the state of the batch queue. You should see that your second job is
"stuck" in the queue, waiting for the first job to complete.
</li>
<li> <b>Question:</b> Without advancing time, estimate the following:
<p>
Interact with the simulated terminal to perform the following steps and answer the questions answer the questions (recall that <tt>myprogram</tt> runs
in <TeX math="2 + 20/n " /> hours on <TeX math="n" /> nodes).
</p>

<p><strong>[C.1.q3.1] Inspecting the batch queue:</strong></p>
<ul>
<li> the turnaround time of the first job.</li>
<li> the turnaround time of the second job.</li>
<li> Submit a job to run <code>myprogram</code> on 25 nodes with enough requested time so that it will
successfully complete.
</li>
<li> Use <code>squeue</code> to inspect the state of the batch queue. You should see that your job is running.
</li>
<li> Soon after, submit another job to run <code>myprogram</code> successfully again (you can modify the
same <code>.slurm</code> file, or copy it), but using 10 nodes.
</li>
<li> Use <code>squeue</code> to inspect the state of the batch queue. You should see that your second job is
"stuck" in the queue, waiting for the first job to complete.
</li>
<li> <b>Question:</b> Without advancing time, estimate the following:
<ul>
<li> the turnaround time of the first job.</li>
<li> the turnaround time of the second job.</li>
</ul>
</li>
<li> <b>Question</b>: Verify your answers to the above questions by advancing the clock and checking the content of the generated .out files. How accurate were your estimates?
</li>

</ul>
</li>
<li> <b>Question</b>: Verify your answers to the above questions by advancing the clock and checking the content of the generated .out files. How accurate were your estimates?
</li>

</ul>

<Header as="h3" block>
Take-Away
</Header>

<p><strong>
Inspecting the state of the batch queue is easy and can help you understand what is going on on the cluster.
We'll see in the next tab that it can even help you reduce job turnaround time.
</strong></p>

<Header as="h3" block>
You feedback is appreciated
</Header>

<FeedbackActivity content={
<FeedbackQuestions feedbacks={[
{
tabkey: "batch_queue",
module: "C.1"
},
]} />
} />

<Header as="h3" block>
Take-Away
</Header>

<p><strong>
Inspecting the state of the batch queue is easy and can help you understand what is going on on the cluster.
We'll see in the next tab that it can even help you reduce job turnaround time.
</strong></p>

<Header as="h3" block>
You feedback is appreciated
</Header>

<FeedbackActivity content={
<FeedbackQuestions feedbacks={[
{
tabkey: "batch_queue",
module: "C.1"
},
]} />
} />

</>
]} auth={auth} content="this content"></SigninCheck>


</>
)
Expand Down
Loading

0 comments on commit a61b642

Please sign in to comment.