2011年11月2日水曜日

Using LAPACK/MKL with intel compiler (fast, and MKL is parallelized)

$ icc -parallel -fast -mtune=core2 FK_2.c mt19937ar.c -lmkl_lapack -lmkl_em64t

でコンパイル、動作確認。(バージョンは以下の通り)
The version of icc/MKL is as follows:



[oshikawa@cdg ~]$ icc --version
icc (ICC) 11.0 20090318
Copyright (C) 1985-2009 Intel Corporation. All rights reserved.

Package ID: l_mkl_enh_p_9.1.018
Package Contents: Intel(R) Math Kernel Library 9.1 for Linux*



The main code used here is not parallelized. Nevertheless, MKL can be run in parallel mode.
このときのメインプログラムは特に並列化していないが、MKLライブラリは並列実行可能。

You can specify the number of parallel threads as follows, in Sun Grid Engine.
実行時の並列度は(SMPの範囲で)Sun Grid Engine で以下のようにして指定可能

#$ -v OMP_NUM_THREADS= (number of threads)
#$ -pe smp (number of threads)

Following example job file specifies 4 threads
例: SMP 4並列の場合

#!/bin/bash -x
#$ -V # Inherit the submission environment
#$ -cwd # Start job in submission directory
#$ -N myFK_L32_smp4 # Job Name
#$ -j y # Combine stderr and stdout
#$ -o $JOB_NAME.o$JOB_ID # Name of the output file (eg. myMPI.oJobID)
#$ -v OMP_NUM_THREADS=4
#$ -pe smp 4
#$ -q all.q # Queue name "normal"
/usr/bin/time -v ./a.out # Run the MPI executable named "a.out"

0 件のコメント:

コメントを投稿