LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-25-2008, 01:41 AM   #16
lengyue
Member
 
Registered: Aug 2008
Posts: 31

Original Poster
Rep: Reputation: 15

Hi, Makyo,
I have test you codes, the result is same as you.
[root@localhost pgplot]# echo " Results from no makefile:"
Results from no makefile:
[root@localhost pgplot]# make -f null FC=g77 FFLAGS:='-fno-backslash -ffree-form' one
g77 -fno-backslash -ffree-form one.f -o one
[root@localhost pgplot]#
[root@localhost pgplot]# ./one
abc\nde
abc\ude

Results from using Makefile:

[root@localhost pgplot]# g77 -ffree-form -fno-backslash one.f -o one
[root@localhost pgplot]# ./one
abc\nde
abc\ude

By the way,have you used the PGPLOT before?
Now, I want to run the codes of the demos, for example, run pgdemo1.f, but there are some errors appears, I think te error is about the choice of FFLAGD of g77 in the makefile of PGPLOT.
The original is "FFLAGD=-fno-backslash", and I modified it into "FFLAGD=-fno-backslash -ffree-form", the same error also appears,
I also use the command "g77 -fno-backslash -ffree-form pgdemo1.f -o pgdemo1 /usr/lib/libpng12.so.0.1.2.7 -L/usr/X11R6/lib -lX11 -L/usr/local/pgplot -lpgplot", it also doesn't work.
Can you give me some suggestion about that, thanks.
The details of error as follow:
[jing@localhost pgplot]$ g77 pgdemo1.f -o pgdemo1 /usr/lib/libpng12.so.0.1.2.7 - L/usr/X11R6/lib -lX11 -L/usr/local/pgplot -lpgplot
pgdemo1.f: In subroutine `pgex1':
pgdemo1.f:102:
CALL PGLAB('(x)', '(y)', 'PGPLOT Example 1: y = x\u2')
^
Unknown escape sequence `\u' at (^)
pgdemo1.f: In subroutine `pgex5':
pgdemo1.f:289:
CALL PGLAB('Frequency, \gn (GHz)',
^
Unknown escape sequence `\g' at (^)
pgdemo1.f:290:
1 'Flux Density, S\d\gn\u (Jy)',
^
Unknown escape sequence `\d' at (^)
pgdemo1.f:290:
1 'Flux Density, S\d\gn\u (Jy)',
^
Unknown escape sequence `\g' at (^)
pgdemo1.f:290:
1 'Flux Density, S\d\gn\u (Jy)',
FFLAGS ^
Unknown escape sequence `\u' at (^)
pgdemo1.f: In subroutine `pgex10':
pgdemo1.f:644:
CALL PGPTXT(8.-ffree-form0, 0.7, 0.0, 0.0, ' \fiy = J\d0\u(x)')
^
Unknown escape sequence `\d' at (^)
pgdemo1.f:644:
CALL PGPTXT(8.0, 0.7, 0.0, 0.0, ' \fiy = J\d0\u(x)')
^
Unknown escape sequence `\u' at (^)
pgdemo1.f:645:
CALL PGPTXT(12.0, 0.5, 0.0, 0.0, ' \fiy = J\d1\u(x)')
^
Unknown escape sequence `\d' at (^)
pgdemo1.f:645:
CALL PGPTXT(12.0, 0.5, 0.0, 0.0, ' \fiy = J\d1\u(x)')
^
Unknown escape sequence `\u' at (^)
 
Old 10-25-2008, 06:03 AM   #17
makyo
Member
 
Registered: Aug 2006
Location: Saint Paul, MN, USA
Distribution: {Free,Open}BSD, CentOS, Debian, Fedora, Solaris, SuSE
Posts: 735

Rep: Reputation: 76
Hi.

It is difficult to read your posts where you include code and results. Please use the forum formatting facilities for doing that -- the [ CODE ] - [ /CODE ] markers. You can easily do that by selecting the text with your mouse, then clicking the "#" symbol just above the editing window. The result of surrounding the string "Hello world." with those markers would then look like this:
Code:
Hello, world.
To answer your question, I don't recall using PGPLOT.

I used "-free-form" because I didn't use the standard columns in the small test program. It's likely that the pgplot source is written in standard format, so specifying -free-form is probably not a solution for the problem.

