SGC - Small Geo Cluster

Parametry SGC

Klastr je sestaven z relativně homogenní změti následujích počítačů:

Sofwarové vybavení

Jak na SGC pracovat

Co budete potřebovat

Jak překládat Jak spustit paralelní kód

Praktické rady

Používat Screen

Jak nastavit logování bez zadávání hesla (převzato)

Setting up password-less ssh to the networked Linux workstations is done by first generating an authentication key on the host you intend to run the code from:

% ssh-keygen -t rsa

During this procedure you will be prompted for a passphrase - just hit return at that step (which corresponds to having no passphrase). After you have done this you need to ssh the contents of the file "~/.ssh/id_rsa.pub" created by the previous command to one of the networked Linux machines you wish to use. For example, execute:

% cat ~/.ssh/id_rsa.pub | ssh user@machine2 'cat >> .ssh/authorized_keys'

where "user" is your username, and "machine2" is one of the other workstations. If the file "~/.ssh/authorized_keys" doesn't exist, you will need to create it.

You should then try connecting via ssh to each of the workstations you wish to use. The first time you ssh, you will be asked if you want to continue connecting. Type "yes" at this prompt. Subsequent ssh connections should occur without this step (and without requiring a passwords).

Příklad

!
! Ukazka kombinace MPI a MP "Ahoj katedro" ve Fortranu 90
!
program main
    use mpi
    use omp_lib
    implicit none
    integer :: ierr, rank, sizerank, thread,sizethread

    call MPI_INIT(ierr)
    call MPI_COMM_RANK(MPI_COMM_WORLD, rank, ierr)
    call MPI_COMM_SIZE(MPI_COMM_WORLD, sizerank, ierr)

!$OMP PARALLEL PRIVATE(thread,sizethread)

    thread = OMP_GET_THREAD_NUM()
    sizethread = OMP_GET_NUM_THREADS()
    write(*,'(A26,I3,A3,I3,A8,I3,A3,I3)') "Ahoj katedro. Jsem proces ", rank+1, " / ", sizerank, " vlakno ", thread+1," / ",sizethread


!$OMP END PARALLEL

    call MPI_FINALIZE(ierr)

end

František Gallovič