Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29234 ディスカッション

GNU intrinsic procedures are not recognized by IFX

Rubo
ビギナー
1,385件の閲覧回数

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,367件の閲覧回数

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

andrew_4619
名誉コントリビューター III
1,361件の閲覧回数

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,291件の閲覧回数

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."

返信