PDA

View Full Version : Need help on using GMRES



samj5532
01-06-2011, 04:44 PM
I am simply trying to run the first GMRES example in the manual.

I was able to build the project successfully, but I could not obtain the output that I should get. In fact, the code does not stop running. When GMRES is called for the first time, 'IDO' is updated to 1. Its value never changes after that and it never goes out the loop.

Can anyone tell me what might be the problem?
Thank you for your help.

mecej4
01-07-2011, 06:04 AM
I don't see any problem compiling and running this example. It would help if you stated your OS, compiler, FNL version and the commands used to build.

samj5532
01-07-2011, 07:19 PM
Thanks for your response.

I use
OS: Windows 7 Professional 64bit
Compiler: PGI Visual Fortran 2010
FNL Version: Fortran Numerical Library 6.0

I'm not sure the commands used to build. I just built the solution in Microsoft Visual Studio. But here are the command lines that I found from the property of the project.

For 'Linker' option,
-g -Bstatic -mp -Mimsl -o "C:\Users\Jun\Documents\IMSLcheckGMRESsimple\x64\De bug\IMSLcheckGMRESsimple.exe" -Wl,/libpath:"C:\Program Files (x86)\VNI\imsl\fnl600\winpg715x64\lib" "C:\Program Files (x86)\VNI\imsl\fnl600\winpg715x64\lib\libimsl.lib" "C:\Program Files (x86)\VNI\imsl\fnl600\winpg715x64\lib\libimslsuper lu.lib" "C:\Program Files (x86)\VNI\imsl\fnl600\winpg715x64\lib\libimslscala r.lib" "C:\Program Files (x86)\VNI\imsl\fnl600\winpg715x64\lib\libimsls_err .lib" "C:\Program Files (x86)\VNI\imsl\fnl600\winpg715x64\lib\libimslmpist ub.lib" "C:\Program Files (x86)\VNI\imsl\fnl600\winpg715x64\lib\libimslspars estub.lib"

For 'Fortran' option,
-g -Bstatic -Mbackslash -mp -Mimsl -I"C:\Program Files (x86)\VNI\imsl\fnl600\winpg715x64\include" -I"c:\program files\pgi\win64\11.0\include" -I"C:\Program Files\PGI\Microsoft Open Tools 10\include" -I"C:\Program Files\PGI\Microsoft Open Tools 10\PlatformSDK\include" -Minform=warn

mecej4
01-08-2011, 01:12 PM
That is not a compiler-IMSL combination that I have access to. It appears to me that the IMSL version is a couple of years older than the PGI compiler version. Did you obtain the IMSL package bundled with the compiler, or separately?

This note from the FNL6 documentation may be worth listening to:


Users wishing to update existing programs so as to call other routines from this library should incorporate a use statement for the specific new routine being called. (Here, the term "new routine" implies any routine in the library, only "new" to the user's program.) Use of the more encompassing "imsl_libraries" module in this case could result in argument mismatches for the "old" routine(s) being called. (The compiler would catch this.)

In other words, use the following USE statements:


USE GMRES_INT
USE MURRV_INT
USE WRRRN_INT
USE AMACH_INT

samj5532
01-10-2011, 02:56 PM
I purchased the compiler together with the IMSL package.
Anyhow, I was able to obtain correct results using USE statements that you suggested. Thank you very much for your help.

mecej4
01-13-2011, 05:12 AM
From your findings we may conclude that, for this compiler, at least, the VNI documentation is overly optimistic in expecting that "The compiler would catch this."