[FLASH-USERS] The problem "Segmentation fault"
Dean Townsley
Dean.M.Townsley at ua.edu
Tue Jun 21 00:13:43 EDT 2011
Hi Zhang,
It would help if you could post your entire Makefile.h at once so that
we can see all the flags you are using.
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).
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.
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.
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.
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.
I hope you can figure it out.
Dean
On 06/20/2011 12:49 AM, Zhang Chao wrote:
>
> Dear Anshu,
>
> Thank you for the advice.
>
> 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”.
>
> 1. When I type “./setup Sedov –auto +ug +noio”, there is a error comes
> out in the step of gmake.
>
> The following is the last part of the error:
>
> /opt/software/mpich2-gnu/lib/libmpich.a(simple_pmi.o): In function
> `PMI_Init':
>
> simple_pmi.c:(.text+0x15c0): warning: Using 'gethostbyname' in
> statically linked applications requires at runtime the shared
> libraries from the glibc version used for linking
>
> /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/librt.a(aio_misc.o):
> In function `__aio_enqueue_request':
>
> (.text+0x247): undefined reference to `pthread_getschedparam'
>
> /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/librt.a(aio_misc.o):
> In function `__aio_enqueue_request':
>
> (.text+0x384): undefined reference to `pthread_cond_signal'
>
> /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/librt.a(aio_misc.o):
> In function `__aio_enqueue_request':
>
> (.text+0x421): undefined reference to `pthread_attr_init'
>
> /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/librt.a(aio_misc.o):
> In function `__aio_enqueue_request':
>
> (.text+0x42e): undefined reference to `pthread_attr_setdetachstate'
>
> /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/librt.a(aio_misc.o):
> In function `__aio_enqueue_request':
>
> (.text+0x43b): undefined reference to `pthread_attr_setstacksize'
>
> /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/librt.a(aio_misc.o):
> In function `__aio_enqueue_request':
>
> (.text+0x494): undefined reference to `pthread_attr_destroy'
>
> /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/librt.a(aio_misc.o):
> In function `handle_fildes_io':
>
> (.text+0x660): undefined reference to `pthread_getschedparam'
>
> /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/librt.a(aio_misc.o):
> In function `handle_fildes_io':
>
> (.text+0x694): undefined reference to `pthread_setschedparam'
>
> /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/librt.a(aio_misc.o):
> In function `handle_fildes_io':
>
> (.text+0x820): undefined reference to `pthread_cond_signal'
>
> /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/librt.a(aio_misc.o):
> In function `handle_fildes_io':
>
> (.text+0x8fd): undefined reference to `pthread_attr_init'
>
> /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/librt.a(aio_misc.o):
> In function `handle_fildes_io':
>
> (.text+0x90a): undefined reference to `pthread_attr_setdetachstate'
>
> /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/librt.a(aio_misc.o):
> In function `handle_fildes_io':
>
> (.text+0x9dd): undefined reference to `pthread_cond_timedwait'
>
> /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/librt.a(aio_notify.o):
> In function `__aio_notify_only':
>
> (.text+0xb7): undefined reference to `pthread_attr_init'
>
> /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/librt.a(aio_notify.o):
> In function `__aio_notify_only':
>
> (.text+0xc4): undefined reference to `pthread_attr_setdetachstate'
>
> collect2: ld returned 1 exit status
>
> gmake: *** [flash3] Error 1
>
> I don’t know what happens.
>
> 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.
>
> The following is the “warning”:
>
> /opt/hdf-1.6.5/lib/libhdf5.a(H5FDstream.o): In function
> `H5FD_stream_open':
>
> H5FDstream.c:(.text+0x1207): warning: Using 'gethostbyname' in
> statically linked applications requires at runtime the shared
> libraries from the glibc version used for linking
>
> SUCCESS
>
> Is it ok? I see “SUCCESS” in the last line.
>
> 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-1.2.1. The version of gcc and gfortran is
> 4.1.2.
>
> Best wishes,
>
> Zhang Chao
>
>
> *From:* Anshu Dubey <mailto:dubey at flash.uchicago.edu>
> *Sent:* Monday, June 20, 2011 11:19 AM
> *To:* Zhang Chao <mailto:walli1986 at hotmail.com>
> *Cc:* flash-users at flash.uchicago.edu
> <mailto:flash-users at flash.uchicago.edu>
> *Subject:* Re: [FLASH-USERS] The problem "Segmentation fault"
>
> Dear Zhang,
>
> Would you please try the following and let me know what happens.
>
> Modify your setup line to
> ./setup Sedov -auto +ug +noio
>
> then build using gmake and try to run it.
>
> Also, could you tell us what are the versions of MPI, gfortran and gcc
> you are running.
> Please make sure that your MPI library was built with the same version
> of gcc that
> you are using to build FLASH.
>
> Anshu
>
> 2011/6/19 Zhang Chao <walli1986 at hotmail.com
> <mailto:walli1986 at hotmail.com>>
>
> Dear all,
>
> Can anyone help me? I met the “Segmentation fault” when I type
> “./flash3”.
>
> [walli at localhost object]$ ./flash3
> Segmentation fault
>
> 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.
>
> Best wishes,
>
> Zhang Chao
>
>
>
>
> --
> **********************************************************************************************************
> Anshu Dubey
> Associate Director and CS/Applications Group Leader 5747 S.
> Ellis Avenue 3rd Flr.
> Flash Center for Computational Science
> 773 834 2999 (office)
> Fellow, Computation
> Institute 312 420
> 0033 (mobile)
> University of Chicago and Argonne National Laboratory 773 834
> 3230 (fax)
> **********************************************************************************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20110620/494c9492/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile.h
Type: text/x-chdr
Size: 4113 bytes
Desc: not available
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20110620/494c9492/attachment-0001.bin>
More information about the flash-users
mailing list