== Description ==
A more complex version of simple synchronization example. Different
ways to solve the prolem is provided in different version of the solution.

== How to do the exercises ==

c_exercise_bank_account.c file contains the exercise, please open the the exercise file, modify it with OpenMP pragma and runtime routines.

[Solution files are also provided. They follow the naming convention *_solution_*.]

== Compilation and running on the training machines with training accounts ==

=== Compilation ===

source build_job.sh <compiler name (cray, intel, gnu, pgi)>

e.g. source build_job.sh cray

=== Running ===

Batch mode(easy to do, same command will work for all machines)
---------------------------------------------------------------
    source run_job.sh <executable name>

    e.g. source run_job.sh c_exercise_bank_account.x 
    
Interactive mode (a bit more work, but more useful for development and testing)
-------------------------------------------------------------------
    For Blue Waters:
    ----------------
    1. Allocate a compute node for 1 hour,
        qsub -I -l nodes=1:ppn=32:xe -l walltime=01:00:00
    2. Once allocated, run the program like any executable
        ./c_exercise_bank_account.x
    For Cori:
    ---------
    1. Allocate a haswell compute node for 1 hour,
        salloc -N 1 -C haswell -p regular -t 1:00:00
    2. Once allocated, run the program like any executable
        ./c_exercise_bank_account.x
    For Edison:
    -----------
    1. Allocate a compute node for 1 hour,
        salloc -N 1 -p regular -t 1:00:00
    2. Once allocated, run the program like any executable
        ./c_exercise_bank_account.x
    For Stampede2:
    --------------
    1. Allocate a KNL compute node for 1 hour,
        idev -p normal -N 1 -n 68 -m 60
    2. Once allocated, run the program like any executable
        ./c_exercise_bank_account.x

====================================================================================

== Compilation and running on other machines or with different accounts ==

=== Compilation ===

make compiler=<comiler name (cray, intel, gnu, pgi)>
e.g. make comiler=cray

=== Running ===

./<executable name>

e.g. ./c_exercise_bank_account.x


