i am not using nr anymore, using mkl now. may use this


所有跟贴·加跟贴·新语丝读书论坛

送交者: qtl 于 2009-05-29, 09:29:07:

回答: 没听说过gfortran有问题 由 supernova 于 2009-05-29, 09:20:31:

#!/usr/bin/perl -w
################################################################################
# Perl script to compile F90 code with Intel MKL_VSL support. The command line
# is a bit complicated. This script is to make it clear so that I can manage it
# later on.
# by qtl Yu
# May 21, 2009
################################################################################
use strict;
my $cmd="ifort";

my $oopt=" -xK -w -w95 -fpp1 -vec-report0";

#Path names
my $mklpath="/opt/intel/Compiler/11.0/081/mkl";
my $mkllib="$mklpath/lib/32";
my $mklinc="$mklpath/include";

#I put the mod files below, so that no need to include 'mkl_vml.fi' every time
my $module="-module /pathto/mod";

#It was recommended to link dynamically, so included *.so here
my $leading="-Wl,--start-group";
my $intel="$mkllib/libmkl_intel.so";
my $thread="$mkllib/libmkl_intel_thread.so";
my $core="$mkllib/libmkl_core.so";
my $ending="-Wl,--end-group";

my $so="$leading $intel $thread $core $ending";

my $lm="-lm"; #link in the math support system library
my $pthread="-lpthread"; #For Linux, and must be the last option
my $linux="-liomp5 $pthread $lm";

system "$cmd @ARGV $oopt $module -I$mklinc $so -L$mkllib $linux";


################################################################################
# References: Use mkl example complile command line info
# Will do a 64 version later on. Changing the path name would be enough.
################################################################################




所有跟贴:


加跟贴

笔名: 密码: 注册笔名请按这里

标题:

内容: (BBCode使用说明