- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have switched from ifort to ifx, and the linker stopped working. I keep getting the message
obj/SSOT.o: file not recognized: file format not recognized
make[1]: *** [Makefile:16: SSOT] Error 1
The complete Makefile is appended below. I cleaned the object files prior to compiling, so that SSOT.o has been produced by ifx (actually, the documentation says that object/binary files produced by ifort should be compatible with ifx).
I also attach the complete code I am trying to compile. To reproduce (under linux): unpack, go to the root directory, and type
make all
Tried a few things but nothing works. Would be very grateful for help. Thanks!
**** Makefile **********
comp = ifx
lopt = -qmkl=parallel -warn all
fopt = -nogen-interfaces -I ./inc -module ./mod -warn all -c -fast
sopt = -nogen-interfaces -I ./inc -module ./mod -warn all -c
obj = obj/check_pars.o \
obj/diag_W.o \
obj/dump_W.o \
obj/get_model.o \
obj/get_u.o \
obj/make_ub.o \
obj/make_W.o \
SSOT : obj/SSOT.o $(obj)
$(comp) -o bin/SSOT.exe obj/SSOT.o $(obj) $(lopt)
obj/SSOT.o : src/SSOT.f90
$(comp) -o obj/SSOT.o src/SSOT.f90 $(fopt)
obj/check_pars.o : sub/check_pars.f90
$(comp) -o obj/check_pars.o sub/check_pars.f90 $(sopt)
obj/diag_W.o : sub/diag_W.f90
$(comp) -o obj/diag_W.o sub/diag_W.f90 $(fopt)
obj/dump_W.o : sub/dump_W.f90
$(comp) -o obj/dump_W.o sub/dump_W.f90 $(fopt)
obj/get_model.o : sub/get_model.f90
$(comp) -o obj/get_model.o sub/get_model.f90 $(sopt)
obj/get_u.o : sub/get_u.f90
$(comp) -o obj/get_u.o sub/get_u.f90 $(sopt)
obj/make_ub.o : sub/make_ub.f90
$(comp) -o obj/make_ub.o sub/make_ub.f90 $(fopt)
obj/make_W.o : sub/make_W.f90
$(comp) -o obj/make_W.o sub/make_W.f90 $(fopt)
clean :
rm *~ src/*.f90~ sub/*.f90~ inc/*.f90~ obj/*.o bin/*.exe mod/*.mod
all :
make SSOT
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We'll take a look. thank you for a full reproducer!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks! Any idea yet? I get the same error with all my projects.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Looks like the compiler driver is confused by the -fast flag (a called tool probably interprets this as -f=ast or somesuch). List the individual options implied by -fast ( -ipo, -O3, -static, -fp-model fast ) instead.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks! It is indeed -fast option that's causing the problem; however, it is not misinterpreted. Rather, the inter-procedural optimization (-ipo), which is implied by -fast, is not working with ifx. I do not need this type of optimization and will adjust accordingly, but I thin it's a bug.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oops - I had missed -ipo when I expanded -fast in my tests here.
If you compile with -ipo, you also need to link with -ipo. That requirement is documented.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page