pgplot
Performance Tools for Software Developers - Building PGPLOT* with the Intel® compilers
1. ソースコード入手
http://www.astro.caltech.edu/~tjp/pgplot/
2. 展開&リネーム
$ tar zxf pgplot5.2.tar.gz
$ mv pgplot pgplotsrc
$ mkdir pgplot
3. pgplotsrc/makemakeの編集
1028行目コメントアウト
#pndriv.o : ./png.h ./pngconf.h ./zlib.h ./zconf.h
1055行目"-nofor_main"オプション追加
$(FCOMPL) -nofor_main -o cpgdemo cpgdemo.o $(CPGPLOT_LIB) $(LIBS)
4. drivers.listのコピー
$ cd pgplot
$ cp ../pgplotsrc/drivers.list .
5. pgplot/drivers.listの編集
40(PNG),41(TPNG),45(VPS),46(CPS),47(VCPS)行コメントアウト解除
NUDRIV 0 /NULL Null device (no output) Std F77
! PGDRIV 0 /PGMF PGPLOT metafile (new format, experimental) Std F77
PNDRIV 1 /PNG Portable Network Graphics file C
PNDRIV 2 /TPNG Portable Network Graphics file - transparent background C
! PPDRIV 1 /PPM Portable Pixel Map file, landscape
! PPDRIV 2 /VPPM Portable PIxel Map file, portrait
PSDRIV 1 /PS PostScript printers, monochrome, landscape Std F77
PSDRIV 2 /VPS Postscript printers, monochrome, portrait Std F77
PSDRIV 3 /CPS PostScript printers, color, landscape Std F77
PSDRIV 4 /VCPS PostScript printers, color, portrait Std F77
6. mmakemakeスクリプト実行(makefile作成)
$ ../pgplotsrc/makemake ../pgplotsrc linux g77_gcc
7. make実行
※ iccがなければ、ccを指定
$ make CCOMPL=icc FCOMPL=ifort LIBS="-L/usr/lib64 -lX11 -lsvml" LD_RUN_PATH=`pwd`
$ make cpg CCOMPL=icc FCOMPL=ifort LIBS="-L/usr/lib64 -lX11 -lsvml" LD_RUN_PATH=`pwd`
※ DSOエラー(?)が出たら、-lsvmlを外してみる
※ libpng-develも必要?
8. libpgplotライブラリの生成確認
makeが正常終了するとpgplotディレクトリに次の3つのファイルが生成されます
libpgplot.a, libpgplot.so, libcpgplot.a
9. 動作テスト
$ ./pgdemo1