- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to use the INTEL iterative solver RCI FGMRES and I am trying to run the INTEL example as my first step. I can't get the correct answers.
I am copying the code from INTEL example which is for a f77 compiler. I am changing the code from f77 to f95 but I am keeping the header file which is 'mkl_rci.f' .
As far as I know this header file is for a F77 interface. IS it okay to use this header file while having the rest of the code in F90 ?
I mean instead of "double precision" declarationsm I am using REAL*8 and INTEGER*8.
My final answer are all either infinity or NaN as mentioned in my other thread
http://software.intel.com/en-us/forums/showthread.php?t=74658
Is it possible to use a F77 interface header file in a F90 code ?
Thanks a lot.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Fortran 77 has one format for source files: fixed format, with statements starting in column-7,etc. Fortran 9x allows fixed format as well, but introduced free format -- each source file has to adhere to one of the two formats. Almost all of Fortran 77 is a subset of Fortran 9x.
There are some parts of fixed format Fortran source (e.g., line continuations) that are not compatible with free format. As long as the preprocessor output does not run afoul of these incompatibilities, there should be no problem.
The consequence of all this is that you do not have to make any changes to F77 code in order to compile it with an F9x compiler. There may be other reasons to change the code, but mere compiling is not reason enough.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Could you please provide the updated example code?
How did you build example (command line(s))?
-Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Fortran 77 has one format for source files: fixed format, with statements starting in column-7,etc. Fortran 9x allows fixed format as well, but introduced free format -- each source file has to adhere to one of the two formats. Almost all of Fortran 77 is a subset of Fortran 9x.
There are some parts of fixed format Fortran source (e.g., line continuations) that are not compatible with free format. As long as the preprocessor output does not run afoul of these incompatibilities, there should be no problem.
The consequence of all this is that you do not have to make any changes to F77 code in order to compile it with an F9x compiler. There may be other reasons to change the code, but mere compiling is not reason enough.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Could you please provide the updated example code?
How did you build example (command line(s))?
-Vladimir
Vladimir ,
My comiler version is INTEL 10.1 and MKL library is 10.1. My code is also attached to this message.
I am using the follwoing command to compile my code :
ifort RCIFGMRES_INTEL.f90 -g -o ISS.exe -I
/usr/local/compilers/Intel/mkl-10.1/include -L$MKL_HOME/lib/em64t -lmkl
-lmkl_lapack -lguide -Wl,--start-group
$MKL_HOME/lib/em64/libmkl_solver_ilp64_sequential.a
$MKL_HOME/lib/em64t/libmkl_intel_ilp64.a
$MKL_HOME/lib/em64t/libmkl_solver_ilp64_sequential.a
$MKL_HOME/lib/em64t/libmkl_core.a -lpthread -Wl,--end-group
I can compile it , there is no error here!
But when I run it I get NaN values and infinity as follows :
The system has been solved
The following solution has been obtained:
COMPUTED_SOLUTION(1)= NaN
COMPUTED_SOLUTION(2)= -Infinity
COMPUTED_SOLUTION(3)= NaN
COMPUTED_SOLUTION(4)= Infinity
COMPUTED_SOLUTION(5)= NaN
The expected solution is:
EXPECTED_SOLUTION(1)=-0.100E+01
EXPECTED_SOLUTION(2)= 0.100E+01
EXPECTED_SOLUTION(3)= 0.000E+00
EXPECTED_SOLUTION(4)= 0.100E+01
EXPECTED_SOLUTION(5)=-0.100E+01
Number of iterations: 1
This example may have FAILED as either the number of iterations differs from the expected number of iterations 5 or the computed solution differs much from the expected solution (Euclidean norm is 0.0000000000000000E+00), or both.
1
[smirsa1@philip1 ISS]$
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Fortran 77 has one format for source files: fixed format, with statements starting in column-7,etc. Fortran 9x allows fixed format as well, but introduced free format -- each source file has to adhere to one of the two formats. Almost all of Fortran 77 is a subset of Fortran 9x.
There are some parts of fixed format Fortran source (e.g., line continuations) that are not compatible with free format. As long as the preprocessor output does not run afoul of these incompatibilities, there should be no problem.
The consequence of all this is that you do not have to make any changes to F77 code in order to compile it with an F9x compiler. There may be other reasons to change the code, but mere compiling is not reason enough.
Hi mecej4,
I could compile the F77 EXAMPE Of INTEL[ Intel MKL RCI (P)FGMRES ((Preconditioned) Flexible Generalize Minimal
RESidual method) example] with no problem with the following command :
ifort exm.f -g -o I.exe -I /usr/local/compilers/Intel/mkl-10.1/include -L$MKL_HOME/lib/em64t -lmkl -lmkl_lapack -lguide -Wl,--start-group $MKL_HOME/lib/em64t/libmkl_solver_ilp64_sequential.a $MKL_HOME/lib/em64t/libmkl_intel_ilp64.a $MKL_HOME/lib/em64t/libmkl_core.a -lpthread -lmkl -lmkl_lapack -lguide -Wl,--end-group -lpthread
but when I run it , it is aborted :
[smirsa1@philip1 ISS]$ ./I.exe
--------------------------------------------------
The SIMPLEST example of usage of RCI FGMRES solver
to solve a non-symmetric indefinite non-degenerate
algebraic system of linear equations
--------------------------------------------------
Aborted
Is there a debugger on INTEL I could use ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Finally, I could run the example successfully. And my result was right. The adminitrator on the system I am using, installed the latest version of MKL library (10.2) and my problems were all solved. The latest version of INTEL compiler and MKL version 10.1 do not go together, at least thsi was the case for me.
Thank you so much fo ryour input and help.
Amin

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