- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello everyone,
I need help about fortran standards used in different fortran compilers. I know that run time association of function pointers was not possible with Intel Fortran compiler version 11.xx. Therefore I had to upgrade to Intel Fortran 2015 compiler. Of course it has something to do with underlying fortran standard which is supported. Could anybody give me some formal information about this. Thank you for your time in advance.
With best regards,
Baris.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Look at Fortran Wiki
Compiler Support for Modern Fortran
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Unfortunately. such information is generally provided for the current version only, not one that is five years old. I am not sure what you mean by "run-time association of function pointers", though. Can you show an example of the usage you're looking for?
The 2019 version of the compiler supports all of Fortran 2008 and a good chunk of Fortran 2018. I see no good reason to be running a five-year-old version of the product.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Steve,
Thank you for prompt response.
Below is one example. I was developing a program using Intel Fortran. At one point of the development I wanted to take out some part and embed it into DLLs. Then the old compiler was giving error because run-time association of function pointers, which have been set to null() during compile-time. For that reason I had to upgrade to Intel Fortran 2015.
What I want to say in a formal statement that such a feature, as mentioned above, was not supported in Intel Fortran 11.xx compiler which was supporting XXX Fortran standard. Therefore I had to switch to Intel Fortran 2015 which was supporting XXX Fortran standard and the problem has been solved. I want to be more formal and want to motivate need for a change in Intel Fortran compiler. Otherwise with the latest version available, life is beautiful :).
!definition module TYPES_MAT_LIB !modules use kernel32, NULLPTR => NULL !use, intrinsic :: iso_c_binding !variables implicit none ! ------------------------------------------------------------------- abstract interface subroutine Func_Init_Hist( ent_gp ) use TYPES_DSCR type(type_dscr_gp), intent(INOUT) :: ent_gp end subroutine Func_Init_Hist end interface ! ------------------------------------------------------------------- type type_mate_lib_item character(256) :: DllPath character(256) :: DllName integer(HANDLE) :: hInstance !function pointers !... procedure(Func_Init_Hist), pointer, nopass :: FP_Init_Hist => null() !... end type type_mate_lib_item !------------------------------------------------------------------- type type_mate_lib type(type_mate_lib_item), dimension(:), pointer :: materials end type type_mate_lib ! ------------------------------------------------------------------- end module TYPES_MAT_LIB !RUN-TIME ASSOCIATION matlib%materials(iMat)%DllPath = trim(adjustl(dll_path)) hInstance = LoadLibrary(matlib%materials(iMat)%DllPath) matlib%materials(iMat)%hInstance = hInstance matlib%materials(iMat)%DllName = trim(adjustl(dll_name)) if ( hInstance .NE. NULLPTR ) then !... p=GetProcAddress(matlib%materials(iMat)%hInstance,"INITIALIZE_HISTORY"C) call C_F_PROCPOINTER(transfer(p,C_NULL_FUNPTR),matlib%materials(iMat)%FP_Init_Hist) !... else write(*,'(/,A)')"unable to load library material..." write(*,'(A)')trim(adjustl(matlib%materials(iMat)%DllName)) write(*,*)"" read(*,*) call exit(1) end if
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The 11.x compiler was Fortran 95 with a lot of Fortran 2003. The 15.0 compiler (2015) supported all of Fortran 2003 plus some F2008 features. As best as I can tell, 11.1 (the oldest I can find release notes for) supported procedure pointers, including pointer assignment. It's possible 11.0 did not, but I am a bit skeptical about that. You can review the release notes back to 11.1 at https://software.intel.com/en-us/articles/intel-fortran-compiler-release-notes - each version tells you which features from standards were added.
Your program uses the F2003 C interoperability features. My memory, somewhat hazy, is that Intel added those in the 10.0 release.
Since I was the one maintaining the release notes for this timeframe, and also a knowledge base article on standards support, I had in mind to develop a chart showing which features made it into which release, but that never got started.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Steve,
Thank you helping me to clarify the situation and for your time again.
Kind regards,
Baris.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page