$30
Homework 2
Copy the hw2code.tar file to Scholar using ftp, e.g., ftp scholar.rcac.purdue.edu.
Log into scholar.rcac.purdue.edu and untar it (tar -xv -f hw2code.tar) and go into the resulting
hw2code directory. Compile omp_hello.c and omp_hello2.c and put the output of the compiles into
omp_hello and omp_hello2, respectively. Run the programs using the qsub command and the
openmp.sub script.
What to turn in: You will get output files called openmp.sub.oxxxx and openmp.sub.exxxx, where x
are integer digits. The .oxxxx file contains the stdout output from the programs, and the .exxxx
contains the stderr output. The .exxxx file should be empty. Create a directory called userid (your
Purdue userid, not literally userid!) and put the .exxxx and .oxxxx files into the directory. Create a .zip
file for the directory and turn this into Blackboard.
Notes:
To compile with the Intel compiler, once logged into Scholar type
module load intel
icc -qopenmp -std=c99 your_program.c -o your_program
You can submit your job using:
qsub openmp.sub
but it will default to a longer running time than we need, and will end up in a lower priority, slower
queue. Using the command
qsub -l walltime=00:00:30 openmp.sub
will give your job 30 seconds of walltime, which is approximately 30 seconds on all 20 cores of a
Scholar node, and will be more than enough time to run this job, and most of our programs.
Documentation can be found at the course web page at
https://engineering.purdue.edu/~smidkiff/ece563/scholar.html. It has a link to the main scholar
documentation page at https://www.rcac.purdue.edu/knowledge/scholar/all, which will prove
invaluable during the semester.
Even though this is due on Wednesday, if you don’t have it working then I’ll give you more time. It is
essential for future homework and the project that you figure this out.