Clusters and hpc exercises

-See clusters and HPC material here

-For some of the following exercises a Triton account is needed in order to complete the exercises successfully.

-If you do not have cluster access, you can still try them out or leave them undone, it should not affect your overall course performance too much.

What is HPC?

Which of the following claims are true when it comes to using Triton (or clusters in general)?


Write down a command that you would execute to perform asked operation.

How do you load software to use on Triton?
How would you list available modules in Anaconda?
Let’s say you submitted a job with id 7. What command can you use to debug a running job and view its detailed status?

Job script

Take a look at the following scripts named and and answer questions. below calculates the Pearson product-moment correlation for two 1000x1000 matrices.

rounds = 8
t = time.time()

for i in range(rounds):
    a = np.random.random([1000, 1000])
    b = np.random.random([1000, 1000])
    rslt = np.corrcoef(a,b)

t_taken = time.time() - t

print('Takes {} seconds to calculate pearson product-moment correlation for 1000x1000 matrices'.format(t_taken))

#SBATCH --job-name=run_ppmc
#SBATCH --output=ppmc.out
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=2
#SBATCH --time=00:05:00
#SBATCH --mem=2G

module load anaconda

export OMP_PROC_BIND=true

Running sbatch and then checking sacct history you can see

run_ppmc and the program calc_ppmc ran inside it as separate step.

Total memory reservation for the job is 2G.
The OMP_PROC_BIND variable sets how threads bind to OpenMP places

Hello world

A+ presents the exercise submission form here.

Pi iters

A+ presents the exercise submission form here.


Posting submission...