Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Got an error msg "Program received signal SIGSEGV: Segmentation fault - invalid memory reference."

85 views
Skip to first unread message
Message has been deleted

David Duffy

unread,
Mar 5, 2023, 5:18:37 PM3/5/23
to
Pratik Patel <pratikm...@gmail.com> wrote:
>
> Below is the code for the conversion of complex data from k-space to
> real space. In module _mhd I have defined all the required variables
> with allocatable dimensions and also include FFTW and MPICH libraries
> to use in below main code.

>
> This code works without error until this statement
> "call rfftwnd_f77_mpi(pinv,1,V1k,work,&
> MPI_REQUEST_NULL, FFTW_TRANSPOSED_ORDER).
> It gives an error message " Program received signal SIGSEGV:
> Segmentation fault - invalid memory reference." After some googling, I
> understood the cause of the error but was not able to get where it is
> actually creating a problem. If you require more info pls let me know

Yeah - if you are on linux or similar, valgrind and gdb might give you
more diagnostic information, if you have installed the "debug" versions
of fftw and mpich, so that you can follow the calls further down, if needed.

gah4

unread,
Mar 5, 2023, 11:45:58 PM3/5/23
to
On Friday, March 3, 2023 at 4:20:55 AM UTC-8, Pratik Patel wrote:

(snip)

MPI is slightly tricky to work with.

Some routines save a pointer (address) of an operand, and then use it later.

Not to mention the usual problems with doing things in parallel, and changing
variables in a different order than you expect.

And then there is the ordinary array bounds problem.
0 new messages