LAM/MPI logo

LAM/MPI General User's Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |   all just in this list

From: etienne gondet (etienne.gondet_at_[hidden])
Date: 2004-01-29 09:17:57


    Hello,

       I compile with pgi and link with lam a small fortran program with
a basic local array
in a subroutine bosse. When I use the pgi flag -mp the subroutine bosse
either failed or never finish.

Is it any stack limitations with lam .

    What I don't understand: it's why if I used an automatic array
(local array but with dimension through argument)
in subroutine bosse there isn' any problems.

    Note the problems is solved if not using -mp but it should be a
severe limitation for hybrid parallel algorithm
with both mpi and OpenMP using lam.

    Any clue about what limitations and how to change it.

Etienne Gondet
GIP MERCATOR Océan
8-10 rue HERMES
31526 RAMONVILLE SAINT-AGNE CEDEX
France
tel: 05 61 39 38 11 (from France); 33 5 61 39 38 11 (other)
fax: 05 61 39 38 99 (from france); 33 5 61 39 38 99 (other)


SUBROUTINE BOSSE(id_size, rang)
  include 'mpif.h'
  INTEGER,parameter :: dim=1024
  INTEGER ,DIMENSION(dim) :: valeurs
  INTEGER ,DIMENSION(id_size) :: cla_autom
  INTEGER i,code,rang
  print *,'IN BOSSE'
  CALL FLUSH(6)

  OPEN(10,file='resultats')
  OPEN(11,file='resultats1')
  OPEN(12,file='resultats2')
    IF (rang.EQ.2) THEN
          DO i=1,dim
            valeurs(i)=i
          ENDDO
          DO i=1,id_size
            cla_autom(i)=i
          ENDDO
      ENDIF

      CALL mpi_bcast(valeurs,dim,MPI_INTEGER,2,MPI_COMM_WORLD,code)
      CALL mpi_bcast(cla_autom,id_size,MPI_INTEGER,2,MPI_COMM_WORLD,code)
      CALL mpi_barrier(MPI_COMM_WORLD,code)

      IF (rang.EQ.0) THEN
          print *, 'sur proc 0 valeurs(10) est :',valeurs(10)
! WRITE(10,*)'sur le proc no 0 valeurs est :',valeurs(:)
      ENDIF

      IF (rang.EQ.1) THEN
          print *, 'sur proc 1 valeurs(10) est :',valeurs(10)
! WRITE(11,*)'sur le proc no 1 valeurs est :',valeurs(:)
      ENDIF

      IF (rang.EQ.3) THEN
          print *, 'sur proc 3 valeurs(10) est :',valeurs(10)
! WRITE(12,*)'sur le proc no 2 valeurs est :',valeurs(:)
      ENDIF

      CLOSE(10)
      CLOSE(11)
      CLOSE(12)
 END SUBROUTINE BOSSE


!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -*- Mode: Fortran -*- !!!!!!!!!!!!!!!!!!!!!!!!!!!
!! Chef.f --- Exemple de spawn d exec a grosse taille
!!
!! Auteur : Etienne Gondet (GIP Mercator-Ocean) <Etienne.Gondet_at_[hidden]>
!! Créé le : Wed Jan 29 12:49:16 2004
!! Dern. mod. par : Etienne Gondet (GIP Mercator-Ocean) <Etienne.Gondet_at_[hidden]>
!! Dern. mod. le : Wed Jan 29 16:51:22 2004
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

PROGRAM Ouvriers
  IMPLICIT NONE

  INCLUDE 'mpif.h'
  INTEGER, PARAMETER :: ip_size=100*1024*1024
  INTEGER :: rang, nb_procs_ouvriers, nb_procs_chefs, rang_ouvrier,rang_maitre, code
  INTEGER :: inter_comm, intra_comm, nb_procs
  LOGICAL :: drapeau=.true.
  INTEGER, DIMENSION(MPI_STATUS_SIZE) :: statut
  INTEGER :: i
  INTEGER :: resultat=0, rang_chef=0, etiquette=1111

  CALL MPI_INIT(code)
  CALL MPI_COMM_SIZE(MPI_COMM_WORLD, nb_procs_ouvriers, code)
  PRINT *,'Nombre de processus dans MPI_COMM_WORLD : ',nb_procs_ouvriers

  !... Mon rang dans MPI_COMM_WORLD
  CALL MPI_COMM_RANK(MPI_COMM_WORLD, rang, code)
  PRINT *, "Mon rang parmi les processus ouvriers : ", rang

  CALL BOSSE(ip_size, rang)

  CALL MPI_FINALIZE(code)
END PROGRAM Ouvriers




  • application/x-java-applet attachment: Makefile