Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

In computing, the mean time to failure keeps getting shorter.


devel / comp.lang.fortran / Re: Error:- Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

SubjectAuthor
* Error:- Program received signal SIGSEGV: Segmentation fault - invalidPratik Patel
`* Error:- Program received signal SIGSEGV: Segmentation fault -gah4
 `* Error:- Program received signal SIGSEGV: Segmentation fault -Pratik Patel
  `* Error:- Program received signal SIGSEGV: Segmentation fault -gah4
   `* Error:- Program received signal SIGSEGV: Segmentation fault -Pratik Patel
    `* Error:- Program received signal SIGSEGV: Segmentation fault -gah4
     `* Error:- Program received signal SIGSEGV: Segmentation fault -Pratik Patel
      +* Error:- Program received signal SIGSEGV: Segmentation fault -Gary Scott
      |`- Error:- Program received signal SIGSEGV: Segmentation fault -gah4
      `- Error:- Program received signal SIGSEGV: Segmentation fault -robin vowels

1
Error:- Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

<28ee3aa3-5511-4326-8b6f-1a81b1807db1n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10057&group=comp.lang.fortran#10057

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:ad4:4b66:0:b0:63c:e9d7:2ea6 with SMTP id m6-20020ad44b66000000b0063ce9d72ea6mr52431qvx.12.1690895329417;
Tue, 01 Aug 2023 06:08:49 -0700 (PDT)
X-Received: by 2002:a05:6808:13c2:b0:39e:9757:6263 with SMTP id
d2-20020a05680813c200b0039e97576263mr21969896oiw.0.1690895329124; Tue, 01 Aug
2023 06:08:49 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Tue, 1 Aug 2023 06:08:48 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=2409:4041:6e88:fd58:c2a:648a:3508:1f70;
posting-account=23D3wQoAAACrA1FnxB0NNs2NaDSvP1Fm
NNTP-Posting-Host: 2409:4041:6e88:fd58:c2a:648a:3508:1f70
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <28ee3aa3-5511-4326-8b6f-1a81b1807db1n@googlegroups.com>
Subject: Error:- Program received signal SIGSEGV: Segmentation fault - invalid
memory reference.
From: pratikme...@gmail.com (Pratik Patel)
Injection-Date: Tue, 01 Aug 2023 13:08:49 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Pratik Patel - Tue, 1 Aug 2023 13:08 UTC

In the given code below, the value of total_data=fftw_alloc_complex(alloc) should be double the value of alloc. For nn = 16, when I run this code with mpi in 2 cores, the value of alloc is 1152, so total_data must be 2304 for both cores, but it gives 94157412191808 for core 0 and 93907390824000 for core 1. All the required variables for the main program and for FFTW3 and MPI are defined in module_mhd_pl. I properly linked the required libraries for MPI and FFTW3 in a makefile.

program fft_test_mpi_3d
use module_mhd_pl
use, intrinsic :: iso_c_binding
implicit none
integer:: i1, i2, i3, size, rnk
real*8,allocatable,dimension(:,:,:) :: x
character(len=80) :: fname
real*8:: mytime,rank

! Initialize MPI
call mpi_init(ierr)
call mpi_comm_rank(mpi_comm_world, myrank,ierr)
call mpi_comm_size(mpi_comm_world, nprocs, ierr)
! call fftw_mpi_init()

n1 = 16
n2 = 16
n3 = 16
n1hf = n1/2+1

! Compute local size for array

alloc = fftw_mpi_local_size_3d(n3,n2,n1/2+1, &
mpi_comm_world,local_n3,local_i3_start)

! This function creates an error
total_data = fftw_alloc_complex(alloc)

! Allocate memory for inp and outp arrays
allocate(inp(n1 + 2, n2, local_n3))
allocate(outp(n1hf, n2, local_n3))

call c_f_pointer (total_data,inp,[n1+2,n2,local_n3])
call c_f_pointer (total_data,outp,[n1hf,n2,local_n3])
print*, n1hf,alloc,total_data,local_n3,local_i3_start,myrank

! Create local FFTW plan
pfor = fftw_mpi_plan_dft_r2c_3d(n3, n2, n1, inp, outp, &
mpi_comm_world, FFTW_MEASURE)

