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

Library Compatibility Across Different ifort Versions

JKrob2
초급자
123 조회수

All,

 

Came across a gentleman providing some 'precompiled' libraries for some code I have been trying to build (Precompiled netCDF-C & netCDF-Fortran with Intel oneAPI and MVS2022 on Windows 11) - GREAT!  I downloaded his files, created an ifort project, configuring the include libraries and all as directed in his instructions. I noted he references "Intel Fortran Compiler: 2024.2.0.424" where I have "Intel Fortran Compiler: 2024.1". When I compile & link a simple demo project, I get this error:

error #7881: This module file was generated for a different platform or by an incompatible compiler or compiler release. It cannot be read.

Is it correct that 2024.2 compiled libraries are not usable in a 2024.1 project? If so, how is one supposed to know a libraries' compile version to use with a specific compiler?

 

Thanks,

Jeff

 

0 포인트
1 솔루션
Steve_Lionel
명예로운 기여자 III
118 조회수

The issue isn't the library, but rather the module file.  Intel Fortran module files (.mod) are generally upward compatible, with rare exception.  It could be that the compiled module file was built by a non-Intel compiler. I think there is also an issue mixing 32-bit and 64-bit compiles - if you have 2024 then you still have ifort which supports 32-bit.  If you are building 64-bit, try switching to 32-bit or vice-versa. (Library files definitely have 32 vs 64-bit compatibility issues, but you'd see a different error in that case.)

원본 게시물의 솔루션 보기

0 포인트
1 응답
Steve_Lionel
명예로운 기여자 III
119 조회수

The issue isn't the library, but rather the module file.  Intel Fortran module files (.mod) are generally upward compatible, with rare exception.  It could be that the compiled module file was built by a non-Intel compiler. I think there is also an issue mixing 32-bit and 64-bit compiles - if you have 2024 then you still have ifort which supports 32-bit.  If you are building 64-bit, try switching to 32-bit or vice-versa. (Library files definitely have 32 vs 64-bit compatibility issues, but you'd see a different error in that case.)

0 포인트
응답