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

GNU intrinsic procedures are not recognized by IFX

Rubo
初学者
1,390 次查看

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 项奖励
3 回复数
Steve_Lionel
名誉分销商 III
1,372 次查看

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

0 项奖励
andrew_4619
名誉分销商 III
1,366 次查看

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
名誉分销商 III
1,296 次查看

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 项奖励
回复