! Create local Inverse FFTW plan
pinv = fftw_mpi_plan_dft_c2r_3d(n3, n2, n1, outp, inp, &
mpi_comm_world, FFTW_MEASURE)
! allocate(x(n1+2,n2,local_n3))
x = 0.0d0

call mpi_barrier(mpi_comm_world,ierr)
write(*,*)'step=1'
write(fname,'(g8.0)')myrank+1
open(unit=10,file='input'//trim(adjustl(fname))//'.dat', &
status='unknown')
do i3_loc = 1, local_n3
i3 = i3_loc + local_i3_start
do i2 = 1, n2
do i1 = 1, n1hf
ireal = 2*i1-1
iimag = 2*i1
x(ireal,i2,i3) = dble(i1+i2+i3+myrank+1.0d0)
x(iimag,i2,i3) = dble(i1+i2+i3+myrank+2.0d0)
write(10,*) x(ireal,i2,i3),x(iimag,i2,i3)
end do
end do
end do

call mpi_barrier(mpi_comm_world,ierr)
write(*,*)'step=2'
! Execute local FFTW plan
inp = x
call forward_fftw
x = inp

call mpi_barrier(mpi_comm_world,ierr)
write(*,*)'step=3'

write(fname,'(g8.0)')myrank+1
open(unit=11,file='Test'//trim(adjustl(fname))//'.dat', &
form='formatted',status='unknown')
do i3 = 1, local_n3
do i2 = 1, n2
do i1 = 1, n1
write(11,*) x(i1,i2,i3)
enddo
enddo
enddo
close(11)

! Execute local Inverse FFTW plan
inp = x
call backward_fftw
x = inp

deallocate(x)

! Destroy local FFTW plan
call fftw_destroy_plan(pfor)
call fftw_destroy_plan(pinv)
call fftw_free(total_data)

! Finalize FFTW3
! call fftw_mpi_cleanup()

! Clean up MPI interface
call MPI_FINALIZE(ierr)

end program

Re: Error:- Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

<9797847f-24ba-4244-91e6-219894516483n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10059&group=comp.lang.fortran#10059

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a37:b684:0:b0:76c:bd05:f808 with SMTP id g126-20020a37b684000000b0076cbd05f808mr31796qkf.15.1690963035827;
Wed, 02 Aug 2023 00:57:15 -0700 (PDT)
X-Received: by 2002:a05:6808:1909:b0:3a7:4878:233d with SMTP id
bf9-20020a056808190900b003a74878233dmr5995698oib.0.1690963035520; Wed, 02 Aug
2023 00:57:15 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Wed, 2 Aug 2023 00:57:15 -0700 (PDT)
In-Reply-To: <28ee3aa3-5511-4326-8b6f-1a81b1807db1n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:602:9700:4689:b1cd:a68b:8f2d:a129;
posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 2601:602:9700:4689:b1cd:a68b:8f2d:a129
References: <28ee3aa3-5511-4326-8b6f-1a81b1807db1n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <9797847f-24ba-4244-91e6-219894516483n@googlegroups.com>
Subject: Re: Error:- Program received signal SIGSEGV: Segmentation fault -
invalid memory reference.
From: gah...@u.washington.edu (gah4)
Injection-Date: Wed, 02 Aug 2023 07:57:15 +0000
Content-Type: text/plain; charset="UTF-8"
 by: gah4 - Wed, 2 Aug 2023 07:57 UTC

fftw_alloc_complex returns a type(C_PTR).

https://developer.arm.com/documentation/101004/2100/Fast-Fourier-Transforms-FFTs/FFT-memory-functions/fftw-alloc-complex

It doesn't seem to be declared in the code shown.

The values you indicate seem not unusual for 64 bit pointers.

Re: Error:- Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