I used the command:
Code:
make -p | grep -i fflag
to see if the builtin rules for make had an FFLAGD, and, on Debian, I could not find anything for FFLAGD, only for FFLAGF and F77FLAGS, so FFLAGD must be something in the makefile for pgplot. It may be difficult, but you may need to go through the makefile to find that if that is causing the problem. The other possibility is that it may work if you use FFLAGF, not FFLAGD.

Best wishes ... cheers, makyo
 
Old 10-30-2008, 01:28 AM   #18
lengyue
Member
 
Registered: Aug 2008
Posts: 31

Original Poster
Rep: Reputation: 15
Code:
Hi, Makyo,
I have test you codes, the result is same as you.
[root@localhost pgplot]# echo " Results from no makefile:"
Results from no makefile:
[root@localhost pgplot]# make -f null FC=g77 FFLAGS:='-fno-backslash -ffree-form' one
g77 -fno-backslash -ffree-form one.f -o one
[root@localhost pgplot]#
[root@localhost pgplot]# ./one
abc\nde
abc\ude

Results from using Makefile:

[root@localhost pgplot]# g77 -ffree-form -fno-backslash one.f -o one
[root@localhost pgplot]# ./one
abc\nde
abc\ude

By the way,have you used the PGPLOT before?
Now, I want to run the codes of the demos, for example, run pgdemo1.f, but there are some errors appears, I think te error is about the choice of FFLAGD of g77 in the makefile of PGPLOT.
The original is "FFLAGD=-fno-backslash", and I modified it into "FFLAGD=-fno-backslash -ffree-form", the same error also appears,
I also use the command "g77 -fno-backslash -ffree-form pgdemo1.f -o pgdemo1 /usr/lib/libpng12.so.0.1.2.7 -L/usr/X11R6/lib -lX11 -L/usr/local/pgplot -lpgplot", it also doesn't work.
Can you give me some suggestion about that, thanks.
The details of error as follow:
[jing@localhost pgplot]$ g77 pgdemo1.f -o pgdemo1 /usr/lib/libpng12.so.0.1.2.7 - L/usr/X11R6/lib -lX11 -L/usr/local/pgplot -lpgplot
pgdemo1.f: In subroutine `pgex1':
pgdemo1.f:102:
CALL PGLAB('(x)', '(y)', 'PGPLOT Example 1: y = x\u2')
^
Unknown escape sequence `\u' at (^)
pgdemo1.f: In subroutine `pgex5':
pgdemo1.f:289:
CALL PGLAB('Frequency, \gn (GHz)',
^
Unknown escape sequence `\g' at (^)
pgdemo1.f:290:
1 'Flux Density, S\d\gn\u (Jy)',
^
Unknown escape sequence `\d' at (^)
pgdemo1.f:290:
1 'Flux Density, S\d\gn\u (Jy)',
^
Unknown escape sequence `\g' at (^)
pgdemo1.f:290:
1 'Flux Density, S\d\gn\u (Jy)',
FFLAGS ^
Unknown escape sequence `\u' at (^)
pgdemo1.f: In subroutine `pgex10':
pgdemo1.f:644:
CALL PGPTXT(8.-ffree-form0, 0.7, 0.0, 0.0, ' \fiy = J\d0\u(x)')
^
Unknown escape sequence `\d' at (^)
pgdemo1.f:644:
CALL PGPTXT(8.0, 0.7, 0.0, 0.0, ' \fiy = J\d0\u(x)')
^
Unknown escape sequence `\u' at (^)
pgdemo1.f:645:
CALL PGPTXT(12.0, 0.5, 0.0, 0.0, ' \fiy = J\d1\u(x)')
^
Unknown escape sequence `\d' at (^)
pgdemo1.f:645:
CALL PGPTXT(12.0, 0.5, 0.0, 0.0, ' \fiy = J\d1\u(x)')
^
Unknown escape sequence `\u' at (^)
 
Old 10-30-2008, 01:44 AM   #19
lengyue
Member
 
Registered: Aug 2008
Posts: 31

