(→Numerical Methods) |
(→Language Specific Resources) |
||
Line 79: | Line 79: | ||
* [[Media:Frontiers_of_HPC_Unified_Parallel_C.pdf|Unified Parallel C (UPC)]] (slides: overview/usage/examples) | * [[Media:Frontiers_of_HPC_Unified_Parallel_C.pdf|Unified Parallel C (UPC)]] (slides: overview/usage/examples) | ||
* [[Using R and MPI]] | * [[Using R and MPI]] | ||
− | |||
* [[Using CRAY POINTERS in a FORTRAN 90 PROGRAM]] | * [[Using CRAY POINTERS in a FORTRAN 90 PROGRAM]] | ||
* [[Reading from c BINARY_FILES generated by a fortran program]] | * [[Reading from c BINARY_FILES generated by a fortran program]] |
Revision as of 00:47, 10 November 2011
Contents
General Help
- Knowledge Base (an expanded FAQ)
SHARCNET
Introductory Material
- Attending SHARCNET Webinars (online reference)
- Getting Started with SHARCNET (online reference)
User Environment
- Hardware/System Resources (online reference of all documented systems)
- SSH (Secure Shell) (self-directed tutorial)
- Configuring your software environment with Modules
- Choosing A Password (self-directed tutorial)
- Linux and vi Editor Fundamentals (self-directed tutorial/online reference)
- Getting Started with Compiling Code on SHARCNET (self-directed tutorial)
- SHARCNET Software Development Environment (self-directed tutorial)
- Signal Handling and Checkpointing (self-directed tutorial)
- Managing a Large Number of Jobs
- Revision control with Subversion (self-directed tutorial)
- Revision control with Git
- Locally installed software (software build documentation)
- Make utility and makefiles
Programming
General Parallel Programming
- Overview of HPC (slides)
- Parallel Computing Models (slides)
- Parallel Software Design (slides)
- Designing and Building Parallel Programs (online book and references)
- Reviews of Selected Development Stage Languages (niche and/or development-stage languages and runtime platforms)
MPI
- Getting Started with MPI (self-directed tutorial)
- MPI Standard (online reference)
- MPI Forum (online reference)
- MPI: The complete Reference (Snir, et al.) (online book)
- Parallel Java: Using MPJ Express on SHARCNET (installation/usage instructions)
Serial Processing
- Automating Tasks Using bash (slides: overview/examples)
- Automating Tasks Using bash (self-directed tutorial - under construction)
- Serial Farming / Throughput Computing (self-directed tutorial)
- OpenMP (self-directed tutorial)
- Introduction to POSIX Threads (slides: introduction/usage)
- Pthreads Tutorial (online tutorial)
- Pthreads API (online reference)
- Intel Guide for Developing Multithreaded Applications (online reference)
Accelerators
- Programming the Cell Multiprocessor (slides: introduction/usage)
- GPGPU / GPU Accelerated Computing (self-directed tutorial)
- FPGA Accelerated Computing (self-directed tutorial)
- Articles of Interest
- State-of-the-art in heterogeneous computing Scientific Programming 18 (2010) 1–33 DOI 10.3233/SPR-2009-0296 (comprehensive 33-page article)
- Debunking the 100X GPU vs. CPU Myth: An Evaluation of Throughput Computing on CPU and GPU ACM SIGARCH Computer Architecture News 2010 (comparison of different computing kernels, including optimization and performance, on the GPU and CPU, as well as accurate benchmarks)
Performance Analysis / Debugging
- Common Bugs and Debugging with gdb (self-directed tutorial)
- Parallel Debugging with DDT (tutorial)
- Measuring Parallel Scaling Performance (tutorial)
- Analyzing I/O Performance
- Monitoring Jobs
Language Specific Resources
- Using MATLAB (self-directed tutorial)
- Fortran Signal Handling (article)
- Contrasting MATLAB and Fortran (slides)
- Unified Parallel C (UPC) (slides: overview/usage/examples)
- Using R and MPI
- Using CRAY POINTERS in a FORTRAN 90 PROGRAM
- Reading from c BINARY_FILES generated by a fortran program
Numerical Methods
- Solving Systems of Sparse Linear Equations (self-directed tutorial)
- Analytical Computation (self-directed tutorial)
- RUNGE-KUTTA Tutorial (self-directed tutorial)
- BLACS (Basic Linear Algebra Communication Subprograms) Examples
- LAPACK and ScaLAPACK Examples
- INTERPRETERS vs COMPILERS
- NAG LAPACK "extras" library
- EIGENVALUES OF NON-SYMMETRIC MATRICES
- KRONECKER PRODUCT (ScaLAPACK,OCTAVE,F90)
- Eigenproblem solved with PETSc_SLEPc
- Complete FFTW Examples in C F90 OCTAVE and PETSc
- Advanced SBVP Example in C, F90, OCTAVE and PETSc
- Parallel Numerical Solution of PDEs with Message Passing (article/tutorial)
Domain Portals
- Astrophysics
- Bioinformatics
- Digital Humanities
- HPC Services for Industry
- Chemistry, Biochemistry and Biophysics
- Gaussian on SHARCNET systems
Visualization
- Remote Graphical Connections (Using graphical programs remotely)
- Visualization of 2D and 3D datasets with ParaView
- Visualization Workstations
AccessGrid
Seminar Archive
- Online Seminars (recordings of recent online seminars)
- Recorded Talks (live talks recorded by SHARCNET)
- Summer School 2010 "Preschool" talks
Wiki Help
SOFTWARE PACKAGES USAGE
LAPACK
Solve Linear System Ax=b
As an example of using LAPACK let's consider the following identity of linear equations of order 6:
If we write the above identity with following symbols:
- Ax = b
and assume that x is unknown, then we can try to solve for x using some LAPACK subroutine. Here is how we proceed:
- Find out what LAPACK subroutine solves the system of linear equations:
- Ax = b
- (subroutine dgesv is what we need).
- Write a fortran program which defines A, b and calls dgesv to solve for x
! file_name = solve.f90 program solve_N6 ! ! This program solves Ax=B using LAPACK subroutine dgesv ! A is a double precision 6 by 6 matrix defined in the program. ! B is a double precision vector of length 6 also defined in the program. ! implicit none integer info, N, nrhs, lda, ldb parameter (N=6, nrhs=1, lda=N, ldb=N) double precision A(N,N), B(ldb,nrhs) integer indx(N) integer i, j ! ! Defined matrix A: data A / 3. , -1. , 0. , 0. , 0. , 1. , & & -1. , 3. , -1. , 0. , 1. , 0. , & & 0. , -1. , 3. , 0. , 0. , 0. , & & 0. , 0. , 0. , 3. , -1. , 0. , & & 0. , 1. , 0. , -1. , 3. , -1. , & & 1. , 0. , 0. , 0. , -1. , 3. / data B / 7. , 7. , 7. , 7. , 7. , 14. / ! print *,"N = ", N print *,"A = " print *,A print *,"B = " print *,B print *," " call dgesv( N, nrhs, A, lda, indx, B, ldb, info ) ! ! Parameters of dgesv ! ! N is the matrix size, N >= 1 . (input) ! ! nhrs is the number of Right Sides to be solved ! --here 1 (input) ! ! A is the matrix in Ax = B, overwritten on output by ! L and U -- where L*U = A (rows permuted) ! A is double precision N by N , but with leading ! dimension lda >= N . ! A is input, but is different on output (in/out) . ! ! lda is the leading dimension of A. lda >= N . ! ! indx , integer array dimension N, indx(i) ! was interchanged with the ith row of A. (output) ! ! B , double precision array of dimension (ldb,nhrs) ! On input it is the right hand side(s) B, on output ! it is the solution vector(s) x. (in/out) ! ! info integer, output info = 0 indicates a successful exit ! info <= -i, the ith argument was illegal. ! info = i means u(i,i) was zero so factorization ! not completed. ! print *,"X = " print *,B stop end
- Write a makefile named Makefile to compile, link, and submit a job to the batch system
- Make sure to include the ACML library for intel by issuing the command:
module load acml/ifort/4.4.0
before using the makefile Makefile:
# file_name = Makefile # Makefile for solve.f90 ROOTDIR = $(shell pwd) SRC = solve.f90 OBJ = $(SRC:.f90=.o) LIBS = $(LDFLAGS) -lacml TARGET = solve_exec OUTPUTFILE=FORTRAN_LAPACK_SOLVE all: $(TARGET) $(TARGET): $(OBJ) $(FC) -o $@ $(CPPFLAGS) $(OBJ) $(LIBS) $(OBJ): ${SRC} $(FC) $(FFLAGS) -c ${SRC} help:; @echo " " @echo "USAGE: " @echo "make help To get this listing" @echo "make To compile the FORTRAN LAPACK program in current environment" @echo "make subjob To submit the executable to a batch queue using sqsub" @echo "make clean Remove *.o and executable files" @echo "make list List the compilers in current environment" @echo " " list: @echo @echo "ROOTDIR: $(ROOTDIR)" @echo "FC Compiler: $(FC)" @echo "FFLAGS: $(FFLAGS)" @echo "LDFLAGS: $(LDFLAGS)" @echo "OUTPUT FILE: $(OUTPUTFILE)" @echo " " @echo "LD_LIBRARY_PATH: " $(LD_LIBRARY_PATH) clean: @echo "Removing *.o and executable files" rm -rf *.o $(TARGET) subjob:; rm -rf $(OUTPUTFILE) sqsub -t -r 1h --mpp=2.0G -o ${CLU}_$(OUTPUTFILE) -n 1 ./$(TARGET)
For more details on the identity of linear equations of any order N, see:
https://www.sharcnet.ca/help/index.php/Solving_Systems_of_Sparse_Linear_Equations
Also, you can find more information on modules and make utility and makefiles in the following two references:
https://www.sharcnet.ca/help/index.php/Configuring_your_software_environment_with_Modules
https://www.sharcnet.ca/help/index.php/Make_utility_and_makefiles