<39f4370c-910e-4603-9f5c-408aed93ce71n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10062&group=comp.lang.fortran#10062

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:620a:40f:b0:76c:c20f:2967 with SMTP id 15-20020a05620a040f00b0076cc20f2967mr2288qkp.2.1691128749450;
Thu, 03 Aug 2023 22:59:09 -0700 (PDT)
X-Received: by 2002:a05:6808:1828:b0:3a3:8466:ee55 with SMTP id
bh40-20020a056808182800b003a38466ee55mr1114166oib.8.1691128749098; Thu, 03
Aug 2023 22:59:09 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!npeer.as286.net!npeer-ng0.as286.net!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Thu, 3 Aug 2023 22:59:08 -0700 (PDT)
In-Reply-To: <9797847f-24ba-4244-91e6-219894516483n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2409:4041:6e9a:c9c6:b5d8:1d:1b98:821e;
posting-account=23D3wQoAAACrA1FnxB0NNs2NaDSvP1Fm
NNTP-Posting-Host: 2409:4041:6e9a:c9c6:b5d8:1d:1b98:821e
References: <28ee3aa3-5511-4326-8b6f-1a81b1807db1n@googlegroups.com> <9797847f-24ba-4244-91e6-219894516483n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <39f4370c-910e-4603-9f5c-408aed93ce71n@googlegroups.com>
Subject: Re: Error:- Program received signal SIGSEGV: Segmentation fault -
invalid memory reference.
From: pratikme...@gmail.com (Pratik Patel)
Injection-Date: Fri, 04 Aug 2023 05:59:09 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2048
 by: Pratik Patel - Fri, 4 Aug 2023 05:59 UTC

On Wednesday, August 2, 2023 at 1:27:17 PM UTC+5:30, gah4 wrote:
> fftw_alloc_complex returns a type(C_PTR).
>
> https://developer.arm.com/documentation/101004/2100/Fast-Fourier-Transforms-FFTs/FFT-memory-functions/fftw-alloc-complex
>
> It doesn't seem to be declared in the code shown.
>
> The values you indicate seem not unusual for 64-bit pointers.

I included fftw3.f03 file in which fftw_allloc_complex function is defined and required variables were declared in module_mhd_pl subroutine like this:

integer(C_SIZE_T)::alloc
type(C_PTR) :: total_data

Re: Error:- Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

<fc79dd09-fc22-4bfd-979a-5e67e85b322cn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10063&group=comp.lang.fortran#10063

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:620a:8c0c:b0:76c:c890:adb with SMTP id qz12-20020a05620a8c0c00b0076cc8900adbmr3752qkn.12.1691149993053;
Fri, 04 Aug 2023 04:53:13 -0700 (PDT)
X-Received: by 2002:a37:2c87:0:b0:76c:bd05:f808 with SMTP id
s129-20020a372c87000000b0076cbd05f808mr4126qkh.15.1691149992849; Fri, 04 Aug
2023 04:53:12 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Fri, 4 Aug 2023 04:53:12 -0700 (PDT)
In-Reply-To: <39f4370c-910e-4603-9f5c-408aed93ce71n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:602:9700:4689:49fd:ac77:4569:471c;
posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 2601:602:9700:4689:49fd:ac77:4569:471c
References: <28ee3aa3-5511-4326-8b6f-1a81b1807db1n@googlegroups.com>
<9797847f-24ba-4244-91e6-219894516483n@googlegroups.com> <39f4370c-910e-4603-9f5c-408aed93ce71n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <fc79dd09-fc22-4bfd-979a-5e67e85b322cn@googlegroups.com>
Subject: Re: Error:- Program received signal SIGSEGV: Segmentation fault -
invalid memory reference.
From: gah...@u.washington.edu (gah4)
Injection-Date: Fri, 04 Aug 2023 11:53:13 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 1858
 by: gah4 - Fri, 4 Aug 2023 11:53 UTC

On Thursday, August 3, 2023 at 10:59:11 PM UTC-7, Pratik Patel wrote:

(snip)

> I included fftw3.f03 file in which fftw_allloc_complex function is defined and required variables were declared in module_mhd_pl subroutine like this:
>
> integer(C_SIZE_T)::alloc
> type(C_PTR) :: total_data

Sounds right.

Why is call

fftw_mpi_init()

commented out?

That initializes many things needed before any other fftw_mpi calls.

Re: Error:- Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

