<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
Hi Zhang,<br>
<br>
It would help if you could post your entire Makefile.h at once so that
we can see all the flags you are using.<br>
<br>
>From some of the build messages you are getting, it looks like you
might have left the "-static" flag in the LFLAGS_OPT variable from the
Makefile.h.gfortran. I think most systems don't need that, but it
depends on how things are installed. I've attached my Makefile.h which
works for gfortran 4.3 (default compilers and mpi (mpich 1.2.7) in
Debian lenny).<br>
<br>
I think the prototype Makefile.h's assume a little more familiarity
with the mpi/compiler installation than you seem to have. You might
ask around your institution for someone a bit more familiar with the
environment you are using and ask them to just spot-check your build
flags.<br>
<br>
I think most people use mpich instead of mpich2, but I think mpich2
should still work (does anyone else know better?), and also gfortran
4.1 is a little old and probably not being tested on. Probably it
should not be expected to work. That was effectively the first
gfortran version. This could be the source of your segfault, but not
your build problems.<br>
<br>
All that being said, it seems like there is something odd about your
build/run environment. Segmentation faults are completely generic
errors that could be almost anything. But you say that you can build
and run other MPI applications... so I don't know what to tell you.<br>
<br>
The +ug +noio setup that Anshu suggested excludes some of the more
complicated pieces of flash and should be the most likely thing to
work, but you seem to not even be able to link that.<br>
<br>
I hope you can figure it out.<br>
<br>
Dean<br>
<br>
On 06/20/2011 12:49 AM, Zhang Chao wrote:
<blockquote cite="mid:BAY155-ds18B194136A267E70B36A6B66E0@phx.gbl"
type="cite">
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
<meta name="GENERATOR" content="MSHTML 8.00.7600.16766">
<div><font size="2">
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><font
face="Times New Roman" size="3">Dear Anshu,</font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><o:p><font
face="Times New Roman" size="3"> </font></o:p></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><font
face="Times New Roman" size="3">Thank you for the advice. </font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><font
face="Times New Roman" size="3">This email contains two errors. One is
the “gmake” error when I type “ ./setup Sedov –auto +ug +noio”. The
other is a “gmake warning” when I type “./setup Sedov -auto”.</font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><o:p><font
face="Times New Roman" size="3"> </font></o:p></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><font
face="Times New Roman"><span style="font-size: 14pt;" lang="EN-US">1.
When I type “./setup Sedov –auto +ug +noio”, there is a error comes out
in the step of gmake</span><span lang="EN-US"><font size="3">. </font></span></font></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><o:p><font
face="Times New Roman" size="3"> </font></o:p></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><font
face="Times New Roman" size="3">The following is the last part of the
error:</font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><o:p><font
face="Times New Roman" size="3"> </font></o:p></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><font
face="Times New Roman" size="3">/opt/software/mpich2-gnu/lib/libmpich.a(simple_pmi.o):
In
function `PMI_Init':</font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><font
face="Times New Roman" size="3">simple_pmi.c:(.text+0x<st1:chmetcnv
tcsc="0" numbertype="1" negative="False" hasspace="False"
sourcevalue="15" unitname="C" w:st="on">15c</st1:chmetcnv>0): warning:
Using 'gethostbyname' in statically linked applications requires at
runtime the shared libraries from the glibc version used for linking</font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><font
face="Times New Roman" size="3">/usr/lib/gcc/x86_64-redhat-linux/<st1:chsdate
w:st="on" isrocdate="False" islunardate="False" day="30" month="12"
year="1899">4.1.2</st1:chsdate>/../../../../lib64/librt.a(aio_misc.o):
In function `__aio_enqueue_request':</font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><font
face="Times New Roman" size="3">(.text+0x247): undefined reference to
`pthread_getschedparam'</font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><font
face="Times New Roman" size="3">/usr/lib/gcc/x86_64-redhat-linux/<st1:chsdate
w:st="on" isrocdate="False" islunardate="False" day="30" month="12"
year="1899">4.1.2</st1:chsdate>/../../../../lib64/librt.a(aio_misc.o):
In function `__aio_enqueue_request':</font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><font
face="Times New Roman" size="3">(.text+0x384): undefined reference to
`pthread_cond_signal'</font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><font
face="Times New Roman" size="3">/usr/lib/gcc/x86_64-redhat-linux/<st1:chsdate
w:st="on" isrocdate="False" islunardate="False" day="30" month="12"
year="1899">4.1.2</st1:chsdate>/../../../../lib64/librt.a(aio_misc.o):
In function `__aio_enqueue_request':</font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><font
face="Times New Roman" size="3">(.text+0x421): undefined reference to
`pthread_attr_init'</font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><font
face="Times New Roman" size="3">/usr/lib/gcc/x86_64-redhat-linux/<st1:chsdate
w:st="on" isrocdate="False" islunardate="False" day="30" month="12"
year="1899">4.1.2</st1:chsdate>/../../../../lib64/librt.a(aio_misc.o):
In function `__aio_enqueue_request':</font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><font
face="Times New Roman" size="3">(.text+0x42e): undefined reference to
`pthread_attr_setdetachstate'</font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><font
face="Times New Roman" size="3">/usr/lib/gcc/x86_64-redhat-linux/<st1:chsdate
w:st="on" isrocdate="False" islunardate="False" day="30" month="12"
year="1899">4.1.2</st1:chsdate>/../../../../lib64/librt.a(aio_misc.o):
In function `__aio_enqueue_request':</font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><font
face="Times New Roman" size="3">(.text+0x43b): undefined reference to
`pthread_attr_setstacksize'</font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><font
face="Times New Roman" size="3">/usr/lib/gcc/x86_64-redhat-linux/<st1:chsdate
w:st="on" isrocdate="False" islunardate="False" day="30" month="12"
year="1899">4.1.2</st1:chsdate>/../../../../lib64/librt.a(aio_misc.o):
In function `__aio_enqueue_request':</font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><font
face="Times New Roman" size="3">(.text+0x494): undefined reference to
`pthread_attr_destroy'</font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><font
face="Times New Roman" size="3">/usr/lib/gcc/x86_64-redhat-linux/<st1:chsdate
w:st="on" isrocdate="False" islunardate="False" day="30" month="12"
year="1899">4.1.2</st1:chsdate>/../../../../lib64/librt.a(aio_misc.o):
In function `handle_fildes_io':</font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><font
face="Times New Roman" size="3">(.text+0x660): undefined reference to
`pthread_getschedparam'</font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><font
face="Times New Roman" size="3">/usr/lib/gcc/x86_64-redhat-linux/<st1:chsdate
w:st="on" isrocdate="False" islunardate="False" day="30" month="12"
year="1899">4.1.2</st1:chsdate>/../../../../lib64/librt.a(aio_misc.o):
In function `handle_fildes_io':</font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><font
face="Times New Roman" size="3">(.text+0x694): undefined reference to
`pthread_setschedparam'</font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><font
face="Times New Roman" size="3">/usr/lib/gcc/x86_64-redhat-linux/<st1:chsdate
w:st="on" isrocdate="False" islunardate="False" day="30" month="12"
year="1899">4.1.2</st1:chsdate>/../../../../lib64/librt.a(aio_misc.o):
In function `handle_fildes_io':</font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><font
face="Times New Roman" size="3">(.text+0x820): undefined reference to
`pthread_cond_signal'</font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><font
face="Times New Roman" size="3">/usr/lib/gcc/x86_64-redhat-linux/<st1:chsdate
w:st="on" isrocdate="False" islunardate="False" day="30" month="12"
year="1899">4.1.2</st1:chsdate>/../../../../lib64/librt.a(aio_misc.o):
In function `handle_fildes_io':</font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><font
face="Times New Roman" size="3">(.text+0x8fd): undefined reference to
`pthread_attr_init'</font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><font
face="Times New Roman" size="3">/usr/lib/gcc/x86_64-redhat-linux/<st1:chsdate
w:st="on" isrocdate="False" islunardate="False" day="30" month="12"
year="1899">4.1.2</st1:chsdate>/../../../../lib64/librt.a(aio_misc.o):
In function `handle_fildes_io':</font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><font
face="Times New Roman" size="3">(.text+0x<st1:chmetcnv tcsc="0"
numbertype="1" negative="False" hasspace="False" sourcevalue="90"
unitname="a" w:st="on">90a</st1:chmetcnv>): undefined reference to
`pthread_attr_setdetachstate'</font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><font
face="Times New Roman" size="3">/usr/lib/gcc/x86_64-redhat-linux/<st1:chsdate
w:st="on" isrocdate="False" islunardate="False" day="30" month="12"
year="1899">4.1.2</st1:chsdate>/../../../../lib64/librt.a(aio_misc.o):
In function `handle_fildes_io':</font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><font
face="Times New Roman" size="3">(.text+0x9dd): undefined reference to
`pthread_cond_timedwait'</font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><font
face="Times New Roman" size="3">/usr/lib/gcc/x86_64-redhat-linux/<st1:chsdate
w:st="on" isrocdate="False" islunardate="False" day="30" month="12"
year="1899">4.1.2</st1:chsdate>/../../../../lib64/librt.a(aio_notify.o):
In
function `__aio_notify_only':</font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><font
face="Times New Roman" size="3">(.text+0xb7): undefined reference to
`pthread_attr_init'</font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><font
face="Times New Roman" size="3">/usr/lib/gcc/x86_64-redhat-linux/<st1:chsdate
w:st="on" isrocdate="False" islunardate="False" day="30" month="12"
year="1899">4.1.2</st1:chsdate>/../../../../lib64/librt.a(aio_notify.o):
In
function `__aio_notify_only':</font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><font
face="Times New Roman" size="3">(.text+0xc4): undefined reference to
`pthread_attr_setdetachstate'</font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><font
face="Times New Roman" size="3">collect2: ld returned 1 exit status</font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><font
face="Times New Roman" size="3">gmake: *** [flash3] Error 1</font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><o:p><font
face="Times New Roman" size="3"> </font></o:p></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><o:p><font
face="Times New Roman" size="3"> </font></o:p></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span
style="font-size: 14pt;" lang="EN-US"><font face="Times New Roman">I
don’t know what happens.<o:p></o:p></font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><o:p><font
face="Times New Roman" size="3"> </font></o:p></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span
style="font-size: 14pt;" lang="EN-US"><font face="Times New Roman">2.
When following the user’s guide, I type “./setup Sedov -auto”. I see a
“warning”, and I don’t know whether it is ok.<o:p></o:p></font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><o:p><font
face="Times New Roman" size="3"> </font></o:p></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><font
face="Times New Roman" size="3">The following is the “warning”:</font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><font
face="Times New Roman" size="3">/opt/hdf-<st1:chsdate w:st="on"
isrocdate="False" islunardate="False" day="30" month="12" year="1899">1.6.5</st1:chsdate>/lib/libhdf5.a(H5FDstream.o):
In
function `H5FD_stream_open':</font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><font
face="Times New Roman" size="3">H5FDstream.c:(.text+0x1207): warning:
Using 'gethostbyname' in statically linked applications requires at
runtime the shared libraries from the glibc version used for linking</font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><font
face="Times New Roman" size="3">SUCCESS</font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><o:p><font
face="Times New Roman" size="3"> </font></o:p></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><o:p><font
face="Times New Roman" size="3"> </font></o:p></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><font
face="Times New Roman" size="3">Is it ok? I see “SUCCESS” in the last
line. </font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><o:p><font
face="Times New Roman" size="3"> </font></o:p></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><o:p><font
face="Times New Roman" size="3"> </font></o:p></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><font
face="Times New Roman" size="3">At last, I want to tell you some
information about my computer. It just has one computer, two Intel Xeon
CPU. The system is CentOS 5.5. The version of MPI is mpich2-<st1:chsdate
w:st="on" isrocdate="False" islunardate="False" day="30" month="12"
year="1899">1.2.1</st1:chsdate>. The version of gcc and gfortran is
4.1.2.</font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><o:p><font
face="Times New Roman" size="3"> </font></o:p></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><o:p><font
face="Times New Roman" size="3"> </font></o:p></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><font
face="Times New Roman" size="3">Best wishes,</font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><font
face="Times New Roman" size="3">Zhang Chao</font></span></p>
</font></div>
<div
style="font-family: Tahoma; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">
<div><br>
</div>
<div
style="background: rgb(245, 245, 245) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">
<div style=""><b>From:</b> <a moz-do-not-send="true"
title="dubey@flash.uchicago.edu" href="mailto:dubey@flash.uchicago.edu">Anshu
Dubey</a> </div>
<div><b>Sent:</b> Monday, June 20, 2011 11:19 AM</div>
<div><b>To:</b> <a moz-do-not-send="true"
title="walli1986@hotmail.com" href="mailto:walli1986@hotmail.com">Zhang
Chao</a> </div>
<div><b>Cc:</b> <a moz-do-not-send="true"
title="flash-users@flash.uchicago.edu"
href="mailto:flash-users@flash.uchicago.edu">flash-users@flash.uchicago.edu</a>
</div>
<div><b>Subject:</b> Re: [FLASH-USERS] The problem "Segmentation
fault"</div>
</div>
</div>
<div><br>
</div>
Dear Zhang,<br>
<br>
Would you please try the following and let me know what happens.<br>
<br>
Modify your setup line to<br>
./setup Sedov -auto +ug +noio<br>
<br>
then build using gmake and try to run it.<br>
<br>
Also, could you tell us what are the versions of MPI, gfortran and gcc
you are running.<br>
Please make sure that your MPI library was built with the same version
of gcc that<br>
you are using to build FLASH.<br>
<br>
Anshu<br>
<br>
<div class="gmail_quote">2011/6/19 Zhang Chao <span dir="ltr"><<a
moz-do-not-send="true" href="mailto:walli1986@hotmail.com">walli1986@hotmail.com</a>></span><br>
<blockquote
style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;"
class="gmail_quote">
<div
style="padding-left: 10px; padding-right: 10px; padding-top: 15px;"
name="Compose message area">
<div><font size="2">
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><font
face="Times New Roman" size="3">Dear all, </font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"></span> </p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><font
face="Times New Roman" size="3">Can anyone help me? I met the
“Segmentation fault” when I type “./flash3”.</font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"></span> </p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><font
face="Times New Roman" size="3">[walli@localhost object]$ ./flash3<br>
Segmentation fault</font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"></span> </p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"></span> </p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><font
face="Times New Roman" size="3">It is really a big problem for me. I
want to find a solution in the internet, but until now, I still cannot
solve the problem.</font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"></span> </p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><font
face="Times New Roman" size="3">Best wishes,</font></span></p>
<p style="margin: 0cm 0cm 0pt;" class="MsoNormal"><span lang="EN-US"><font
face="Times New Roman" size="3">Zhang Chao</font></span></p>
</font></div>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<br>
-- <br>
**********************************************************************************************************<br>
Anshu Dubey<br>
Associate Director and CS/Applications Group Leader 5747 S.
Ellis Avenue 3rd Flr.<br>
Flash Center for Computational Science
773 834 2999 (office)<br>
Fellow, Computation
Institute 312 420 0033
(mobile)<br>
University of Chicago and Argonne National Laboratory 773 834
3230 (fax)<br>
**********************************************************************************************************<br>
<br>
</blockquote>
</body>
</html>