pmodels / mpich

Official MPICH Repository
http://www.mpich.org
Other
566 stars 279 forks source link

Hi, I want ask you a question #651

Closed mpichbot closed 8 years ago

mpichbot commented 8 years ago

Originally by liyan liyan063042@gmail.com on 2009-06-12 19:13:42 -0500



   Hi
        I want ask you a quetion,when i compile a fortran 90 code
program(the mpich2 sample pi3f90.f90),it is correct completely. The
command is mpif90 -o pi3f90 pi3f90.90 ,but when i execute the command
mpiexec -n 4 ./pi3f90, the cursor  does not move,the cursor has been
no response,the program can't execute, could you help me ,thanks!
when i debug the program ,the command show as follows :
liyan@liyan-desktop:~/testmpi$ mpif90 -g -o pi3 ./pi3f90.f90
liyan@liyan-desktop:~/testmpi$ mpiexec -gdb -n 4 ./pi3
0-3:  (gdb) l
0-3:  14        !
0-3:  15        !    pi  the calculated result
0-3:  16        !    n   number of points of integration.
0-3:  17        !    x           midpoint of each rectangle's interval
0-3:  18        !    f           function to integrate
0-3:  19        !    sum,pi      area of rectangles
0-3:  20        !    tmp         temporary scratch space for global summation
0-3:  21        !    i           do loop index
0-3:  22
!****************************************************************************
0-3:  23        program main
0-3:  (gdb) l
0-3:  24
0-3:  25        use mpi
0-3:  26
0-3:  27         double precision  PI25DT
0-3:  28         parameter        (PI25DT = 3.141592653589793238462643d0)
0-3:  29
0-3:  30         double precision  mypi, pi, h, sum, x, f, a
0-3:  31         integer n, myid, numprocs, i, rc
0-3:  32        !                                 function to integrate
0-3:  33         f(a) = 4.d0 / (1.d0 + a*a)
0-3:  (gdb) r
0-3:  Continuing.
rank 0 in job 5  liyan-desktop_46330   caused collective abort of all ranks
  exit status of rank 0: killed by signal 9
0:  At line 47 of file ./pi3f90.f90
0:  Fortran runtime error: Bad value during integer read
0:   Process            0  of            4  is alive
0:  Enter the number of intervals: (0 quits)
0:
0:  Program exited with code 02.
liyan@liyan-desktop:~/testmpi$

i use Ubuntu 8.04 ,i have already installed g77 gfortran gcc g++
successfully,i have only one processor in my computer. i think i can
simulate several processors to run a parallel program.when i execute
fortran 77 code program ,it‘s correct completely,the command is mpif77
-o pi fpi.f and mpiexec -n 4 ./pi . but why fortran 90 code program
does't run .  The  mpich2-1.0.8p1
Installation Steps as follows :
1. Unpack the tar file

$tar -zxvf mpich2-1.0.8.tar.gz
2. Choose an installation directory (the default is /usr/local/bin)

mkdir /home/liyan/mpich2-install
3. Choose a build directory.
mkdir /tmp/liyan/mpich2-1.0.8
5. Configure MPICH2, specifying the installation directory, and running
   the configure script in the source directory:
cd /tmp/liyan/mpich2-1.0.8
/home/liyan/mpich2-1.0.8/configure \
        -prefix=/home/liyan/mpich2-install 2>&1 | tee configure.log
6. Build MPICH2

make 2>&1 | tee make.log

7. Install the MPICH2 commands

make install 2>&1 | tee install.log

This problem has troubled me many days,I want your help,thanks !

--
class 1200813
Institute of  Geophysics & Geomatics
China University of Geosciences  Wuhan Hubei province PRC
Postcode 430074

竹直心虚乃吾友,水淡性泊是我师!
mpichbot commented 8 years ago

Originally by liyan on 2009-06-12 19:13:47 -0500


This message has 0 attachment(s)

mpichbot commented 8 years ago

Originally by Anthony Chan on 2009-06-12 23:20:40 -0500



The error message indicates that your program had a fortran
runtime error.  My guess is either your fortran compiler installation
has problem or the configure/make of MPICH2 has bug.  Can you
send us the configure and make outputs as stated in README ?
BTW, mpich2-1.1 has just been released, you may want to try the
the latest version instead.

A.Chan
----- "mpich2" <mpich2-maint@mcs.anl.gov> wrote:

> -------------------------------------------+--------------------------------
>  Reporter:  liyan <liyan063042@gmail.com>  |        Type:  bug
>    Status:  new                            |    Priority:  major
> Milestone:                                 |   Component:  mpich2
> -------------------------------------------+--------------------------------
>
>
>  {{{
>
>     Hi
>          I want ask you a quetion,when i compile a fortran 90 code
>  program(the mpich2 sample pi3f90.f90),it is correct completely. The
>  command is mpif90 -o pi3f90 pi3f90.90 ,but when i execute the
> command
>  mpiexec -n 4 ./pi3f90, the cursor  does not move,the cursor has been
>  no response,the program can't execute, could you help me ,thanks!
>  when i debug the program ,the command show as follows :
>  liyan@liyan-desktop:~/testmpi$ mpif90 -g -o pi3 ./pi3f90.f90
>  liyan@liyan-desktop:~/testmpi$ mpiexec -gdb -n 4 ./pi3
>  0-3:  (gdb) l
>  0-3:  14        !
>  0-3:  15        !    pi  the calculated result
>  0-3:  16        !    n   number of points of integration.
>  0-3:  17        !    x           midpoint of each rectangle's
> interval
>  0-3:  18        !    f           function to integrate
>  0-3:  19        !    sum,pi      area of rectangles
>  0-3:  20        !    tmp         temporary scratch space for global
>  summation
>  0-3:  21        !    i           do loop index
>  0-3:  22
>
> !****************************************************************************
>  0-3:  23        program main
>  0-3:  (gdb) l
>  0-3:  24
>  0-3:  25        use mpi
>  0-3:  26
>  0-3:  27         double precision  PI25DT
>  0-3:  28         parameter        (PI25DT =
> 3.141592653589793238462643d0)
>  0-3:  29
>  0-3:  30         double precision  mypi, pi, h, sum, x, f, a
>  0-3:  31         integer n, myid, numprocs, i, rc
>  0-3:  32        !                                 function to
> integrate
>  0-3:  33         f(a) = 4.d0 / (1.d0 + a*a)
>  0-3:  (gdb) r
>  0-3:  Continuing.
>  rank 0 in job 5  liyan-desktop_46330   caused collective abort of
> all
>  ranks
>    exit status of rank 0: killed by signal 9
>  0:  At line 47 of file ./pi3f90.f90
>  0:  Fortran runtime error: Bad value during integer read
>  0:   Process            0  of            4  is alive
>  0:  Enter the number of intervals: (0 quits)
>  0:
>  0:  Program exited with code 02.
>  liyan@liyan-desktop:~/testmpi$
>
>  i use Ubuntu 8.04 ,i have already installed g77 gfortran gcc g++
>  successfully,i have only one processor in my computer. i think i can
>  simulate several processors to run a parallel program.when i execute
>  fortran 77 code program ,it‘s correct completely,the command is
> mpif77
>  -o pi fpi.f and mpiexec -n 4 ./pi . but why fortran 90 code program
>  does't run .  The  mpich2-1.0.8p1
>  Installation Steps as follows :
>  1. Unpack the tar file
>
>  $tar -zxvf mpich2-1.0.8.tar.gz
>  2. Choose an installation directory (the default is /usr/local/bin)
>
>  mkdir /home/liyan/mpich2-install
>  3. Choose a build directory.
>  mkdir /tmp/liyan/mpich2-1.0.8
>  5. Configure MPICH2, specifying the installation directory, and
> running
>     the configure script in the source directory:
>  cd /tmp/liyan/mpich2-1.0.8
>  /home/liyan/mpich2-1.0.8/configure \
>          -prefix=/home/liyan/mpich2-install 2>&1 | tee configure.log
>  6. Build MPICH2
>
>  make 2>&1 | tee make.log
>
>  7. Install the MPICH2 commands
>
>  make install 2>&1 | tee install.log
>
>
>
>  This problem has troubled me many days,I want your help,thanks !
>
>
>
>
>  --
>  class 1200813
>  Institute of  Geophysics & Geomatics
>  China University of Geosciences  Wuhan Hubei province PRC
>  Postcode 430074
>
>  竹直心虚乃吾友,水淡性泊是我师!
>  ```
>
>
> --
> Ticket URL: <https://trac.mcs.anl.gov/projects/mpich2/ticket/651>
}}}
mpichbot commented 8 years ago

Originally by thakur on 2009-06-19 14:06:12 -0500


resolving until we hear further

mpichbot commented 8 years ago

Originally by liyan on 2009-06-21 00:20:13 -0500



Thank you very much ,my question has been resolved

2009/6/20 mpich2 <mpich2-maint@mcs.anl.gov>:
> -------------------------------------------+--------------------------------
>  Reporter:  liyan <liyan063042@gmail.com>  |        Owner:
>     Type:  bug                            |       Status:  closed
>  Priority:  major                          |    Milestone:
> Component:  mpich2                         |   Resolution:  wontfix
>  Keywords:                                 |
> -------------------------------------------+--------------------------------
>
> Changes (by thakur):
>
>  * status:  new => closed
>  * resolution:  => wontfix
>
> Comment:
>
>  resolving until we hear further
>
> --
> Ticket URL: <https://trac.mcs.anl.gov/projects/mpich2/ticket/651#comment:3>
>

--
class 1200813
Institute of  Geophysics & Geomatics
China University of Geosciences  Wuhan Hubei province PRC
Postcode 430074

竹直心虚乃吾友,水淡性泊是我师!