[Trilinos-Users] az_reorder.f

Simone Deparis deparis at MIT.EDU
Mon Dec 5 09:00:07 MST 2005


Mike,

Thank you, What you says makes sense. I've switched off the fortran
bounds ("-fbounds-check") check and the runtime error disappears.
I'm going to run my tests again to see if everything is fine now.

Thank you
Simone

PS: in F90 (at least) there is a declaration like
integer mine(:)
to say that the input is an array of unknown size.
I am not sure if it is  f77 compliant.
But I am sure nobody wants to change all the code in the library :-)




Mike Heroux wrote:
> Simone,
> 
> It was a common practice, and probably still is in some circles, to declare
> an array this way, even if the array had more than one element.  It is a
> simple way to tell the compiler that the argument was an array without
> needing to declare its dimension.  Since Fortran compilers by default did
> not (do not?) check the array bounds, there was no practical difference
> between this type of declaration and a more rigorous specification.
> 
> If you are compiling with array bounds checking on, then the runtime library
> will complain, but it is very likely not a real error, especially since this
> code is very mature and has not been changes in many years.
> 
> Mike
> 
> 
>>-----Original Message-----
>>From: trilinos-users-bounces at software.sandia.gov 
>>[mailto:trilinos-users-bounces at software.sandia.gov] On Behalf 
>>Of Simone Deparis
>>Sent: Sunday, December 04, 2005 10:37 PM
>>To: trilinos-users at software.sandia.gov
>>Subject: [Trilinos-Users] az_reorder.f
>>
>>Hi,
>>
>>I have the following question, probably a dummy one because I 
>>am not used to fortran notation:
>>
>>in packages/aztecoo/src/az_reorder.f:184
>>we call
>>jstrt    = xadj(node)
>>jstop    = xadj(node + 1) - 1
>>
>>(with,  node=1 in my case),
>>where xadj is decleared as a
>>integer xadj(1)
>>I do not understand why we can access xadj(2) Is this correct?
>>
>>Thank you
>>Simone
>>PS: I encounter a
>>Subscript out of range on file line 185, procedure 
>>../../../../packages/aztecoo/src/az_reorder
>>Attempt to access the 2-th element of variable xadj.
>>
>>when Epetra is compiled with bounds checking. I need to 
>>discover wheter this comes from my matrix or this piece of code.
>>
>>--
>>_____________________________________________________________________
>>                                     Simone Deparis
>>   .~.                               Mechanical Engineering Dept
>>   /V\   L   I   N   U   X           77 Mass Ave Room 3-264
>>  // \\  =================           Cambridge MA 02139
>>/(   )\                             USA
>>  ^^-^^
>>phone :  +1 617 452 3285  mailto:deparis at mit.edu
>>fax   :  +1 617 258 8559  http://www.mit.edu/~deparis
>>_____________________________________________________________________
>>
>>
>>
>>_______________________________________________
>>Trilinos-Users mailing list
>>Trilinos-Users at software.sandia.gov
>>http://software.sandia.gov/mailman/listinfo/trilinos-users
>>
> 
> 
> 

-- 
_____________________________________________________________________
                                    Simone Deparis
  .~.                               Mech Eng Dept - MIT
  /V\   L   I   N   U   X           77 Mass Ave Room 3-264
 // \\  =================           Cambridge MA 02139
/(   )\                             USA
 ^^-^^
phone :  +1 617 452 3285  mailto:deparis at mit.edu
fax   :  +1 617 258 8559  http://www.mit.edu/~deparis
_____________________________________________________________________





More information about the Trilinos-Users mailing list