- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
Dear all,
I programmed my code with the fortran 77 interfaces. However I was wondering if that is possible to mix fortran77 and fortran95 routines. For instance, looking at the sparse blas level 2 routine, mkl_dcsrmv, it is not explicitly stated that it has a fortran77 and fortran95 interface. It is only mentioned that it has a Fortran interface.
If this is possible how can I do this? Which modules should be used without conflicting?
Best regards,
Umut
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
Then what I understood from above there should be some equivalent 77 versions as well, am I correct?
No. Consider, for example, the file mkl_lapack.fi. Inspection of the source file, which is in the mkl/include directory, shows that it is in fixed format. Therefore, one can create a fixed format source file, say, "lapacki.f", containing the following:
C source code for building module module lapack include 'mkl_lapack.fi' end module
After compiling this file, one can say "USE LAPACK" in free format source code as well as fixed format source code.
Enlace copiado
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
What you call "F77 interfaces" and "F95 interfaces" differ only in that the former use fixed source format. Both produce, after compilation, identical module files, which can be USEd in either free or fixed source code. It is even possible to switch between fixed and free format in a single source file using directives, but that is non-portable and is not recommended.
Instead of using interface declarations by including *.fi files, it is better to use the compiler to build the *.mod files from these include files, and USE the modules in your source code. Doing so makes it unnecessary to recompile the voluminous source code in the *.fi files in every project where they are needed.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
mecej4 wrote:
Instead of using interface declarations by including *.fi files, it is better to use the compiler to build the *.mod files from these include files, and USE the modules in your source code. Doing so makes it unnecessary to recompile the voluminous source code in the *.fi files in every project where they are needed.
Ok, then if I am using the fortran95 inteface with USEs, for instance,
use mkl_service use mkl95_precision use mkl95_blas
Then what I understood from above there should be some equivalent 77 versions as well, am I correct?
if yes, where can I find them? To use the 77 versions, I was always including the 'mkl.fi' files, however, now I understood from the above explanation that compiling into mod files is also possible. I am learning fortran recently with a fast pace coming from a programming experience in C/C++.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
Then what I understood from above there should be some equivalent 77 versions as well, am I correct?
No. Consider, for example, the file mkl_lapack.fi. Inspection of the source file, which is in the mkl/include directory, shows that it is in fixed format. Therefore, one can create a fixed format source file, say, "lapacki.f", containing the following:
C source code for building module module lapack include 'mkl_lapack.fi' end module
After compiling this file, one can say "USE LAPACK" in free format source code as well as fixed format source code.

- Suscribirse a un feed RSS
- Marcar tema como nuevo
- Marcar tema como leído
- Flotar este Tema para el usuario actual
- Favorito
- Suscribir
- Página de impresión sencilla