Original Poster
Rep: Reputation: 15
Hi, Makyo,
I have submit my question again as you said, but it looks same as the former.
You're right,the pgplot source code is written in standard format, the "FFLAGD" is in the makefile of pgplot,
The details as follow:
# Fortran compiler and compilation flags
#
FCOMPL=g77
FFLAGC=-u -Wall -fPIC -O
FFLAGD=-fno-backslash
#

I think "\" can not be used in my code because of "FFLAGD=-fno-backslash",but it is really strange when I delete it, the "\" also can not be used.

Thanks!

Yueling
 
Old 10-31-2008, 01:11 AM   #20
telemeister
Member
 
Registered: Dec 2007
Location: Brisbane Australia
Distribution: Slackware
Posts: 63

Rep: Reputation: 16
Hi again Yueling..

Just clarifying - where you say the following command doesnt work:

Code:
g77 -fno-backslash -ffree-form pgdemo1.f -o pgdemo1 /usr/lib/libpng12.so.0.1.2.7 -L/usr/X11R6/lib -lX11 -L/usr/local/pgplot -lpgplot

Can you please try just the compilation (without linking) as follows:
Code:
g77 -c -fno-backslash pgdemo1.f
I just downloaded the pgplot examples and this should compile without errors

if you leave out the -fno-backslash you should get all the
Unknown escape sequence errors that you are seeing.

Can you confirm whether you see the same behaviour on your machine.

Steve
 
Old 11-01-2008, 06:09 PM   #21
lengyue
Member
 
Registered: Aug 2008
Posts: 31

Original Poster
Rep: Reputation: 15
Hi,Steve,

I have try that,the pgdemo1.f can be compiled without errors. but I have question how to run the pgdemo1.f after complied.
Before, when I use this code:
Code:
g77 -fno-backslash -ffree-form pgdemo1.f -o pgdemo1 /usr/lib/libpng12.so.0.1.2.7 -L/usr/X11R6/lib -lX11 -L/usr/local/pgplot -lpgplot
an execute file (pgdemo1) will be generated, and I can run the execute file directly.
this time after this code:
Code:
g77 -c -fno-backslash pgdemo1.f
there will be a pgdemo1.o,I don't know how to run this file,
when I run it like this :
Code:
[root@localhost examples]# ./pgdemo1.o
Code:
bash: ./pgdemo1.o: Permission denied
Actually, I have input this command as a supper user,can you give me some advice? Thanks!

Good weekend!

Yueling
 
Old 11-02-2008, 06:10 PM   #22
telemeister
Member
 
Registered: Dec 2007
Location: Brisbane Australia
Distribution: Slackware
Posts: 63

Rep: Reputation: 16
Hello Yueling

No - the .o file is not supposed to run. It hasn't yet been linked. I was just trying to clarify whether your error is a compile error or a link error.


1. I understand the following command compiles without 'unknown escape sequence' error

g77 -c -fno-backslash pgdemo1.f

Is that right?

2. However The following gives an error:

g77 -fno-backslash -ffree-form pgdemo1.f -o pgdemo1 /usr/lib/libpng12.so.0.1.2.7 -L/usr/X11R6/lib -lX11 -L/usr/local/pgplot -lpgplot

What error do you get with this command?
 
Old 11-03-2008, 01:19 AM   #23
lengyue
Member
 
Registered: Aug 2008
Posts: 31

Original Poster
Rep: Reputation: 15
Hi,Steve,
When I use the command:
g77 -fno-backslash -ffree-form pgdemo1.f -o pgdemo1 /usr/lib/libpng12.so.0.1.2.7 -L/usr/X11R6/lib -lX11 -L/usr/local/pgplot -lpgplot

there are too many errors to show,many statement name can not be recognized, a part of errors as follow:

