#8 Seg faults during gnuplot calls; no Compile errors

open
nobody
None
5
2014-08-13
2008-07-23
Anonymous
No

I am using the INtel Fortran Compiler on a Debian installation. I have installed all the necessary
libraries mentioned in the installation instructions. But I was
getting segmentation faults for the simplest gnuplot calls, and was
wondering if you could help me out with it.

I just tried plotting 2 columns of a simple array as follows:

**********
PROGRAM Plot

USE datatypes
USE gnuplot_module_data
USE gnuplot_module

IMPLICIT NONE

REAL(dp) :: A(5,2)=(/1,2,3,4,5,2,4,6,8,10/)

TYPE(GNUPLOT_CTRL), POINTER :: g_ctrl

INTEGER :: Status
g_ctrl = gnuplot_init('-persist')

Status = gnuplot_plot2d(g_ctrl,5,A(:,1),A(:,2))

Status = gnuplot_close(g_ctrl)

END PROGRAM Plot
*********

I compiled with the following command :

$ ifort "%filename" /opt/intel/fc/10.0.026/lib/libgnuplotfortran.so
/opt/intel/fc/10.0.026/lib/libfortranposix.so

and

$ ./a.out

gave the messages :

gnuplot_init : current display identified as :0 {2}
No checking of -persist as a valid X option will be done ...
Executing gnuplot -persist (16) with option w (1) ...
Opened pipe for GNUPlot-Fortran95 IPC : file descriptor 4
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image PC Routine Line Source
a.out 080AC0FF Unknown Unknown Unknown
a.out 0804DB71 Unknown Unknown Unknown
libc.so.6 B7E11450 Unknown Unknown Unknown
a.out 0804DAD1 Unknown Unknown Unknown

Further, running gdb gave me :

gnuplot_init : current display identified as :0 {2}
No checking of -persist as a valid X option will be done ...
Executing gnuplot -persist (16) with option w (1) ...
Opened pipe for GNUPlot-Fortran95 IPC : file descriptor 7

Program received signal SIGSEGV, Segmentation fault.
0x080ac12f in both.aligned ()
Current language: auto; currently asm

I'd much appreciate any pointers. Thanks.

--
Kumar Ravichandran

Graduate Research Assistant
Department of Aerospace Engineering
University of Maryland
College Park, MD.

Discussion