From Documentation
Jump to: navigation, search
(Language Specific Resources)
(Software)
 
(95 intermediate revisions by 13 users not shown)
Line 1: Line 1:
[[Image:Sharcnet_logo.jpg|center]]
+
__NOTOC__
<center><big>'''Help Wiki'''</big></center>
+
{|  style="border-spacing: 8px;"
  
----
+
| valign="top" style="cellpadding:1em; padding:1em; border:3px solid #0645ad; background-color:#87cefa; border-radius:7px"|
 +
== New to SHARCNET ==
  
 +
* [[Getting an Account with SHARCNET | Getting an Account]]
 +
* [[Attending SHARCNET Webinars]]
 +
* [[Dedicated Resources | NRAC & Dedicated Resources]]
 +
* [https://docs.computecanada.ca/wiki/Compute_Canada_Documentation Compute Canada Documentation]
  
__TOC__
+
| valign="top" style="cellpadding:1em; padding:1em; border:3px solid #0645ad; background-color:#f6e8e8; border-radius:7px"|
  
 +
== Tutorials ==
  
== General Help ==
+
* [[LINUX_SHELL | LINUX & SHELL]]
* [[Knowledge Base]] (an expanded FAQ)
+
* [[HPC_PROGRAMMING | Serial & Parallel Programming]]
 +
* [[Online Seminars#Online Seminars (recordings)|Online General Interests Seminar Series]]
 +
* [https://www.sharcnet.ca/help/index.php/Summer_Schools SHARCNET Summer Schools]
 +
* [https://goo.gl/HXAdC6  '''SHARCNET on YouTube''']
 +
|-
 +
| valign="top" width="50%" style="padding:1em; border:3px solid #0645ad; background-color:#fafad2; border-radius:7px" |
  
== SHARCNET ==
+
== Software ==
=== Introductory Material ===
+
* [https://docs.computecanada.ca/wiki/Utiliser_des_modules/en Modules]
* [[Attending SHARCNET Webinars]] (online reference)
+
* [https://docs.computecanada.ca/wiki/Available_software Available Software ]  
* [[Getting Started with SHARCNET]] (online reference)
+
  
=== User Environment ===
+
| valign="top" style="padding:1em; border:3px solid #0645ad; background-color:#e8f6e8; border-radius:7px" |
* [[Hardware/System Resources]] (online reference of all documented systems)
+
* [[SSH|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)
+
** [[vi and vim configuration]]
+
* [[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]]
+
* [[Using Subversion|Revision control with Subversion]] (self-directed tutorial)
+
* [[Git|Revision control with Git]]
+
* [[Locally installed software]] (software build documentation)
+
* [[Make utility and makefiles]]
+
  
== Programming ==
+
== Hardware ==
=== General Parallel Programming ===
+
*[https://docs.computecanada.ca/wiki/Graham Graham - SHARCNET's main cluster]
* [[Media:Overview_of_HPC.pdf|Overview of HPC]] (slides)
+
*[[Dusky|Dusky]] - smaller cluster incorporating older hardware
* [[Media:Parallel_Computing_Models.pdf|Parallel Computing Models]] (slides)
+
|}
* [[Media:Parallel_Software_Design.pdf|Parallel Software Design]] (slides)
+
* [http://www.mcs.anl.gov/~itf/dbpp/ 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)
+
* [http://www.mcs.anl.gov/research/projects/mpi/ MPI Standard] (online reference)
+
* [http://www.mpi-forum.org/ MPI Forum] (online reference)
+
* [http://www.netlib.org/utk/papers/mpi-book/mpi-book.html MPI: The complete Reference (Snir, et al.)] (online book)
+
* [[Parallel Java: Using MPJ Express on SHARCNET]] (installation/usage instructions)
+
===Serial Processing===
+
* [[Media:Automating_Tasks_Using_bash.pdf|Automating Tasks Using bash]] (slides: overview/examples)
+
* [[Automating Tasks Using bash]] (self-directed tutorial - under construction)
+
* [[Throughput Computing|Serial Farming / Throughput Computing]] (self-directed tutorial)
+
 
+
===Shared Memory (SMP)===
+
* [[OpenMP]] (self-directed tutorial)
+
* [[Media:Introduction_to_POSIX_Threads.pdf|Introduction to POSIX Threads]] (slides: introduction/usage)
+
* [http://randu.org/tutorials/threads/ Pthreads Tutorial] (online tutorial)
+
* [http://cs.pub.ro/~apc/2003/resources/pthreads/uguide/document.htm Pthreads API] (online reference)
+
* [http://software.intel.com/en-us/articles/intel-guide-for-developing-multithreaded-applications/ Intel Guide for Developing Multithreaded Applications] (online reference)
+
 
+
===Accelerators===
+
* [[Media:Programming_the_Cell_Multiprocessor.pdf|Programming the Cell Multiprocessor]] (slides: introduction/usage)
+
* [[GPU Accelerated Computing| GPGPU / GPU Accelerated Computing]] (self-directed tutorial)
+
* [[FPGA Accelerated Computing]] (self-directed tutorial)
+
* ''Articles of Interest''
+
** [http://babrodtk.at.ifi.uio.no/files/publications/brodtkorb_etal_star_heterocomp_final.pdf State-of-the-art in heterogeneous computing] <i>Scientific Programming 18 (2010) 1–33 DOI 10.3233/SPR-2009-0296</i> (comprehensive 33-page article)
+
** [http://portal.acm.org/citation.cfm?id=1816021&coll=GUIDE&dl=GUIDE&CFID=11111111&CFTOKEN=2222222&ret=1 Debunking the 100X GPU vs. CPU Myth: An Evaluation of Throughput Computing on CPU and GPU] <i>ACM SIGARCH Computer Architecture News 2010 </i> (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)
+
* [[Media:Fortran_Signal_Handling.pdf|Fortran Signal Handling]] (article)
+
* [[Media:Contrasting_MATLAB_and_Fortran.pdf|Contrasting MATLAB and Fortran]] (slides)
+
* [[Media:Frontiers_of_HPC_Unified_Parallel_C.pdf|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]]
+
* [[Media:Parallel_Numerical_Solution_of_PDEs_with_Message_Passing.pdf|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 ==
+
* [[How To Use]]
+
* [[Presentations]]
+
* [[Common Problems]]
+
* [[AccessGrid on your Desktop]]
+
== Seminar Archive ==
+
* [[Online Seminars#Online Seminars (recordings)|Online Seminars]] (recordings of recent online seminars)
+
* [[Online Seminars#Recorded Talks|Recorded Talks]] (live talks recorded by SHARCNET)
+
* [[Summer School 2010 "Preschool" talks]]
+
 
+
== Wiki Help ==
+
* [http://www.mediawiki.org/wiki/Manual:Configuration_settings Configuration settings list]
+
* [http://www.mediawiki.org/wiki/Manual:FAQ MediaWiki FAQ]
+
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]
+
 
+
== 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:
+
: <math>\mathbf
+
 
+
  \begin{bmatrix}
+
  3.0 &-1.  & 0.0 & 0.0 & 0.0 & 1.0 \\
+
  -1. & 3.0 &-1.  & 0.0 & 1.0 & 0.0 \\
+
  0.0 & -1. & 3.0 & 0.0 & 0.0 & 0.0 \\
+
  0.0 & 0.0 & 0.0 & 3.0 & -1. & 0.0 \\
+
  0.0 & 1.0 & 0.0 & -1. & 3.0 &-1.  \\
+
  1.0 & 0.0 & 0.0 & 0.0 & -1. & 3.0
+
  \end{bmatrix}
+
  \begin{bmatrix}
+
  1.0 \\
+
  2.0 \\
+
  3.0 \\
+
  4.0 \\
+
  5.0 \\
+
  6.0 \\
+
  \end{bmatrix}
+
  =
+
  \begin{bmatrix}
+
  7.0 \\
+
  7.0 \\
+
  7.0 \\
+
  7.0 \\
+
  7.0 \\
+
14.0 \\
+
  \end{bmatrix}
+
</math>
+
 
+
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
+
 
+
=== ScaLAPACK ===
+
=== PETSc_SLEPc ===
+
=== R ===
+

Latest revision as of 12:45, 8 November 2019

New to SHARCNET

Tutorials

Software

Hardware