<7020d0e0-c3a0-4ab0-92bb-6185edbc2762n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10064&group=comp.lang.fortran#10064

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:ac8:4e89:0:b0:403:b6c8:4c28 with SMTP id 9-20020ac84e89000000b00403b6c84c28mr5408qtp.8.1691157085012;
Fri, 04 Aug 2023 06:51:25 -0700 (PDT)
X-Received: by 2002:a05:6808:3089:b0:3a7:7811:241c with SMTP id
bl9-20020a056808308900b003a77811241cmr2843243oib.4.1691157084571; Fri, 04 Aug
2023 06:51:24 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Fri, 4 Aug 2023 06:51:24 -0700 (PDT)
In-Reply-To: <fc79dd09-fc22-4bfd-979a-5e67e85b322cn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=14.139.128.60; posting-account=23D3wQoAAACrA1FnxB0NNs2NaDSvP1Fm
NNTP-Posting-Host: 14.139.128.60
References: <28ee3aa3-5511-4326-8b6f-1a81b1807db1n@googlegroups.com>
<9797847f-24ba-4244-91e6-219894516483n@googlegroups.com> <39f4370c-910e-4603-9f5c-408aed93ce71n@googlegroups.com>
<fc79dd09-fc22-4bfd-979a-5e67e85b322cn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <7020d0e0-c3a0-4ab0-92bb-6185edbc2762n@googlegroups.com>
Subject: Re: Error:- Program received signal SIGSEGV: Segmentation fault -
invalid memory reference.
From: pratikme...@gmail.com (Pratik Patel)
Injection-Date: Fri, 04 Aug 2023 13:51:25 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2153
 by: Pratik Patel - Fri, 4 Aug 2023 13:51 UTC

On Friday, August 4, 2023 at 5:23:15 PM UTC+5:30, gah4 wrote:
> On Thursday, August 3, 2023 at 10:59:11 PM UTC-7, Pratik Patel wrote:
>
> (snip)
> > I included fftw3.f03 file in which fftw_allloc_complex function is defined and required variables were declared in module_mhd_pl subroutine like this:
> >
> > integer(C_SIZE_T)::alloc
> > type(C_PTR) :: total_data
> Sounds right.
>
> Why is call
>
> fftw_mpi_init()
>
> commented out?
>
> That initializes many things needed before any other fftw_mpi calls.

I tried with that also but it didn't work either. I think fftw_alloc_compex doesn't require mpi initialization,
so no need to initialize fftw_mpi_init().

Re: Error:- Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

<b1235bd9-fdb0-4d2f-86b9-2b8384c5680fn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10066&group=comp.lang.fortran#10066

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:6214:8c2:b0:63c:f717:356 with SMTP id da2-20020a05621408c200b0063cf7170356mr8067qvb.2.1691173892653;
Fri, 04 Aug 2023 11:31:32 -0700 (PDT)
X-Received: by 2002:a9d:7dd8:0:b0:6b7:45a8:a80c with SMTP id
k24-20020a9d7dd8000000b006b745a8a80cmr2285912otn.3.1691173891843; Fri, 04 Aug
2023 11:31:31 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.ams4!peer.am4.highwinds-media.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Fri, 4 Aug 2023 11:31:31 -0700 (PDT)
In-Reply-To: <7020d0e0-c3a0-4ab0-92bb-6185edbc2762n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:602:9700:4689:aca1:de9f:d12a:6be8;
posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 2601:602:9700:4689:aca1:de9f:d12a:6be8
References: <28ee3aa3-5511-4326-8b6f-1a81b1807db1n@googlegroups.com>
<9797847f-24ba-4244-91e6-219894516483n@googlegroups.com> <39f4370c-910e-4603-9f5c-408aed93ce71n@googlegroups.com>
<fc79dd09-fc22-4bfd-979a-5e67e85b322cn@googlegroups.com> <7020d0e0-c3a0-4ab0-92bb-6185edbc2762n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b1235bd9-fdb0-4d2f-86b9-2b8384c5680fn@googlegroups.com>
Subject: Re: Error:- Program received signal SIGSEGV: Segmentation fault -
invalid memory reference.
From: gah...@u.washington.edu (gah4)
Injection-Date: Fri, 04 Aug 2023 18:31:32 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2301
 by: gah4 - Fri, 4 Aug 2023 18:31 UTC

On Friday, August 4, 2023 at 6:51:27 AM UTC-7, Pratik Patel wrote:
> On Friday, August 4, 2023 at 5:23:15 PM UTC+5:30, gah4 wrote:

(snip)
> > Why is call

> > fftw_mpi_init()
> > commented out?

> I tried with that also but it didn't work either. I think fftw_alloc_compex doesn't require mpi initialization,
> so no need to initialize fftw_mpi_init().

As far as I know, you need fftw_mpi_init() even for calls that don't use MPI.

You are, at least supposed to, call it before any other fftw_mpi_... routine.

It might allocate some arrays, or some such, and those might be used by others.

Re: Error:- Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

<c79e6efd-3764-4a1c-ab2d-81aa68429074n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10068&group=comp.lang.fortran#10068

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:6214:a05:b0:63c:f602:f1d9 with SMTP id dw5-20020a0562140a0500b0063cf602f1d9mr13082qvb.8.1691231315388;
Sat, 05 Aug 2023 03:28:35 -0700 (PDT)
X-Received: by 2002:a05:6808:309f:b0:3a7:3737:60fd with SMTP id
bl31-20020a056808309f00b003a7373760fdmr6924914oib.7.1691231315073; Sat, 05
Aug 2023 03:28:35 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border-2.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Sat, 5 Aug 2023 03:28:34 -0700 (PDT)
In-Reply-To: <b1235bd9-fdb0-4d2f-86b9-2b8384c5680fn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2409:4041:6e4b:b5bc:83a3:2554:eb72:bf8;
posting-account=23D3wQoAAACrA1FnxB0NNs2NaDSvP1Fm
NNTP-Posting-Host: 2409:4041:6e4b:b5bc:83a3:2554:eb72:bf8
References: <28ee3aa3-5511-4326-8b6f-1a81b1807db1n@googlegroups.com>
<9797847f-24ba-4244-91e6-219894516483n@googlegroups.com> <39f4370c-910e-4603-9f5c-408aed93ce71n@googlegroups.com>
<fc79dd09-fc22-4bfd-979a-5e67e85b322cn@googlegroups.com> <7020d0e0-c3a0-4ab0-92bb-6185edbc2762n@googlegroups.com>
<b1235bd9-fdb0-4d2f-86b9-2b8384c5680fn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c79e6efd-3764-4a1c-ab2d-81aa68429074n@googlegroups.com>
Subject: Re: Error:- Program received signal SIGSEGV: Segmentation fault -
invalid memory reference.
From: pratikme...@gmail.com (Pratik Patel)
Injection-Date: Sat, 05 Aug 2023 10:28:35 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 25
 by: Pratik Patel - Sat, 5 Aug 2023 10:28 UTC

On Saturday, August 5, 2023 at 12:01:34 AM UTC+5:30, gah4 wrote:
> On Friday, August 4, 2023 at 6:51:27 AM UTC-7, Pratik Patel wrote:
> > On Friday, August 4, 2023 at 5:23:15 PM UTC+5:30, gah4 wrote:
> (snip)
> > > Why is call
>
> > > fftw_mpi_init()
>
> > > commented out?
> > I tried with that also but it didn't work either. I think fftw_alloc_compex doesn't require mpi initialization,
> > so no need to initialize fftw_mpi_init().
> As far as I know, you need fftw_mpi_init() even for calls that don't use MPI.
>
> You are, at least supposed to, call it before any other fftw_mpi_... routine.
>
> It might allocate some arrays, or some such, and those might be used by others.

Actually, I am using another's code as a reference in which he didn't initialize fftw_mpi_init()

and it is working perfectly fine

Re: Error:- Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