Code:
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f: In function `pgbsj0':
pgdemo1.f:912:
   C-----------------------------------------------------------------------
   12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:913:
   C Bessel function of order 0 (approximate).
   1 2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:914:
   C Reference: Abramowitz and Stegun: Handbook of Mathematical Functions.
   1 2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:915:
   C-----------------------------------------------------------------------
   12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:917:
   C
   1     2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:922:
            PGBSJ0 = 1.0 + T*(-2.2499997 +
                                         12
Missing operand for operator at (1) at end of expression at (2)
pgdemo1.f:922:
            PGBSJ0 = 1.0 + T*(-2.2499997 +
                             1            2
Missing close parenthese at (2) needed to match open parenthese at (1)
pgdemo1.f:923:
        1                  T*( 1.2656208 +
                           12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:924:
        2                  T*(-0.3163866 +
                           12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:925:
        3                  T*( 0.0444479 +
                           12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:926:
        4                  T*(-0.0039444 +
                           12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:927:
        5                  T*( 0.0002100))))))
                           12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:930:
            F0 =     0.79788456 +
                                12
Missing operand for operator at (1) at end of expression at (2)
pgdemo1.f:931:
        1        T*(-0.00000077 +
                 12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:923:
        1                  T*( 1.2656208 +
        1
pgdemo1.f:931: (continued):
        1        T*(-0.00000077 +
        2
Label 1 already defined at (1) when redefined at (2)
pgdemo1.f:932:
        2        T*(-0.00552740 +
                 12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:924:
        2                  T*(-0.3163866 +
        1
pgdemo1.f:932: (continued):
        2        T*(-0.00552740 +
        2
Label 2 already defined at (1) when redefined at (2)
pgdemo1.f:933:
        3        T*(-0.00009512 +
                 12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:925:
        3                  T*( 0.0444479 +
        1
pgdemo1.f:933: (continued):
        3        T*(-0.00009512 +
        2
Label 3 already defined at (1) when redefined at (2)
pgdemo1.f:934:
        4        T*( 0.00137237 +
                 12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:926:
        4                  T*(-0.0039444 +
        1
pgdemo1.f:934: (continued):
        4        T*( 0.00137237 +
        2
Label 4 already defined at (1) when redefined at (2)
pgdemo1.f:935:
        5        T*(-0.00072805 +
                 12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:927:
        5                  T*( 0.0002100))))))
        1
pgdemo1.f:935: (continued):
        5        T*(-0.00072805 +
        2
Label 5 already defined at (1) when redefined at (2)
pgdemo1.f:936:
        6        T*( 0.00014476))))))
                 12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:937:
            THETA0 = X - 0.78539816 +
                                    12
Missing operand for operator at (1) at end of expression at (2)
pgdemo1.f:938:
        1            T*(-0.04166397 +
                     12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:923:
        1                  T*( 1.2656208 +
        1
pgdemo1.f:938: (continued):
        1            T*(-0.04166397 +
        2
Label 1 already defined at (1) when redefined at (2)
pgdemo1.f:939:
        2            T*(-0.00003954 +
                     12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:924:
        2                  T*(-0.3163866 +
        1
pgdemo1.f:939: (continued):
        2            T*(-0.00003954 +
        2
Label 2 already defined at (1) when redefined at (2)
pgdemo1.f:940:
        3            T*( 0.00262573 +
                     12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:925:
        3                  T*( 0.0444479 +
        1
pgdemo1.f:940: (continued):
        3            T*( 0.00262573 +
        2
Label 3 already defined at (1) when redefined at (2)
pgdemo1.f:941:
        4            T*(-0.00054125 +
                     12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:926:
        4                  T*(-0.0039444 +
        1
pgdemo1.f:941: (continued):
        4            T*(-0.00054125 +
        2
Label 4 already defined at (1) when redefined at (2)
pgdemo1.f:942:
        5            T*(-0.00029333 +
                     12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:927:
        5                  T*( 0.0002100))))))
        1
pgdemo1.f:942: (continued):
        5            T*(-0.00029333 +
        2
Label 5 already defined at (1) when redefined at (2)
pgdemo1.f:943:
        6            T*( 0.00013558))))))
                     12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:936:
        6        T*( 0.00014476))))))
        1
pgdemo1.f:943: (continued):
        6            T*( 0.00013558))))))
        2
Label 6 already defined at (1) when redefined at (2)
pgdemo1.f:946:
   C-----------------------------------------------------------------------
   12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f: In function `pgbsj1':
