updated information

This commit is contained in:
Wes Bethel 2023-10-27 06:01:12 -07:00
parent ac8cf2a2d9
commit 66521e4d2d

View File

@ -32,11 +32,11 @@ To build and run this code, you need to have the following software tools instal
# Default build instructions: # Default build instructions:
`% cd sum_harness_instructional` # contains the source files and CMakeLists.txt file cd sum_harness_instructional # contains the source files and CMakeLists.txt file
`% mkdir build` mkdir build
`% cd build` cd build
`% cmake ../` # cmake generates lots of output cmake ../ # cmake generates lots of output
`% make` # to build the programs make # to build the programs
@ -52,17 +52,17 @@ You will need to add code in three places:
# Running the codes # Running the codes
Once the codes are built, you should be able to just run each one from the command line: Once the codes are built, you should be able to just run each one from the command line from within your build directory:
`% ./sum_direct` ./sum_direct
or or
`% ./sum_indirect` ./sum_indirect
or or
`% ./sum_vector` ./sum_vector
When you run each code, it will iterate through the set of problem sizes predefined inside benchmark.cpp When you run each code, it will iterate through the set of problem sizes predefined inside benchmark.cpp
@ -74,23 +74,60 @@ After [logging in to perlmutter at NERSC,](https://docs.nersc.gov/systems/perlmu
Set up your environment to make use of the CPU nodes by typing in this command: Set up your environment to make use of the CPU nodes by typing in this command:
`% module load cpu` module load cpu
Then follow the build instructions above. Then follow the build instructions above.
Once you have built the codes, you may request interactive access to a Perlmutter CPU node by using this command: Once you have built the codes, you may request interactive access to a Perlmutter CPU node by using this command:
`% salloc --nodes 1 --qos interactive --time 00:30:00 --constraint cpu --account=m3930` salloc --nodes 1 --qos interactive --time 00:30:00 --constraint cpu --account=m3930
Once you are on an interactive CPU node, run each of the codes using these commands: Once you are on an interactive Perlmutter CPU node, run each of the codes using these commands from within your build directory:
`srun ./sum_direct` ./sum_direct
`srun ./sum_indirect` ./sum_indirect
`srun ./sum_vector` ./sum_vector
# Using the Python scripts for plotting on Perlmutter@NERSC
Included in the code harness are two Python files that will load a
csv text file and use matplotlib.pyplot to create a 3-variable chart.
Please modify these Python files as needed to update the axis labels,
plot title, and so forth.
To run Python on Perlmutter, first do a:
module load python
That command will make available to you a full conda environment that
is preloaded with many of the commonly used Python packages. The default
version of Python as of the time of this writing is 3.11.6.
Once you've loaded the python module, you can see the set of
installed packages using this command:
conda list
When you run the provided plot\_3vars.py Perlmutter, it will produce some
output to the console and will also attempt to display the plot on your
screen.
In order for the display to actually appear on your screen you must use
the -Y argument with ssh when you login, e.g.:
ssh -Y user@saul-p1.nersc.gov
There are two python scripts in the distro: plot\_3vars.py and
plot\_3vars\_savefig.py. The difference between them is that the
plot\_3vars\_savefig.py will in addition to trying to display
the plot to the screen also save an image file named *myplot.png*.
# Additional build options -- Compiler Optimization Level # Additional build options -- Compiler Optimization Level
As of the time of this writing (Oct 2023), most SFSU students will not need
the information about different build options unless otherwise
instructed.
By default, the CMakeLists.txt will do a "Release" build, which means there will be full compiler optimizations. By default, the CMakeLists.txt will do a "Release" build, which means there will be full compiler optimizations.
If need be, there are two methods for modifying the compiler optimization level. If need be, there are two methods for modifying the compiler optimization level.