<ualntj$1pc41$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10069&group=comp.lang.fortran#10069

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: garylsc...@sbcglobal.net (Gary Scott)
Newsgroups: comp.lang.fortran
Subject: Re: Error:- Program received signal SIGSEGV: Segmentation fault -
invalid memory reference.
Date: Sat, 5 Aug 2023 09:55:48 -0500
Organization: A noiseless patient Spider
Lines: 33
Message-ID: <ualntj$1pc41$1@dont-email.me>
References: <28ee3aa3-5511-4326-8b6f-1a81b1807db1n@googlegroups.com>
<9797847f-24ba-4244-91e6-219894516483n@googlegroups.com>
<39f4370c-910e-4603-9f5c-408aed93ce71n@googlegroups.com>
<fc79dd09-fc22-4bfd-979a-5e67e85b322cn@googlegroups.com>
<7020d0e0-c3a0-4ab0-92bb-6185edbc2762n@googlegroups.com>
<b1235bd9-fdb0-4d2f-86b9-2b8384c5680fn@googlegroups.com>
<c79e6efd-3764-4a1c-ab2d-81aa68429074n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 5 Aug 2023 14:55:47 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="7a4fdf6579f3ae1dff59b597a095ecd7";
logging-data="1880193"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19im8RSLDREYr7HOUe9Xn1rZ0FhaYvr/Z0="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Cancel-Lock: sha1:IO4SASkUgZfbYKDaZ7cbrOBhVxc=
Content-Language: en-US
In-Reply-To: <c79e6efd-3764-4a1c-ab2d-81aa68429074n@googlegroups.com>
 by: Gary Scott - Sat, 5 Aug 2023 14:55 UTC

On 8/5/2023 5:28 AM, Pratik Patel wrote:
> On Saturday, August 5, 2023 at 12:01:34 AM UTC+5:30, gah4 wrote:
>> On Friday, August 4, 2023 at 6:51:27 AM UTC-7, Pratik Patel wrote:
>>> On Friday, August 4, 2023 at 5:23:15 PM UTC+5:30, gah4 wrote:
>> (snip)
>>>> Why is call
>>
>>>> fftw_mpi_init()
>>
>>>> commented out?
>>> I tried with that also but it didn't work either. I think fftw_alloc_compex doesn't require mpi initialization,
>>> so no need to initialize fftw_mpi_init().
>> As far as I know, you need fftw_mpi_init() even for calls that don't use MPI.
>>
>> You are, at least supposed to, call it before any other fftw_mpi_... routine.
>>
>> It might allocate some arrays, or some such, and those might be used by others.
>
> Actually, I am using another's code as a reference in which he didn't initialize fftw_mpi_init()
>
> and it is working perfectly fine

It is probably best to understand from the documentation whether it is
recommended to always use the init procedure. It is the case that often
any specific procedure may not depend on the initialization, but you
don't really know for sure unless you have the code to peruse. I
personally would consider it to be bad design on the part of the mpi
package if it did depend on initialization and then didn't complain when
the procedure is called (with possible option to disable that checking
for performance reasons). I've used several packages, including
graphics APIs that require such initialization regardless of whether the
specific function requires it or not. It is simply part of the GUI
template in a "better safe than sorry" structure.

Re: Error:- Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

<bef2b6ae-5d53-426d-923a-4fdbbbf66217n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10070&group=comp.lang.fortran#10070

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:6214:14b1:b0:63c:ffe1:ec39 with SMTP id bo17-20020a05621414b100b0063cffe1ec39mr17827qvb.2.1691282799873;
Sat, 05 Aug 2023 17:46:39 -0700 (PDT)
X-Received: by 2002:a05:6870:76ae:b0:1bf:842e:f3a5 with SMTP id
dx46-20020a05687076ae00b001bf842ef3a5mr6367641oab.10.1691282799555; Sat, 05
Aug 2023 17:46:39 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Sat, 5 Aug 2023 17:46:39 -0700 (PDT)
In-Reply-To: <ualntj$1pc41$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:602:9700:4689:797e:d839:4efa:4271;
posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 2601:602:9700:4689:797e:d839:4efa:4271
References: <28ee3aa3-5511-4326-8b6f-1a81b1807db1n@googlegroups.com>
<9797847f-24ba-4244-91e6-219894516483n@googlegroups.com> <39f4370c-910e-4603-9f5c-408aed93ce71n@googlegroups.com>
<fc79dd09-fc22-4bfd-979a-5e67e85b322cn@googlegroups.com> <7020d0e0-c3a0-4ab0-92bb-6185edbc2762n@googlegroups.com>
<b1235bd9-fdb0-4d2f-86b9-2b8384c5680fn@googlegroups.com> <c79e6efd-3764-4a1c-ab2d-81aa68429074n@googlegroups.com>
<ualntj$1pc41$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <bef2b6ae-5d53-426d-923a-4fdbbbf66217n@googlegroups.com>
Subject: Re: Error:- Program received signal SIGSEGV: Segmentation fault -
invalid memory reference.
From: gah...@u.washington.edu (gah4)
Injection-Date: Sun, 06 Aug 2023 00:46:39 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2540
 by: gah4 - Sun, 6 Aug 2023 00:46 UTC