pgdemo1.f:951:
   C-----------------------------------------------------------------------
   12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:952:
   C Bessel function of order 1 (approximate).
   1 2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:953:
   C Reference: Abramowitz and Stegun: Handbook of Mathematical Functions.
   1 2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:954:
   C-----------------------------------------------------------------------
   12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:956:
   C
   12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:961:
            PGBSJ1 = 0.5 + T*(-0.56249985 +
                                          12
Missing operand for operator at (1) at end of expression at (2)
pgdemo1.f:961:
            PGBSJ1 = 0.5 + T*(-0.56249985 +
                             1             2
Missing close parenthese at (2) needed to match open parenthese at (1)
pgdemo1.f:962:
        1                  T*( 0.21093573 +
                           12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:963:
        2                  T*(-0.03954289 +
                           12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:964:
        3                  T*( 0.00443319 +
                           12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:965:
        4                  T*(-0.00031761 +
                           12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:966:
        5                  T*( 0.00001109))))))
                           12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:970:
            F1 =    0.79788456 +
                               12
Missing operand for operator at (1) at end of expression at (2)
pgdemo1.f:971:
        1       T*( 0.00000156 +
                12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:962:
        1                  T*( 0.21093573 +
        1
pgdemo1.f:971: (continued):
        1       T*( 0.00000156 +
        2
Label 1 already defined at (1) when redefined at (2)
pgdemo1.f:972:
        2       T*( 0.01659667 +
                12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:963:
        2                  T*(-0.03954289 +
        1
pgdemo1.f:972: (continued):
        2       T*( 0.01659667 +
        2
Label 2 already defined at (1) when redefined at (2)
pgdemo1.f:973:
        3       T*( 0.00017105 +
                12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:964:
        3                  T*( 0.00443319 +
        1
pgdemo1.f:973: (continued):
        3       T*( 0.00017105 +
        2
Label 3 already defined at (1) when redefined at (2)
pgdemo1.f:974:
        4       T*(-0.00249511 +
                12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:965:
        4                  T*(-0.00031761 +
        1
pgdemo1.f:974: (continued):
        4       T*(-0.00249511 +
        2
Label 4 already defined at (1) when redefined at (2)
pgdemo1.f:975:
        5       T*( 0.00113653 +
                12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:966:
        5                  T*( 0.00001109))))))
        1
pgdemo1.f:975: (continued):
        5       T*( 0.00113653 +
        2
Label 5 already defined at (1) when redefined at (2)
pgdemo1.f:976:
        6       T*(-0.00020033))))))
                12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:977:
            THETA1 = X   -2.35619449 +
                                     1 2
Missing operand for operator at (1) at end of expression at (2)
pgdemo1.f:978:
        1             T*( 0.12499612 +
                      12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:962:
        1                  T*( 0.21093573 +
        1
pgdemo1.f:978: (continued):
        1             T*( 0.12499612 +
        2
Label 1 already defined at (1) when redefined at (2)
pgdemo1.f:979:
        2             T*( 0.00005650 +
                      12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:963:
        2                  T*(-0.03954289 +
        1
pgdemo1.f:979: (continued):
        2             T*( 0.00005650 +
        2
Label 2 already defined at (1) when redefined at (2)
pgdemo1.f:980:
        3             T*(-0.00637879 +
                      12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:964:
        3                  T*( 0.00443319 +
        1
pgdemo1.f:980: (continued):
        3             T*(-0.00637879 +
        2
Label 3 already defined at (1) when redefined at (2)
pgdemo1.f:981:
        4             T*( 0.00074348 +
                      12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:965:
        4                  T*(-0.00031761 +
        1
pgdemo1.f:981: (continued):
        4             T*( 0.00074348 +
        2
Label 4 already defined at (1) when redefined at (2)
pgdemo1.f:982:
        5             T*( 0.00079824 +
                      12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:966:
        5                  T*( 0.00001109))))))
        1
pgdemo1.f:982: (continued):
        5             T*( 0.00079824 +
        2
Label 5 already defined at (1) when redefined at (2)
pgdemo1.f:983:
        6             T*(-0.00029166))))))
                      12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:976:
        6       T*(-0.00020033))))))
        1
pgdemo1.f:983: (continued):
        6             T*(-0.00029166))))))
        2
