- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Using Intel Fortran 8.0 professional for Windows , the program below stops silently after calling IMSL subroutine lin_sol_lsq. How can I make it work, or at least get an error message?
program xlin_sol_lsq_imsl
use rand_gen_int , only: rand_gen
use lin_sol_lsq_int, only: lin_sol_lsq
implicit none
integer i
integer, parameter :: m=20, n=8
real(kind(1d0)), parameter :: one=1d0, zero=0d0
real(kind(1d0)) A(m,0:n), c(0:n,1), pi_over_2, x(m), y(m,1)
! Generate a random grid of points.
call rand_gen(x)
x = x*2 - one
pi_over_2 = atan(one)*2
y(1:m,1) = exp(x) + cos(pi_over_2*x)
A(:,0) = one
A(:,1) = x
do i=2, n
A(:,i) = 2*x*A(:,i-1) - A(:,i-2)
end do
print*,"calling lin_sol_lsq, x=",x
call lin_sol_lsq(A, y, c)
print*,"returned from lin_sol_lsq, c=",c
end program xlin_sol_lsq_imsl
use rand_gen_int , only: rand_gen
use lin_sol_lsq_int, only: lin_sol_lsq
implicit none
integer i
integer, parameter :: m=20, n=8
real(kind(1d0)), parameter :: one=1d0, zero=0d0
real(kind(1d0)) A(m,0:n), c(0:n,1), pi_over_2, x(m), y(m,1)
! Generate a random grid of points.
call rand_gen(x)
x = x*2 - one
pi_over_2 = atan(one)*2
y(1:m,1) = exp(x) + cos(pi_over_2*x)
A(:,0) = one
A(:,1) = x
do i=2, n
A(:,i) = 2*x*A(:,i-1) - A(:,i-2)
end do
print*,"calling lin_sol_lsq, x=",x
call lin_sol_lsq(A, y, c)
print*,"returned from lin_sol_lsq, c=",c
end program xlin_sol_lsq_imsl
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This works fine for me in 8.1.028.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page