Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28482 Discussions

GNU intrinsic procedures are not recognized by IFX

Rubo
Beginner
665 Views

ifx does not recognized some of the intrinsic procedures available for GNU compilers: error #6404: This name does not have a type, and must have an explicit type. [RENAME] file_status = rename(trim(f1), trim(f2)) --------------------------^ error #6404: This name does not have a type, and must have an explicit type. [CHMOD] status = chmod(pathname, mode) !! intrinsic GNU -----------------^ error #6404: This name does not have a type, and must have an explicit type. [STAT] status = stat(trim(adjustl(filename)), buffer) -----------------^ error #6404: This name does not have a type, and must have an explicit type. [GETCWD] io_status = getcwd(cwd) --------------------^ error #6404: This name does not have a type, and must have an explicit type. [CHDIR] io_status = chdir(trim(targetdir)) ------------------------^ error #6404: This name does not have a type, and must have an explicit type. [IERRNO] err = int(IERRNO(), kind=4 ) --------------------------^ error #6362: The data types of the argument(s) are invalid. [INT] err = int(IERRNO(), kind=4 ) --------------------------^ error #6404: This name does not have a type, and must have an explicit type. [GETPID] get_process_id = getpid() -------------------------^ error #6404: This name does not have a type, and must have an explicit type. [GETUID] get_login_id = getuid() -----------------------^

 

Any ideas on how to solve this issue?

Thanks

0 Kudos
3 Replies
Steve_Lionel
Honored Contributor III
647 Views

Most (if not all - I didn't check) of these are in the Portability Library. Portability Library Routines (intel.com)

0 Kudos
andrew_4619
Honored Contributor II
641 Views

You can replace non-standard GNU extensions with non-standard Intel extensions. A better quick fix is to call your own functions e.g. "myRename" , "myCHMOD" etc as simple wrappers and then just have the non-standard extensions in one occurrence in one place.  It will improve the portability and by replacing one compiler specific source file you have compatibility with both systems. 

mecej4
Honored Contributor III
571 Views

A few words of caution, as expressed years ago by @Steve_Lionel:

 

"There is no guarantee that any of the 'portability' procedures are implemented the same with other compilers. There are several I know of that have different interfaces and behaviors depending on the compiler. You're not guaranteeing portability by avoiding IFPORT."

0 Kudos
Reply