Label 6 already defined at (1) when redefined at (2)
pgdemo1.f:987:
   C-----------------------------------------------------------------------
   12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f: In function `pgrnrm':
pgdemo1.f:992:
   C-----------------------------------------------------------------------
   12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:993:
   C Returns a normally distributed deviate with zero mean and unit
   1 2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:994:
   C variance. The routine uses the Box-Muller transformation of uniform
   1 2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:995:
   C deviates. For a more efficient implementation of this algorithm,
   1 2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:996:
   C see Press et al., Numerical Recipes, Sec. 7.2.
   1 2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:997:
   C
   12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:998:
   C Arguments:
   1 2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:999:
   C  ISEED  (in/out) : seed used for PGRAND random-number generator.
   1  2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:1000:
   C
   12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:1001:
   C Subroutines required:
   1 2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:1002:
   C  PGRAND -- return a uniform random deviate between 0 and 1.
   1  2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:1003:
   C
   12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:1004:
   C History:
   1 2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:1005:
   C  1995 Dec 12 - TJP.
   1  2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:1006:
   C-----------------------------------------------------------------------
   12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:1008:
   C
   12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:1014:
   C-----------------------------------------------------------------------
   12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f: In function `pgrand':
pgdemo1.f:1019:
   C-----------------------------------------------------------------------
   12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:1020:
   C Returns a uniform random deviate between 0.0 and 1.0.
   1 2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:1021:
   C
   12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:1022:
   C NOTE: this is not a good random-number generator; it is only
   1 2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:1022:
   C NOTE: this is not a good random-number generator; it is only
                                                       1  2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:1023:
   C intended for exercising the PGPLOT routines.
   1 2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:1024:
   C
   12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:1025:
   C Based on: Park and Miller's "Minimal Standard" random number
   1 2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:1026:
   C   generator (Comm. ACM, 31, 1192, 1988)
   1   2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:1027:
   C
   12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:1028:
   C Arguments:
   1 2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:1029:
   C  ISEED  (in/out) : seed.
   1  2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:1030:
   C-----------------------------------------------------------------------
   12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:1037:
   C-
   12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
But when use the command:
g77 pgdemo1.f -o pgdemo1 /usr/lib/libpng12.so.0.1.2.7 -L/usr/X11R6/lib -lX11 -L/usr/local/pgplot -lpgplot
there are just some error about "\".
Code:
[jing@localhost pgplot]$ g77 pgdemo1.f -o pgdemo1 /usr/lib/libpng12.so.0.1.2.7 -L/usr/X11R6/lib -lX11 -L/usr/local/pgplot -lpgplot
pgdemo1.f: In subroutine `pgex1':
pgdemo1.f:102:
         CALL PGLAB('(x)', '(y)', 'PGPLOT Example 1:  y = x\u2')
                                                           ^
Unknown escape sequence `\u' at (^)
pgdemo1.f: In subroutine `pgex5':
pgdemo1.f:289:
         CALL PGLAB('Frequency, \gn (GHz)',
                                ^
Unknown escape sequence `\g' at (^)
pgdemo1.f:290:
        1             'Flux Density, S\d\gn\u (Jy)',
                                      ^
Unknown escape sequence `\d' at (^)
pgdemo1.f:290:
        1             'Flux Density, S\d\gn\u (Jy)',
                                        ^
Unknown escape sequence `\g' at (^)
pgdemo1.f:290:
        1             'Flux Density, S\d\gn\u (Jy)',
                                           ^
Unknown escape sequence `\u' at (^)
pgdemo1.f: In subroutine `pgex10':
pgdemo1.f:644:
         CALL PGPTXT(8.0, 0.7, 0.0, 0.0, ' \fiy = J\d0\u(x)')
                                                   ^
Unknown escape sequence `\d' at (^)
pgdemo1.f:644:
         CALL PGPTXT(8.0, 0.7, 0.0, 0.0, ' \fiy = J\d0\u(x)')
                                                      ^
Unknown escape sequence `\u' at (^)
pgdemo1.f:645:
         CALL PGPTXT(12.0, 0.5, 0.0, 0.0, ' \fiy = J\d1\u(x)')
                                                    ^