On Saturday, August 5, 2023 at 7:55:52 AM UTC-7, Gary Scott wrote:
> On 8/5/2023 5:28 AM, Pratik Patel wrote:

(snip)
> > Actually, I am using another's code as a reference in which he didn't initialize fftw_mpi_init()
> > and it is working perfectly fine

> It is probably best to understand from the documentation whether it is
> recommended to always use the init procedure. It is the case that often
> any specific procedure may not depend on the initialization, but you
> don't really know for sure unless you have the code to peruse.

Especially, just because a program works, doesn't mean that the things
that it does are right.

Often enough, you can use elements outside an array without actual problems..
You might store into another array that you aren't using.

As well as I understand it, there are some arrays that get initialized.

Re: Error:- Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

<e542327c-e1fe-42bd-b7fb-30af3273984cn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10228&group=comp.lang.fortran#10228

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:622a:180a:b0:412:26be:464f with SMTP id t10-20020a05622a180a00b0041226be464fmr116263qtc.7.1694690018397;
Thu, 14 Sep 2023 04:13:38 -0700 (PDT)
X-Received: by 2002:a05:6870:989c:b0:1c5:87d6:b779 with SMTP id
eg28-20020a056870989c00b001c587d6b779mr1554188oab.8.1694690018132; Thu, 14
Sep 2023 04:13:38 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Thu, 14 Sep 2023 04:13:37 -0700 (PDT)
In-Reply-To: <c79e6efd-3764-4a1c-ab2d-81aa68429074n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=49.185.51.154; posting-account=L5wwzgoAAAAfQcZzW8eLJKqyFogVIeWA
NNTP-Posting-Host: 49.185.51.154
References: <28ee3aa3-5511-4326-8b6f-1a81b1807db1n@googlegroups.com>
<9797847f-24ba-4244-91e6-219894516483n@googlegroups.com> <39f4370c-910e-4603-9f5c-408aed93ce71n@googlegroups.com>
<fc79dd09-fc22-4bfd-979a-5e67e85b322cn@googlegroups.com> <7020d0e0-c3a0-4ab0-92bb-6185edbc2762n@googlegroups.com>
<b1235bd9-fdb0-4d2f-86b9-2b8384c5680fn@googlegroups.com> <c79e6efd-3764-4a1c-ab2d-81aa68429074n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <e542327c-e1fe-42bd-b7fb-30af3273984cn@googlegroups.com>
Subject: Re: Error:- Program received signal SIGSEGV: Segmentation fault -
invalid memory reference.
From: robi...@dodo.com.au (robin vowels)
Injection-Date: Thu, 14 Sep 2023 11:13:38 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2906
 by: robin vowels - Thu, 14 Sep 2023 11:13 UTC

On Saturday, 5 August 2023 at 20:28:37 UTC+10, Pratik Patel wrote:
> On Saturday, August 5, 2023 at 12:01:34 AM UTC+5:30, gah4 wrote:
> > On Friday, August 4, 2023 at 6:51:27 AM UTC-7, Pratik Patel wrote:
> > > On Friday, August 4, 2023 at 5:23:15 PM UTC+5:30, gah4 wrote:
> > (snip)
> > > > Why is call
> >
> > > > fftw_mpi_init()
> >
> > > > commented out?
> > > I tried with that also but it didn't work either. I think fftw_alloc_compex doesn't require mpi initialization,
> > > so no need to initialize fftw_mpi_init().
> > As far as I know, you need fftw_mpi_init() even for calls that don't use MPI.
> >
> > You are, at least supposed to, call it before any other fftw_mpi_... routine.
> >
> > It might allocate some arrays, or some such, and those might be used by others.
> Actually, I am using another's code as a reference in which he didn't initialize fftw_mpi_init()
>
> and it is working perfectly fine
..
That doesn't prove anything.
Uninitialized variables contain junk values.
Junk can be anything -- it could be zero, or it could be very small values.
Such values, of used, might not show up as wrong values in the result.
It won't hurt to initialize the variables. Try it anyway.

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor