Without a sample of the code it's hard to say. The likely cases are
that in exam1 or exam2 you dimension the first argument as (:)
which requires an explicit interface to work or that you give a
the POINTER attribute in exam1 or exam2 (which also requires an
explicit interface.
So, how do you dimension the arguments in exam1 and exam2? and are
they in a module with an explicit interface?
Also, when you have a problem it's worth trying "print *, a"
rather than just use a debugger. Some debuggers either don't
work or don;t work with all of the new F90 stuff.
Dick Hendrickson
Suresh Seetharam wrote:
>
> Dear All,
>
> I am finding it difficult to fix a problem arising due to signal
> error. I use fortran 90 compiler, and sun workshop for debugging the
> program. I have a peculiar problem, i have written a sample code to
> explain my problem :
>
> real, dimension(10) :: a
>
> ! a is an array that is used by both exam1 and exam2 subroutines to
> evaluate b,c,d & e
>
> call exam1 (a, b, c)
>
> ! exam1 works as the input array "a" is read correctly
>
> call exam2 (a, d, e)
>
> ! but when the program enters this subroutine, the program signals
> giving out the following error SIGSEGV 11 MAPERR, I have fixed
> problems due to this signal message in the past, but in this instance
> i am unsuccessful, and when i tried to read what array "a" contains
> in exam2, i got the following answer from the workshop utility, which
> is
>
> a =
> (4324567) = 0.0
> (4324568) = 0.0
> .
> .
> .
> .
> and so on
>
> what i don't understand is how does "a" have such a large value when
> it enters exam2, while it should have read as
>
> a =
> (1) = 0.0
> (2) = 0.0
>
> .
> .
> .
>
> and so on upto (10) which is what i get when i read it
> in exam1 subroutine
>
> this is not the problem just for array "a", likewise, i have 3 more
> arrays which face the same problem.
>
> Please let me know where i might have failed ?
>
> best regards
> suresh
>
>
>
>
> ===================================================
> Mr Suresh Seetharam
> Geoenvironmental Research Centre
> Cardiff University
> Queen's Buildings
> PO BOX 925
> Cardiff CF24 0YF
> Wales UK
> Tel: +44 (0) 29 20 875753
> E-Mail: [log in to unmask]
> http://www.grc.cf.ac.uk
> http://www.grc.cf.ac.uk/members/SureshCSeetharam.html
> ===================================================
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|