Unknown escape sequence `\d' at (^)
pgdemo1.f:645:
         CALL PGPTXT(12.0, 0.5, 0.0, 0.0, ' \fiy = J\d1\u(x)')
                                                       ^
Unknown escape sequence `\u' at (^)
Maybe I need I modify the section about g77 in the makefile of the Pgplot, before I just delete or comment "FFLAGD=-fno-backslash". the same error still appears.
Code:
# Fortran compiler and compilation flags
#
FCOMPL=g77
FFLAGC=-u -Wall -fPIC -O
FFLAGD=-fno-backslash
#
P.S. use of \u and \d for raising exponent in the PGPLOT function.
Thanks

Yueling
 
Old 11-03-2008, 02:24 AM   #24
telemeister
Member
 
Registered: Dec 2007
Location: Brisbane Australia
Distribution: Slackware
Posts: 63

Rep: Reputation: 16
Hello again yueling

I downloaded pgplot and tried some tests. My suggestions:

1. You definitely DO need to use "-fno-backslash" otherwise you will get the "unknown escape sequence" error.

2. You DO NOT want to use "-ffree-form" . This is causing all the "unrecognised statement" errors.

Can you try the following:

Code:
g77 -fno-backslash pgdemo1.f -o pgdemo1 /usr/lib/libpng12.so.0.1.2.7 -L/usr/X11R6/lib -lX11 -L/usr/local/pgplot -lpgplot
IF this fails can you just try the compile part (-c) as follows, and report back:
Code:
g77 -c -fno-backslash pgdemo1.f

Cheers

Steve
 
Old 11-03-2008, 11:37 PM   #25
lengyue
Member
 
Registered: Aug 2008
Posts: 31

Original Poster
Rep: Reputation: 15
Hi,Steve,

Thank you so much!

I have figured out it, this command does work:
Code:
g77 -fno-backslash pgdemo1.f -o pgdemo1 /usr/lib/libpng12.so.0.1.2.7 -L/usr/X11R6/lib -lX11 -L/usr/local/pgplot -lpgplot
Much appreciate!

Cheers!
Yueling
 
Old 11-04-2008, 12:53 AM   #26
telemeister
Member
 
Registered: Dec 2007
Location: Brisbane Australia
Distribution: Slackware
Posts: 63

Rep: Reputation: 16
Thats great Yueling!

Sorry it took so many iterations to get to a solution! It was only when I downloaded PGPLOT and tried for myself that I could see what was happening.

By the way on my main machine I'm now using gfortran instead of g77. Interestingly it seems that with gfortran the default behaviour is
'-fno-backslash'. That's why I originally couldnt replicate the 'escape sequence' errors.

Anyway happy plotting!

steve
 
Old 12-09-2009, 05:36 AM   #27
Espléndido
LQ Newbie
 
Registered: Dec 2009
Posts: 2

Rep: Reputation: 0
undefined reference to `pgopen_'

Hi everyone,

Im trying to run PGPLOT with my gfortran codes, under UBUNTU 8.10. I have installed the software following this: http://www.linuxquestions.org/questi...pgplot-383433/

Everything seemed to be ok, as the final './pgdemo1' worked fine.

Then I tryed to compile the code lengyue put in this thread. I found no problem with the command: 'gfortran test.f95 /usr/lib/libpng.so -o test -L/usr/X11R6/lib -lX11 -L/usr/lib -lpgplot'

And here is my trouble. When I try to compile the code test.f95 from the folder test_folder I write: gfortran -o TEST test.f95, and the bash answer me:

/tmp/ccY7pvbc.o: In function `MAIN__':
plot.f95.text+0x115): undefined reference to `pgopen_'
plot.f95.text+0x159): undefined reference to `pgenv_'
plot.f95.text+0x18d): undefined reference to `pglab_'
plot.f95.text+0x1ad): undefined reference to `pgline_'
plot.f95.text+0x1cf): undefined reference to `pgpt_'
plot.f95.text+0x1d4): undefined reference to `pgclos_'

Im afraid I maybe didnt quite catch what I suppose to do...

Anybody can help me?

Thanks in advance
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to call system call from usb driver's code Mr.J Linux - Kernel 4 09-29-2008 03:47 AM
Compilation issue when Function is parameter in function call on LINUX sa20358 Linux - Software 2 07-24-2008 10:19 PM
function call in kernel code vishalbutte Programming 1 02-15-2006 01:32 PM
how to call C function in FORTRAN program bigapple Programming 5 08-24-2005 12:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration