Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

Invalid status in sample_scond.f

ansa
Beginner
675 Views
Hi. I'm testing MKL's convolution using sample_scond.f (/opt/intel/mkl/8.0/examples/vslf/essl/vsl_wrappers), but I'm getting an invalid status at vslsconvexec1d. Here is the return:
ERROR: scond(): bad status= -2012
Below is part of the code:
program teste
real a(100),b(20), c(120)
integer nciclo, nstride, na, nb, nc, ini

nciclo = 900000
nstride = 1
na=100
nb=20
nc=120
ini=0

do i=1,100
a(i) = i
enddo

do i=1,20
b(i) = i
enddo
do i=1,120
c(i) = 0
enddo
........
do i=1,nciclo
call scond(a,nstride,b,nstride,c,nstride,na,nb,ini,nc)
enddo
end
Anyclue?
Thanks in advance.
Anselmo
0 Kudos
4 Replies
Yevgeny_Latkin__Inte
675 Views

The error status=-2012 is raised correctly to indicate the error in the input parameters which the code example passes to the subroutine scond(). Namely, the status=-2012 indicates about the parameter nc whose value nc=120 is too large. Probably, it must be nc=119;because mathematically, the length of resulting sequence of the convolution operation would be na+nb-1, not na+nb.

0 Kudos
ansa
Beginner
675 Views
This is the case. I changed the nc value to 119 and the program works fine. I thought that ifnc is greater tha nb+nb-1 the programwould work, but you mustset nc to the exact value.I would like to know how did you get the information about the status code. Thanks.
Anselmo
0 Kudos
Yevgeny_Latkin__Inte
675 Views

Anselmo,

Please excuse me for not responding this long time; I have overlooked your message. And I must also apologize for not identifying myself as an Intel employee at my previous posting; that was my 1st experience with this forum and I made a technical mistake.

You are asking, how I got the information about the status code. Im one of the authors of the code and of the MKL Reference Manual. Unfortunately, the MKL 8.0 version of the Manual doesnt include information about the error codes for the convolution and correlation software. We are working on this issue.

As for allowing nc>na+nb-1, such idea looks interesting. But, what value should be stored to c(120) in this case? Do you assume that the tail of the resulting array must be fulfilled with zeros?

Thanks,

Yevgeny Latkin (Intel Employee)

0 Kudos
ansa
Beginner
675 Views
Hi Yevgeny .
...Do you assume that the tail of the resulting array must be fulfilled with zeros?...
Sure, this is what we did with ours convolution's home code. Maybe you could warn the user and don't stop the program, only advice him.
Best regards.
Anselmo
0 Kudos
Reply