Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
8 Views

Boundary Run-Time Check Failure

Jump to solution

Good morning.

I have a hybrid OpenMP/MPI code.

It compiles and runs successfully. I compile with:

mpiifort -qopenmp -mt_mpi

When I use option: -check stack, I get:

Boundary Run-Time Check Failure for variable 'cluster_$MMODEL'

forrtl: error (76): Abort trap signal

What is this telling me?

Do you need to see the source file? The complete error trace?

Thank you very much.

 

 

 

 

 

 

 

0 Kudos

Accepted Solutions
Highlighted
8 Views

The problem is that MPI_WIN

Jump to solution

The problem is that MPI_WIN_GET_ATTR is writing wsize as an 8-byte integer (assuming you're building 64-bit). You declare it as a default integer which is 4 bytes. The stack check option correctly notices this and complains.

I'm having a hard time finding documentation to say what is supposed to happen here. I find that even if I do make wsize 8 bytes, the value it gets set to is, to my eyes, garbage.  I did find http://www.mpi-forum.org/docs/mpi-3.1/mpi31-report/node266.htm that suggests an address is returned, but the value I am seeing doesn't point to valid memory.

This is where my MPI knowledge stops (actually, it stopped fairly far back..) In any case, the basic issue is that wsize is incorrectly declared. I suggest declaring it as:

integer(int_ptr_kind()) :: wsize

What you do with the value is up to you.

Retired 12/31/2016

View solution in original post

0 Kudos
5 Replies
Highlighted
8 Views

This message is telling you

Jump to solution

This message is telling you that the program has corrupted the stack by writing outside the declared bounds of a variable. The error might not have been noticed without the optional stack checking and may not be harmful, but it is worth investigating. 

Retired 12/31/2016
0 Kudos
Highlighted
Beginner
8 Views

ok, thanks. However, the

Jump to solution

ok, thanks. However, the simplest checks failed:

the option -CB does not give anything, so it's not an array problem

the variable mentioned in the error stream, cluster_$MMODEL, is an integer scalar.

It is, however, a cached variable for a window. So my first question is: do I have to include the memory for the cached variables (base, size, etc.) when I create the window? Also, is the memory for the window linked to this stack problem?

For your reference, I include here everything, i.e.:

- source: modules.f, windows2.f

- makefile. I compile with: make -f Makefile.MPI

- submission script. I ran with: ./MPI_interactive.sh 3

- output and error streams. The output is correct and the program does what it should.

- compiler: > mpiifort -v
mpiifort for the Intel(R) MPI Library 5.0 Update 3 for Linux*
Copyright(C) 2003-2015, Intel Corporation.  All rights reserved.
ifort version 15.0.2

- system: > uname -a
Linux imip15.ba.imip.cnr.it 2.6.32-504.8.1.el6.x86_64 #1 SMP Wed Jan 28 21:11:36 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

It would help me a lot if you could give me some tips.

Thank you very much.

 

0 Kudos
Highlighted
Beginner
8 Views

Update: I was able to reduce

Jump to solution

Update: I was able to reduce the code to the bare minimum required to produce the error (attached)

No OpenMP, no computation. Just open the window, ask for the size, close the window. I also noticed the following:

1. If I don't ask for the size (with MPI_WIN_GET_ATTR) I don't get the error

2. If I do the same in the main, without the subroutine, I don't get the error

Thank you very much.

 

 

 

0 Kudos
Highlighted
9 Views

The problem is that MPI_WIN

Jump to solution

The problem is that MPI_WIN_GET_ATTR is writing wsize as an 8-byte integer (assuming you're building 64-bit). You declare it as a default integer which is 4 bytes. The stack check option correctly notices this and complains.

I'm having a hard time finding documentation to say what is supposed to happen here. I find that even if I do make wsize 8 bytes, the value it gets set to is, to my eyes, garbage.  I did find http://www.mpi-forum.org/docs/mpi-3.1/mpi31-report/node266.htm that suggests an address is returned, but the value I am seeing doesn't point to valid memory.

This is where my MPI knowledge stops (actually, it stopped fairly far back..) In any case, the basic issue is that wsize is incorrectly declared. I suggest declaring it as:

integer(int_ptr_kind()) :: wsize

What you do with the value is up to you.

Retired 12/31/2016

View solution in original post

0 Kudos
Highlighted
Beginner
8 Views

Solved !!

Jump to solution

Solved !!

Everything works if the window attributes are declared as integer(KIND=MPI_ADDRESS_KIND).

Thank you very much for pointing me in the right direction.

 

 

0 Kudos