- (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.
- 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).
- Print the current working directory
- Change directories into a directory called somedir
- List the names of all files in the current directory
- (Optional) Write a for loop which prints each integer 0 to 10.
- (Optional) Print the names of all files ending in .txt in the current directory or any of its subtree
- (Optional) Print the last 2 lines of a plain text file in the current directory called txt
- (Optional) Print the entire contents of a file in the current directory called txt
- Using Euler and the module command, answer the following questions.
- Are there any modules loaded (module list) when you log in?
- What version (version number) of gcc is available to you without loading any modules?
- List all gcc modules available on Euler.
- Which gcc module is loaded when you run module load gcc and what version number of gcc is loaded by that module?
- 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.)
- 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.
- Research some useful Slurm tools (one sentence responses):
- Explain what SLURM SUBMIT DIR is in the environment of a running Slurm job.
- In what directory does a Slurm job on euler begin execution. You should run some jobs to check this?
- Explain what SLURM JOB ID is in the environment of a running Slurm job.
- Explain what the following script header line specifies: #SBATCH array=0-9
- Explain what SLURM ARRAY TASK ID is in the environment of a running Slurm job with
the header from part (d).
- Explain what the following script header line specifies: #SBATCH gres=gpu: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.