PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

source line to long
Goto page 1, 2  Next
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
mc3



Joined: 07 Sep 2004
Posts: 4

PostPosted: Tue Sep 07, 2004 1:14 am    Post subject: source line to long Reply with quote

we porting our application from Sun-Solaris to Linux (64bit) using
the pgf90 compiler.
Unfortunately our macros-source-lines (and other) become to long for the new Compiler! (even with the -Mextend - Flag)

Is there a way to break a macro in more than one (precompiled-)line or to
allow more signs in a source-line?
Or is it possible to use another precompiler. E.g. fpp breaks source-lines that are to long using "&".
Back to top
View user's profile
mleair



Joined: 19 Jul 2004
Posts: 67
Location: Portland Group

PostPosted: Tue Sep 07, 2004 9:45 am    Post subject: macros Reply with quote

Hi,

Do you have a small example of the macro that is causing this error? I wonder if this is a bug in which the macro expansion is going into an infinite loop. What happens when you compile with -Mfree for free form source?

-Mark
Back to top
View user's profile
mc3



Joined: 07 Sep 2004
Posts: 4

PostPosted: Wed Sep 08, 2004 12:09 am    Post subject: source line to long Reply with quote

Using -Mfree doesn't changes the compiler output.
Here is an small example:

Makro:
#define MSG_E02_006(X) MSG_BEREICH,"E02_006","Unerwartetes Erreichen des Dateiendes beim Lesen der Datei '"//trim(X)//"' des thermischen Erzeugungssystems. Moeglicherweise ist ein Datenkapitel nicht mit '*' abgeschlossen."

Sourceline:
" if (i_status < 0) call meldung(ERR_FATAL,MSG_E02_006(fname_thdat)) ! EndOfFile"

Precompilde Sourceline pgf90 [...] -F source.F90:
" if (i_status < 0) call meldung(1, 'einles_th',"E02_006","Unerwartetes Erreichen des Dateiendes beim Lesen der Datei '"//trim(fname_thdat)//"' des thermischen Erzeugungssystems. Moeglicherweise ist ein Datenkapitel nicht mit '*' abgeschlossen.") ! EndOfFile"

lutz
Back to top
View user's profile
mleair



Joined: 19 Jul 2004
Posts: 67
Location: Portland Group

PostPosted: Thu Sep 09, 2004 11:38 am    Post subject: RE: macro problems Reply with quote

Hi,

I was able to compile your example fine if I used -Mfree or used a .f90 file extension to indicate F90 (freeform) convention. What error message are you getting? Are you compiling with -Mpreprocess ?

-Mark
Back to top
View user's profile
mc3



Joined: 07 Sep 2004
Posts: 4

PostPosted: Tue Sep 21, 2004 2:01 am    Post subject: Re: RE: macro problems Reply with quote

mleair wrote:
Hi,

I was able to compile your example fine if I used -Mfree or used a .f90 file extension to indicate F90 (freeform) convention. What error message are you getting? Are you compiling with -Mpreprocess ?

-Mark

Hi,
sorry i forgot the leading whitespaces in the excample!
If the sourceline has more than 264 signs the error-message appears.
I solved the problem:
1. using smaller macros and
2. using the fpp-Precompiler (that breaks the lines at sign 132 with "&")
fpp -D"PGI" source.F90 > source.pr.F90
pgf90 -C -c -Mextend -o source.pr.o source.pr.F90

lutz
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling 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