Re: please help
- From: e p chandler <epc8@xxxxxxxx>
- Date: 19 May 2007 09:43:49 -0700
On May 18, 2:52 pm, "Dr Ivan D. Reid" <Ivan.R...@xxxxxxxxxxxx> wrote:
On Thu, 17 May 2007 22:36:02 +0200, fake <a...@xxx>
wrote in <f2iebm$nr...@xxxxxxxxxxxxxxx>:
does this program work, i dont know did i call in the right way function
deqn
the task is to solve 20 linear equations with 20 unknowns, and to write the
solution of x2
this is my program:...
program matrice
real(8), dimension(20,20)::a
real(8), dimension(20)::b
integer::i,j,ifail
dimension IR(20)
call deqn(20,a,20,IR,IFAIL,20,b)
print*,b(2)
This is the library declaration (2004 version of KERNLIB):
SUBROUTINE DEQN(N,A,IDIM,R,IFAIL,K,B)
REAL R(N),T1,T2,T3
DOUBLE PRECISION A(IDIM,N),B(IDIM,K),DET,S,TEMP,
The value of K (parameter 6) should be 1, n'est-ce pas? I've
mentioned in another post that the mismatch in declaration of IR/R should
not be a problem as it's a scratch array, and passed through to other
routines which do declare it integer anyway.
Note that in general I recommend against passing literal constants
to library routines. This helps avoid problems with type
mismatches/conversions.
--
Ivan Reid, School of Engineering & Design, _____________ CMS Collaboration,
Brunel University. Ivan.Reid@[brunel.ac.uk|cern.ch] Room 40-1-B12, CERN
KotPT -- "for stupidity above and beyond the call of duty".
Setting K to 1 seems to solve the OP's problem:
call deqn(20,a,20,ir,ifail,1,b)
A * X is reasonably close to B. (checked in Excel).
Note:
I compiled the test program plus the minimal set of source files
needed (after making necessary changes). The libraries provided on
CERN's web site for Windows use DVF, not a 'GNU' toolset. Google shows
libraries built on Cygwin but not MinGW. Has someone built these for
(MinGW) g77, g95 or gfortran?
-- elliot
.
- Follow-Ups:
- Re: please help
- From: Dr Ivan D. Reid
- Re: please help
- References:
- please help
- From: fake
- Re: please help
- From: Dr Ivan D. Reid
- please help
- Prev by Date: Re: OpenMP problem
- Next by Date: Re: OpenMP problem
- Previous by thread: Re: please help
- Next by thread: Re: please help
- Index(es):
Relevant Pages
|
Loading