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

numerical integration

pkalozoum
Beginner
875 Views
Hello,
I would like to know how can I perform a numerical integration (definite integral) with MKL?
Thank you in advance
Panayotis
0 Kudos
6 Replies
mecej4
Honored Contributor III
875 Views
With Fortran, not with MKL: Quadpack .
0 Kudos
pkalozoum
Beginner
875 Views
Thanks! So I just call the suitabel routine from netlib without any linking to the library?
If I need to link it, can you tell me how to do it?
Panayotis
0 Kudos
mecej4
Honored Contributor III
875 Views
Note that there was no MKL when Quadpack was published, and Intel was a young company. The IBM PC was yet to be conceived.

Read the included documentation and decide what type of integration is needed. Is the integrand singular at the limits of integration or within the interval? Do you wish to use an adaptive algorithm or a simple one? What precision do you require?

Software from Netlib has a more or less standard structure.

1. There will always be a set of subroutines/functions. Often, the documentation is included in the form of comments in the source code.

2. In earlier software, it was common to include the code for the driver (see 3. below) with 'C' at the beginning of such lines. You copy those lines, remove the 'C's at the beginning of each line and save as a Fortran file.

3. Sometimes, there is a short "driver", i.e., an example main program that illustrates calling the subroutine.

4. Some packages contain double-precision and single-precision versions concatenated together into one long file. You will have to split the parts apart before using.

5. Sometimes, there is a README file.
0 Kudos
yuriisig
Beginner
875 Views
Quoting pkalozoum
Hello,
I would like to know how can I perform a numerical integration (definite integral) with MKL?
Thank you in advance
Panayotis

All depends on type of integrals. I, for example, successfully applied the singular analysis from MKL (my implementation). The scoring received the enormous.

0 Kudos
pkalozoum
Beginner
875 Views
What I don't understand is, if I have to download and install quadpack and then call the proper subroutine, or just copy/paste the subroutine from netlib in my code. I'm not familiar with this stuff.
Thanks again
Panayotis
0 Kudos
mecej4
Honored Contributor III
875 Views
Suppose you had composed the source code for the needed Quadpack routine yourself. What would you do to compile and run your program? You do the same, except that instead of entering the source code in an editor you download a file.

If you still don't know what to do, you really must read Fortran books or a user guide to learn how to compile, link, run and debug Fortran programs.
0 Kudos
Reply