Building NCAR Graphics* with the Intel® compilers


This guide is intended to help Intel® C++ Compiler and Intel® Fortran Compiler customers build the NCAR Graphics* library. NCAR Graphics is an open source library for drawing maps, graphs, and plots. More information about NCAR Graphics can be found at

Version information

NCAR Graphics 6.1.2
Intel® C++ Compiler for Linux* 2013 SP1 Update 2
Intel® Fortran Compiler for Linux* 2013 SP1 Update 2

Obtaining the Source Code

The source code for NCAR Graphics can be found at:

Obtaining the Latest Version of the Intel® compilers

Licensed users of the Intel® compilers may download the most recent versions of the compiler from the Intel® Software Development Products Registration Center. Evaluation versions of the Intel® compilers may be found at the Intel® Software Evaluation Center.


Additional software packages may be required when building NCAR Graphics. Please check the NCAR Graphics website for more information.

Configuration and Setup Information

In order to use this guide, you will need to have the Intel® C++ Compiler for Linux and the Intel® Fortran Compiler for Linux installed on your build system. After installing the compilers, you will need to execute one of the following commands below, depending on your architecture, to set the environment variables.

source <compiler_install_dir>/bin/ ia32
source <compiler_install_dir>/bin/ intel64

Source Code Changes

None required.

Building NCAR Graphics*

To build NCAR Graphics, first choose a directory where it will be installed. If that directory does not exist, you will need to create it. Then execute the following commands from the directory where decompressed the source code. Replace <install_dir> with the directory where you would like to install NCAR Graphics. The configuration script is interactive. It will ask questions about where and how to install NCAR Graphics. After the configuration script is finished, verify that the configuration options are correct and then build the software.

mkdir <install_dir>
cd ncarg-6.1.0
cp config/LINUX.64.INTEL config/LINUX
make Info
make Everything

When the build has completed successfully, you should see a message that says:

Finished making and Installing <Everything>.

Note:If you would like to include HDF support, the following document about building HDF5 with the Intel compilers may be useful, Building HDF5* with Intel® compilers.

Running NCAR graphics

Before using NCAR Graphics, you will need to set the NCAR_ROOT environment variable to the installation directory (use the full absolute path) and add the executable files directory to the PATH variable.

export NCARG_ROOT=<install_dir>

The following commands will run an example program that uses NCAR Graphics:

ncargex cpex08
ctrans -d X11 cpex08.ncgm

The first of the two commands above compiles and executes the example, which writes its results to a graphics metafile. The second command reads that metafile and displays it in an X11 window. You should see a blank window. If you click in the window, you will see the first frame, which is a contour plot overlaid on a world map. Clicking again will display the second (last) frame, which looks similar to the first one. Clicking a third time will close the window.

Verifying Correctness

NCAR Graphics has no built-in test for correctness, but you may verify that it is working correctly by running one of the example programs described in the section above.

Known Issues and Limitations

At this time, there are no known issues with using the Intel compilers to build NCAR Graphics. Please see the NCAR Graphics website for all known issues and limitations.

Optimization Notice in English

For more complete information about compiler optimizations, see our Optimization Notice.


Rajasivaranjan T.'s picture

The  build has completed successfully and i try to run the example program as you mentioned in the steps. It is not working and also when i try to run the ncl command it's showing that bash:ncl command not found.

This is my environment settings

export NCARG_ROOT=/usr/local/ncarg

This the error i'm getting while running the commands

ncargex cpex08

NCAR Graphics Fortran  Example <cpex08>

  Copying cpex08.f

  Copying cpexcc.f

Compiling and linking...
gfortran -fPIC -fno-second-underscore -fno-range-check -fopenmp -O -o cpex08 cpexcc.f cpex08.f -L/usr/local/ncarg/lib -L/usr/X11R6/lib64 -lncarg -lncarg_gks -lncarg_c -lX11 -lXext -lcairo -lfontconfig -lpixman-1 -lfreetype -lexpat -lpng -lz -lpthread -lXrender -lbz2
/usr/local/ncarg/lib/libncarg_gks.a(gziqwk.o): In function `gziqwk_':
gziqwk.f:(.text+0x18b): undefined reference to `ggkwdr_'
/usr/local/ncarg/lib/libncarg_gks.a(gztowk.o): In function `gztowk_':
gztowk.f:(.text+0x2b0): undefined reference to `ggkwdr_'
gztowk.f:(.text+0x6e7): undefined reference to `ggkwdr_'
gztowk.f:(.text+0xa8f): undefined reference to `ggkwdr_'
collect2: ld returned 1 exit status

The compile and link failed.

I want to use wps plotgrids.ncl function. When i tried to compile the file using ncl. It is showing bash:ncl command not found.

what i should do?kindly help me to sort out this.

AmandaS (Intel)'s picture

Greg - what are the undefined reference errors? Can you copy some of them here?

Greg R.'s picture

This did not work for me. The software appeared to build, but:


ncargex cpex08


Did not compile or link. I just got a bunch of undefined reference errors. It did build ctrans, and I was able to display metafiles, but I need to be able to compile and link. Thanks.




anonymous's picture

$ cd ncarg-4.4.2
$ cp config/LINUX.INTEL config/LINUX$ ./Configure

It is suppose to be
$ cd ncarg-4.4.2
$ cp config/LINUX.INTEL config/LINUX
$ ./Configure

Kantave Greene's picture

This is what i did for install ncl_ncar graphics on xeon quad core system running ubuntu9.04 server:


cd /usr/local/

# Do not forget to source your intel compilers

tar -zxvf ncl_ncarg-'version'

nano ~/.bashrc
export NCARG_ROOT=/usr/local
export PATH=/usr/local/bin:$PATH

source ~/.bashrc

apt-get install csh # OPTIONAL

# These extra programs are required

apt-get install libx11-dev libxaw7 libxaw7-dev libxext-dev libxmu-dev libxt-dev libxau-dev libxcb1-dev libxdmcp-dev libxmu-headers libxmu6 libxpm-dev libxpm4 x11proto-core-dev x11proto-input-dev x11proto-kb-dev x11proto-xext-dev xtrans-dev libice-dev libpthread-stubs0 libpthread-stubs0-dev libsm-dev


ng4ex gsun01n
ncl gsun01n.ncl
# Result: Finished running 'ncl < gsun01n'...

ncargex cpex08
# Result: Metafile file is named cpex08.ncgm.

# Display file

ctrans -d X11 cpex08.ncgm

arturoq's picture

Could someone explain what the statement above means:

cp config/LINUX.INTEL config/LINUX$ ./Configure

It does not make too much sense. The original idea is to somehow tell the Configure what architecture
one is using but unfortunately the statement above is not quite helpful.

Has someone figure out how to install NCAR graphics and the NCL as well with intel compilers?


Add a Comment

Have a technical question? Visit our forums. Have site or software product issues? Contact support.