Opened 9 years ago

Closed 9 years ago

#50375 closed defect (invalid)

problem in running a program using pgplot in batch

Reported by: masciadri@… Owned by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: Cc:
Port: pgplot

Description (last modified by mf2k (Frank Schima))

Good morning,

I write to you because I have a problem with the pgplot and El Capitan. New mac with El Capitan. I installed pgpot with macports. I have a program that produce a figure in *.ps. Pgplot permits different outputs (Xwin, ps, etc....) The syntaxe to ask for an output *ps is:

name_of_file.ps/ps

I run a program test I did that uses pgplot in interactive way and it works. It creates correctly the name_of_file.ps.

If I put all this in a macro (in bash) and I run in batch the program I obtain an error:

###########
Graphics device/type (? to see list, default /xServe):  %PGPLOT, Error reading device specification
%PGPLOT, PGSCH: no graphics device has been selected
############

I add that this same program works correctly in bash on my previous mac (10.6.8). I also tried to write a wrong format of the output (ex: name_of_file.ps/pp) but the system does not detect the error in my new mac (as it happens in my previous mac:

#############
Graphics device/type (? to see list, default /xwin):  %PGPLOT, Invalid devide specification
T, Unrecognized device type
Graphics device/type (? to see list, default /xwin):  %PGPLOT, Error reading device specification
%PGPLOT, PGSCH: no graphics device has been selected
#############

In my new mac I obtain always the same message:

###########
Graphics device/type (? to see list, default /xServe):  %PGPLOT, Error reading device specification
%PGPLOT, PGSCH: no graphics device has been selected
############

A difference between my previous mac and the new one is that now there is /xServe and before /xwin. I do not think that this is the problem. I tested a different mac with El Capitan (just to be sure that the problem might came from something related to my new mac) and we obtained the same problem. The version of macports is the most recent (I downloaded from the web). I had updated the ports before to install pgplot.

I verified the environmental variable PGPLOT_DIR and PGPLOT_DEV and this is ok.

I think this is a bug. The problem is pretty serious because I can not run my programs in interactive way (I have many of them)

I put in annex the files reporting the example of program plus the macro necessary to run the program (mac90mac_base). This file has to be placed in the PATH (for example in the $HOME/bin).

./test.exe

Waiting for your answer Best Regards

Attachments (1)

macports_pgplot.tar.gz (68.1 KB) - added by masciadri@… 9 years ago.

Download all attachments as: .zip

Change History (4)

Changed 9 years ago by masciadri@…

Attachment: macports_pgplot.tar.gz added

comment:1 Changed 9 years ago by mf2k (Frank Schima)

Keywords: pgplot bash removed
Owner: changed from macports-tickets@… to mcalhoun@…

In the future, please use WikiFormatting and Cc the port maintainers (port info --maintainers pgplot), if any.

comment:2 Changed 9 years ago by mf2k (Frank Schima)

Description: modified (diff)
Summary: proble in running a program using pgplot in batchproblem in running a program using pgplot in batch

comment:3 Changed 9 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Resolution: invalid
Status: newclosed

I do not believe this is a bug in pgplot.

If you want to run your program automatically, replace

CALL PGBEGIN(0,'?',2,2)

with

CALL PGBEGIN(0,'name_of_file.ps/ps',2,2)

If you want to run your program interactively, replace

./test<<EOF                                                                                                                                                                                                 
'EDT_${DAY}_${MONTH}_${YEAR}_${HOUR}UTC.tsv'                                                                                                                                                                
'${DATE}'                                                                                                                                                                                                   
test${DATE}.ps/cps                                                                                                                                                                                          
EOF

with

./test
Note: See TracTickets for help on using tickets.