- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm on a fc3 box. I have a compile issue with ifort 9.0.0211.
While I compiled a fortran code using ifort 9.0.021 with options -O3 -Vaxlib -save -zero -u -72 -w95 -w90 -cm -assume byterecl -static -xT, I got following error messages
But the same code can be compiled with gfortran 4.2.2 using options -O3 -Wuninitialized -fno-f2c -ffast-math -fno-automatic -fno-backslash without any problem.
Could anyone can tell me how to specify the compile options for ifort for this code?
Here are the part of codes reported syntax error by ifort
Thanks
Jerry
While I compiled a fortran code using ifort 9.0.021 with options -O3 -Vaxlib -save -zero -u -72 -w95 -w90 -cm -assume byterecl -static -xT, I got following error messages
fortcom: Error: mag.f, line 563: Syntax error, found '-' when expecting one of: / * ,
3 -184., 328., -210., 264., 53., 5., -33., -86., 1900
-----------------^
fortcom: Error: mag.f, line 564: Syntax error, found '-' when expecting one of: / * ,
4 -124., -16., 3., 63., 61., -9., -11., 83., 1900
-----------------^
fortcom: Error: mag.f, line 565: Syntax error, found '-' when expecting one of: / * ,
5 -217., 2., -58., -35., 59., 36., -90., -69., 1900
-----------------^
fortcom: Error: mag.f, line 567: Syntax error, found '-' when expecting one of: / * ,
7 -1., -21., 28., 18., -12., 6., -22., 11., 1900
-------------------^
fortcom: Error: mag.f, line 571: Syntax error, found '-' when expecting one of: / * ,
b -3., 1., -2., -2., 8., 2., 10., -1., 1900
-------------------^
fortcom: Error: mag.f, line 572: Syntax error, found '-' when expecting one of: / * ,
c -2., -1., 2., -3., -4., 2., 2., 1., 1900
-------------------^
fortcom: Error: mag.f, line 573: Syntax error, found '-' when expecting one of: / * ,
d -5., 2., -2., 6., 6., -4., 4., 0., 1900
-------------------^
fortcom: Error: mag.f, line 574: Syntax error, found INTEGER_CONSTANT '1900' when expecting one of: ( , ; ...
e 0., -2., 2., 4., 2., 0., 0., -6./ 1900
-------------------------------------------------------------------------^
But the same code can be compiled with gfortran 4.2.2 using options -O3 -Wuninitialized -fno-f2c -ffast-math -fno-automatic -fno-backslash without any problem.
Could anyone can tell me how to specify the compile options for ifort for this code?
Here are the part of codes reported syntax error by ifort
data g0/ -31543.,-2298., 5922., -677., 2905.,-1061., 924., 1121., 1900
1 1022.,-1469., -330., 1256., 3., 572., 523., 876., 1900
2 628., 195., 660., -69., -361., -210., 134., -75., 1900
3 -184., 328., -210., 264., 53., 5., -33., -86., 1900
4 -124., -16., 3., 63., 61., -9., -11., 83., 1900
5 -217., 2., -58., -35., 59., 36., -90., -69., 1900
6 70., -55., -45., 0., -13., 34., -10., -41., 1900
7 -1., -21., 28., 18., -12., 6., -22., 11., 1900
8 8., 8., -4., -14., -9., 7., 1., -13., 1900
9 2., 5., -9., 16., 5., -5., 8., -18., 1900
a 8., 10., -20., 1., 14., -11., 5., 12., 1900
b -3., 1., -2., -2., 8., 2., 10., -1., 1900
c -2., -1., 2., -3., -4., 2., 2., 1., 1900
d -5., 2., -2., 6., 6., -4., 4., 0., 1900
e 0., -2., 2., 4., 2., 0., 0., -6./ 1900
Thanks
Jerry
Link Copied
9 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Rather than paste the code into the reply, I'd like to see the actual source as an attachment. If I paste the text into a file, it works fine. I wonder if you have any tab characters in the source.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jerry,
To add an attachment:
Start a reply. Above the "Message" box is a series of tabs. Use the "Options" tab and you'll see the "File Attachment" option.
I would assume the "1900" at the end of each line is actually out in column 73, yes?
I can try this on an old 9.0 compiler. But keep in mind that 9.0 is no longer supported, only 9.1 and 10.1 are supported at this time.
ron
To add an attachment:
Start a reply. Above the "Message" box is a series of tabs. Use the "Options" tab and you'll see the "File Attachment" option.
I would assume the "1900" at the end of each line is actually out in column 73, yes?
I can try this on an old 9.0 compiler. But keep in mind that 9.0 is no longer supported, only 9.1 and 10.1 are supported at this time.
ron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When I copy the code from the post and paste it into a text file, the "1900" is indeed in column 72. I am a bit curious about the rather different set of options used, especially -72 which is the default for fixed-form source.
As Ron notes, version 9.0 is quite old. Perhaps you should also try it with gfortran from three years ago?![Smiley with tongue out [:-P]](/isn/Community/en-US/emoticons/emotion-4.gif)
As Ron notes, version 9.0 is quite old. Perhaps you should also try it with gfortran from three years ago?
![Smiley with tongue out [:-P]](/isn/Community/en-US/emoticons/emotion-4.gif)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for reply.
I attached the mag.f.
The"1900" at the end of each line is actually out in column 73.
I tried to install Intel Compiler 10.0 on FC3, but it complained that FC3 is not supported, and I aborted the intallation.
I also tried to compilemag.f using gcc 2.95.3 g77, it also passed.
It can be compiled with gnu compiler, but I still want to compile it with Intel Compiler to get performance incressing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The file you attached compiles fine for me with 10.1.021. When I get in on Monday I'll try to dig up a 9.0 compiler and see what I find.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried a 9.0 compiler but it had no errors either.
I am somewhat confused by the command line you specified. You have -72, which is the default. You have -xT, which is not supported by 9.0. You also have -u which should result in many more diagnostics, including "source line truncated" and undeclared variables. This leads me to wonder if you're correctly describing what you're doing.
Please attach a log of a command session in which you "cat" the file (so that we can see the contents) and then invoke ifort with the switches you show, so we can see the compiler output. Something doesn't compute...
I am somewhat confused by the command line you specified. You have -72, which is the default. You have -xT, which is not supported by 9.0. You also have -u which should result in many more diagnostics, including "source line truncated" and undeclared variables. This leads me to wonder if you're correctly describing what you're doing.
Please attach a log of a command session in which you "cat" the file (so that we can see the contents) and then invoke ifort with the switches you show, so we can see the compiler output. Something doesn't compute...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I know what you did. The command line you show in the first post is not what was actually used. You used -80 or -132 or -extend-source. If you did, then exactly those errors would show.
Another case of "Doctor, it hurts when I do this! Then don't do that!"
This source requires that you use the default source line length of 72 and that you don't enable "truncated source" warnings.
Another case of "Doctor, it hurts when I do this! Then don't do that!"
This source requires that you use the default source line length of 72 and that you don't enable "truncated source" warnings.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for all kinds help
I attached the output of make.
I'm compiling a suit of programs for analyzing GPS measurements on a FC3 box. It is said that it will incressing 20% performance if compiled by Intel Compiler. All the options are the defaults except -xT, the original is -Xt. I only found the usage of -xT, so I changed the option -Xt to -xT. The output of make used all the defaults options without any modification.
Best Regards
I attached the output of make.
I'm compiling a suit of programs for analyzing GPS measurements on a FC3 box. It is said that it will incressing 20% performance if compiled by Intel Compiler. All the options are the defaults except -xT, the original is -Xt. I only found the usage of -xT, so I changed the option -Xt to -xT. The output of make used all the defaults options without any modification.
Best Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I can't reproduce the results you saw. The command line looks correct (other than the -Xt which is meaningless and got a warning).
The last thing I'd ask is for you to attach a gzip of the source file itself. If that doesn't give me a clue, I'd have to say "it works in 10.1". The 9.0 compiler I had easy access to was Windows, but I would not expect the Linux compiler to behave differently. I did try the source with 10.1 on Linux and it compiled without the line length errors.
The last thing I'd ask is for you to attach a gzip of the source file itself. If that doesn't give me a clue, I'd have to say "it works in 10.1". The 9.0 compiler I had easy access to was Windows, but I would not expect the Linux compiler to behave differently. I did try the source with 10.1 on Linux and it compiled without the line length errors.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page