PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

migratio f90 -> pgf90 : file format not recognized
Goto page 1, 2  Next
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Licenses and Installation
View previous topic :: View next topic  
Author Message
goethe



Joined: 25 Jul 2012
Posts: 4

PostPosted: Wed Jul 25, 2012 7:48 am    Post subject: migratio f90 -> pgf90 : file format not recognized Reply with quote

Hello.

Doing a migration from f90 (sun) to pgf90 (linux) i have the following error:

Code:
/usr/bin/ld:OBJ/My_module_XX: file format not recognized; treating as linker script
/usr/bin/ld:OBJ/My_module_XX.o:1: syntax error
*** Error code 2
clearmake: Error: Build script failed for "PROGNAME"


On the makefile:
Code:
(...)
$(DBIN):   $(XXMODULE)
   $(F90) $(XXMODULE) -o  $@ $(OBJCOM) $(DLDFLAGS)


When make file is "launched", i have:
Code:
       pgf90 XXXX1.o XXXX2.o (...) -o  PROGNAME AFILE.o AFILE2.o ALIB.a


Would you havec any idea about this problem ??
Thanks a lot for your help !!
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6218
Location: The Portland Group Inc.

PostPosted: Wed Jul 25, 2012 9:44 am    Post subject: Reply with quote

Hi goethe,

The problem here is that the linker doesn't know what type of file your objects are. My best guess is that you have an error in compile options which is causing a different type of file to be created, such as "-S" to create an assembly file. Do you have an example of the compile line for "My_module_XX.o"?

- Mat
Back to top
View user's profile
goethe



Joined: 25 Jul 2012
Posts: 4

PostPosted: Thu Jul 26, 2012 2:08 am    Post subject: Reply with quote

Hi, and thanks a lot for your help !

Compile options should be th key point (i haven't found how to "translate" F90 option to pgf90..)

Here are the line:

Code:
F90FLAGS   =   -i4 -r8 -Mcpp -C -IINC -IOBJ -LOBJ

$(DIROBJ)/%.o:   %.F90
   pgf90 $(F90FLAGS) -c $<  -o $@


goethe.
Back to top
View user's profile
TheMatt



Joined: 06 Jul 2009
Posts: 322
Location: Greenbelt, MD

PostPosted: Thu Jul 26, 2012 4:52 am    Post subject: Reply with quote

goethe wrote:
Hi, and thanks a lot for your help !

Compile options should be th key point (i haven't found how to "translate" F90 option to pgf90..)

Here are the line:

Code:
F90FLAGS   =   -i4 -r8 -Mcpp -C -IINC -IOBJ -LOBJ

$(DIROBJ)/%.o:   %.F90
   pgf90 $(F90FLAGS) -c $<  -o $@


One possible issue is using "$<". That can only be used in suffix rules, at least in GNU Make (not sure about clearmake). For a % rule in gmake, I use "$^". May not solve the underlying issue, though.
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6218
Location: The Portland Group Inc.

PostPosted: Thu Jul 26, 2012 9:48 am    Post subject: Reply with quote

The problem is the "-Mcpp" flag which just pre-processes the file using cpp but does not compile it. Remove this flag or change it to "-Mpreprocess" (though .F90 files are preprocessed by default).

Hope this helps,
Mat

Code:

% pgf90 -help -Mcpp
-Mcpp[=m|md|mm|mmd|line|[no]comment|suffix:<suff>|<suff>|include:<file>|c89|c99]
                    Just preprocess the input files
    m               Print makefile dependencies
    md              Print makefile dependencies to .d file
    mm              Print makefile dependencies; ignore system includes
    mmd             Print makefile dependencies to .d file; ignore system includes
    line            Insert line numbers into preprocess output
    [no]comment     Keep comments in preprocessed output
    suffix:<suff>   Suffix to use for makefile dependencies
    <suff>          Suffix to use for makefile dependencies
    include:<file>  Include file before processing source file
    c89             Use the C89 language
    c99             Use the C99 language
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Licenses and Installation All times are GMT - 7 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group