Note: I posted the same message to comp.lang.fortran newsgroup. But I
thought the experts in this group can help me out.
I tried to compile the helloworld.f90 on the same machine as the
lam-mpi libraries are built. While building the lam-mpi libraries
there were no errors.
But during runtime, I am getting segmentation fault errors. I tried to
build lam-mpi using two sets of compilers {ifort+icc+icpc} and
{ifort+gcc+g++}. I am getting the same runtime error with both set of
libraries.
Problem:
helloworld.f90 (listed at the end) compiles fine. But produces the
following error.
$mpif77 hello_world.f90
$cat host_list
a1 cpu=2
$lamboot -v host_list
LAM 7.1.1/MPI 2 C++/ROMIO - Indiana University
n-1<31667> ssi:boot:base:linear: booting n0 (a1)
n-1<31667> ssi:boot:base:linear: finished
$mpirun -np 2 a.out
test1
test1
test2
test3
test4
test6
test2
test3
test4
test5
greetings from process 1!
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image PC Routine Line Source
a.out 0804C298 Unknown Unknown Unknown
a.out 0804C166 Unknown Unknown Unknown
a.out 0804BE08 Unknown Unknown Unknown
a.out 420158D4 Unknown Unknown Unknown
a.out 0804BCC1 Unknown Unknown Unknown
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image PC Routine Line Source
a.out 0804C298 Unknown Unknown Unknown
a.out 0804C166 Unknown Unknown Unknown
a.out 0804BE08 Unknown Unknown Unknown
a.out 420158D4 Unknown Unknown Unknown
a.out 0804BCC1 Unknown Unknown Unknown
I saw a similar error being reported with no solution at
http://www.cpmd.org/pipermail/cpmd-list/2004-February/003039.html
thanks in advance
raju
Procedure used to build lam-mpi libraries
I myself built these mpi libraries with the following options.
export FC=ifort
export CC=gcc
export CXX=g++
export FFLAGS="-g -I/opt/intel_fc_80/include -L/opt/intel_cc_80/lib"
export CFLAGS="-g"
export CXXFLAGS="-g"
System information
The same machine is used to build the mpi libraries, compile
helloworld.f90, execute a.out
redhat linux 8.0, 32-bit machine
$rpm -qa glibc
glibc-2.2.93-5
$gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --host=i386-redhat-linux --with-system-zlib
--enable-__cxa_atexit
Thread model: posix
gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7)
$ifort -V
Intel(R) Fortran Compiler for 32-bit applications, Version 8.1
Build 20040921Z Package ID: l_fc_pc_8.1.019
Copyright (C) 1985-2004 Intel Corporation. All rights reserved.
FOR NON-COMMERCIAL USE ONLY
ifort: Command line error: no files specified; for help type "ifort -help"
$icc -V
Intel(R) C++ Compiler for 32-bit applications, Version 8.1 Build
20040921Z Package ID: l_cc_pc_8.1.022
Copyright (C) 1985-2004 Intel Corporation. All rights reserved.
FOR NON-COMMERCIAL USE ONLY
icc: Command line error: no files specified; for help type "icc -help"
$uname -a
Linux A1 2.4.18-24.8.0smp #1 SMP Fri Jan 31 07:12:12 EST 2003 i686
athlon i386 GNU/Linux
$ulimit
unlimited
$cat /proc/cpuinfo
processor : 0
vendor_id : AuthenticAMD
cpu family : 6
model : 8
model name : AMD Athlon(tm) MP 2200+
stepping : 0
cpu MHz : 1799.980
cache size : 256 KB
Physical processor ID : 0
Number of siblings : 1
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
mca cmovpat pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow
bogomips : 3575.54
processor : 1
vendor_id : AuthenticAMD
cpu family : 6
model : 8
model name : AMD Athlon(tm) Processor
stepping : 0
cpu MHz : 1799.980
cache size : 256 KB
Physical processor ID : 0
Number of siblings : 1
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
mca cmovpat pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow
bogomips : 3600.85
$cat helloworld.f90
program hello_world
! first program in fortran using mpi
! author : kamaraju kusumanchi
implicit none
include 'mpif.h'
integer :: my_rank, p, source, dest, tag = 50, ierror
! my_rank = Rank of process
! p = number of processes
! source = rank of sender
! dest = rank if receiver
! tag = tag for messages
! ierror =
character(len=50) :: message=' '
! storage for the message
! dont forget to initialize it
integer :: stat(MPI_Status_size) ! return status for receive
write(*,*) 'test1'
call MPI_Init(ierror)
write(*,*) 'test2'
call MPI_Comm_rank(MPI_COMM_WORLD, my_rank, ierror)
write(*,*) 'test3'
call MPI_Comm_size(MPI_COMM_WORLD, p, ierror)
write(*,*) 'test4'
if (my_rank .ne. 0) then
write(*,*) 'test5'
write(message,'(A, i5, A)') 'greetings from process ', my_rank, '!'
dest = 0
call MPI_Send(message, len_trim(message), MPI_CHARACTER, dest, tag, &
MPI_COMM_WORLD, ierror)
else
do source=1,p-1
write(*,*) 'test6'
call MPI_Recv(message, 50, MPI_CHARACTER, source, tag, &
MPI_COMM_WORLD, stat, ierror)
write(*,*) message
end do
end if
call MPI_Finalize();
end program hello_world
--
Kamaraju S Kusumanchi
Cornell University
http://people.cornell.edu/pages/kk288/
http://groups.yahoo.com/group/flumech/
|