hidden text to trigger early load of fonts ПродукцияПродукцияПродукцияПродукция Các sản phẩmCác sản phẩmCác sản phẩmCác sản phẩm المنتجاتالمنتجاتالمنتجاتالمنتجات מוצריםמוצריםמוצריםמוצרים
Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

IMSL argument convention question

Brian_Murphy
New Contributor II
252 Views
I'm still in learning mode with today's fortran. Why does the IMSL routine LIN_SOL_GEN want arguments declared like X(N,0) when being called to calculate a matrix inverse? This seems really strange. It must have something to do with the argument not being needed in the IMSL for the purpose of determining the inverse. Brian in Austin, TX
0 Kudos
1 Reply
mecej4
Honored Contributor III
252 Views

This particular IMSL routine does more than one job: (i) solving equations, (ii) inverting a matrix, (iii) others (?). Therefore, a convention is required to tell the solver which particular job is involved in this particular call. Note that it is only the size of the matrix b, along with the value of nrhs, that are used in finding the matrix inverse. The matrix b is neither set before calling nor are its values used after the call.

In other words, the authors of IMSL devised a convention to enable distinguishing between Job (i) and Job (ii). If you use their library, you follow their convention. If you were writing the library routine, you might choose an entirely different convention.

0 Kudos
Reply