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

Regarding use of static libraries with ifort.

kapahi
Beginner
1,029 Views
Hi all.

So here is the problem:
I am trying to link a f90 code with chemkin libraries (extension *.a). These libraries were written in f77 and given to users by this commercial software company Reaction design. Now when I try to compile these libraries with ifort compiler I get the segmentation fault error.

Image PC Routine Line Source
conp1 000000000040E150 Unknown Unknown Unknown
conp1 000000000040598D MAIN__ 49 chemkin_drive.f90
conp1 0000000000405522 Unknown Unknown Unknown
libc.so.6 00002B003899EAE4 Unknown Unknown Unknown
conp1 0000000000405469 Unknown Unknown Unknown

But the same stuff works fine if I use a f77 code and use same libraries.

Any help will be appriciated.
Thanks
Anil
0 Kudos
3 Replies
Steven_L_Intel1
Employee
1,029 Views
I think we'd need more information. However, if the chemkin library was compiled with any other Fortran compiler, it cannot be used with Intel Fortran. All Fortran sources must be recompiled with Intel Fortran. Objects and libraries from different Fortran compilers are generally not mixable.
0 Kudos
kapahi
Beginner
1,029 Views
Hi Steve,
Thanks for reply. Actually I am sorry about the limited information provided in the last email.

So the library chemkin.a has subroutine like allocating the required number of elements in arrays, computing reaction rates and other thermodynamic properties depending on the problem. Now as for now I can create an executable file using a f77 code and the given library and that executable works fine.

Now is there any way I can recompile those libraries. As far as I know, these libraries are precompiled and made using ar commands.One more concern is that this stuff is provided by a commercial software company and they don't support in case you want to mess with their libraries.

Any thouhts will be appreciated.

Anil Kapahi
0 Kudos
TimP
Honored Contributor III
1,029 Views
In case you missed the point, it's not a question of whether the libraries were written in Fortran 77, but a question of which compiler run-time library is required. And no, it's not feasible, aside from questions of legality, to recover source code from a compiled library.
0 Kudos
Reply