[Solved] ME759-Assignment 1

$25

File Name: ME759-Assignment_1.zip
File Size: 169.56 KB

SKU: [Solved] ME759-Assignment 1 Category: Tag:
5/5 - (1 vote)
  1. (a) Read the files md and slurm usage.md from the general directory of the ME759 Resource Repo. These are very important documents of the expectations for your assignments throughout the semester.
    • Read the hw repos.md file and follow the instructions to create an account. This is very important and must be done in order for you to have a way to turn in HW02.
    • At least skim md. This contains a quick guide for effectively working between your local computer and Euler.
  2. Write a single line of bash for each of the following (you can use pipes and/or redirects). Pretend that any files or directories mentioned exist (dont turn them in).
    1. Print the current working directory
    2. Change directories into a directory called somedir
    3. List the names of all files in the current directory
    4. (Optional) Write a for loop which prints each integer 0 to 10.
    5. (Optional) Print the names of all files ending in .txt in the current directory or any of its subtree
    6. (Optional) Print the last 2 lines of a plain text file in the current directory called txt
    7. (Optional) Print the entire contents of a file in the current directory called txt
  3. Using Euler and the module command, answer the following questions.
    1. Are there any modules loaded (module list) when you log in?
    2. What version (version number) of gcc is available to you without loading any modules?
    3. List all gcc modules available on Euler.
    4. Which gcc module is loaded when you run module load gcc and what version number of gcc is loaded by that module?
    5. List one other piece of software that you know that has a module on Euler and one sentence about what it does. (If you arent familiar with any of the other software, look one up and write a sentence about it.)
  4. Write a bash script called sh with a Slurm header which asks for
    • 2 CPU cores
    • A job name of FirstSlurm
    • An output file called out
    • An error file called err

and runs a single command to print the hostname of the machine (compute node) running the job. This job should be submittable by running sbatch task4.sh on the head node.

  1. Research some useful Slurm tools (one sentence responses):
    1. Explain what SLURM SUBMIT DIR is in the environment of a running Slurm job.
    2. In what directory does a Slurm job on euler begin execution. You should run some jobs to check this?
    3. Explain what SLURM JOB ID is in the environment of a running Slurm job.
    4. Explain what the following script header line specifies: #SBATCH array=0-9
    5. Explain what SLURM ARRAY TASK ID is in the environment of a running Slurm job with

the header from part (d).

  1. Explain what the following script header line specifies: #SBATCH gres=gpu:1
  1. Write a C++ program called cpp which takes a command line argument N, and prints out each integer from 0 to N (including 0 and N) separated by spaces on a single line ending in a newline.
    • Compile command: g++ task6.cpp -Wall -O3 -o task6
    • Run command: ./task6 N
    • Expected output (followed by newline): 0 1 2 3 N
    • Expected output for N = 6 (followed by newline): 0 1 2 3 4 5 6

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] ME759-Assignment 1
$25