- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi everyone,
i try to port a small omp code which is working on sun to redhat pc.
i got many funny error message as follows:
>>
C$test.f
Error 14 at (1:test.f) : invalid label field
>>
it seems ifc calls cpp to preprocess the file. but the cpp in my linux machine is gnu gcc-2.96.
anyone knows how to work around this error?
thanks
i try to port a small omp code which is working on sun to redhat pc.
i got many funny error message as follows:
>>
C$test.f
Error 14 at (1:test.f) : invalid label field
>>
it seems ifc calls cpp to preprocess the file. but the cpp in my linux machine is gnu gcc-2.96.
anyone knows how to work around this error?
thanks
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No, ifc doesn't employ cpp, or invoke a gnu pre-processor. It has its own fpp which performs OpenMP translation. If you wish to use gnu pre-processing, you would use a Makefile or maybe a perl script, and the gnu pre-processor is run like
gcc -E -traditional -x c input > output.f
or
g77 -E input.F>output.f
If you set up your own pre-processing step, you must make the output acceptable as OpenMP syntax for ifc.
If you are looking for a pre-processor which works differently from gnu or Intel's, you must install it yourself. I'm not familiar enough with the fpp for which Sun made the source public, to know whether it does anything special with lines such as you quote.
You've posted several messages without saying what you want from these lines. You could try to find patterns for the -D option which will turn it into what you want, either with gnu pre-processing or with ifc's own fpp. Consider that the other pre-processors may also see $ as a special character. Possibly, an option such as -DC$=Cdollar might work.
If you wanted a pre-processor which conforms with Fortran committee standards (apparently you don't) there is Dan Nagle's COCO.
gcc -E -traditional -x c input > output.f
or
g77 -E input.F>output.f
If you set up your own pre-processing step, you must make the output acceptable as OpenMP syntax for ifc.
If you are looking for a pre-processor which works differently from gnu or Intel's, you must install it yourself. I'm not familiar enough with the fpp for which Sun made the source public, to know whether it does anything special with lines such as you quote.
You've posted several messages without saying what you want from these lines. You could try to find patterns for the -D option which will turn it into what you want, either with gnu pre-processing or with ifc's own fpp. Consider that the other pre-processors may also see $ as a special character. Possibly, an option such as -DC$=Cdollar might work.
If you wanted a pre-processor which conforms with Fortran committee standards (apparently you don't) there is Dan Nagle's COCO.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
sorry i did not make my question very clear.
my question is that, when i try to compile a program with "C$" in comment lines with "-openmp -fpp2" options. i got the above error message.
and i tried your "-DC$=Ddollar", but it seems does not work.
my question is that, when i try to compile a program with "C$" in comment lines with "-openmp -fpp2" options. i got the above error message.
and i tried your "-DC$=Ddollar", but it seems does not work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
get it fixed. thanks

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