在 Ubuntu 16.04 上使用 Intel MKL BLAS LAPACK 编译 "binica"
Compiling "binica" with Intel MKL BLAS LAPACK on Ubuntu 16.04
为了具体的数据分析,我使用了 this repository 中预编译的 ica_linux
二进制文件。在该存储库的 README.md 中,作者声明在使用特定于体系结构的 BLAS/LAPACK 实现编译二进制文件时,您可以实现重大加速。在我们的例子中,加速实际上可能会节省几天的计算时间,所以我非常渴望用适当的库编译文件。现在,我对 makefile 没有太多经验,所以我对这个过程有点困惑——这就是我请求你帮助的原因。
我的系统是 HP ProLiant d360 服务器,配备两个 Intel Xeon E5-2650 v3 十核处理器和 Ubuntu 16.04.6 x64
我尝试了以下方法
克隆回购
sudo git clone https://github.com/sccn/binica
cd binica
安装英特尔 MKL
我用了this manual.
sudo wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB
sudo rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB
sudo wget https://apt.repos.intel.com/setup/intelproducts.list -O /etc/apt/sources.list.d/intelproducts.list
sudo apt update
sudo apt install intel-mkl-2020.0-088
调整Makefile.linux
这是我不太明白我必须添加哪些库的地方。我尝试了以下方法,但我不确定这是否是正确的方法。
PLAT = _linux
CC = gcc
CFLAGS = -O3 -ansi
#BLASLIB = ./CLAPACK/lsblaspii1.2f_03.00.a
#BLASLIB = ./CLAPACK/blas$(PLAT).a
#LAPACKLIB = ./CLAPACK/lapack$(PLAT).a
#F2CLIB = ./CLAPACK/F2CLIBS/libF77$(PLAT).a ./CLAPACK/F2CLIBS/libI77$(PLAT).a
#LIBS = $(LAPACKLIB) $(BLASLIB) $(F2CLIB) -lm
LIBS = /opt/intel/mkl/lib/intel64_lin/libmkl_intel_ilp64.a
OBJS = ica.o interfc.o r250.o randlcg.o dsum.o
ica_linux: Makefile.linux ica.h memap.h $(OBJS)
$(CC) -o ica_linux $(OBJS) $(LIBS)
ica.o: Makefile.linux ica.h memap.h ica.c
$(CC) -c ica.c $(CFLAGS)
interfc.o: Makefile.linux ica.h memap.h interfc.c
$(CC) -c interfc.c $(CFLAGS)
memap.o: Makefile.linux memap.h memap.c
$(CC) -c memap.c $(CFLAGS)
r250.o: Makefile.linux r250.h r250.c
$(CC) -c r250.c $(CFLAGS)
randlcg.o: Makefile.linux randlcg.h randlcg.c
$(CC) -c randlcg.c $(CFLAGS)
dsum.o: Makefile.linux dsum.c
$(CC) -c dsum.c $(CFLAGS)
clean:
rm -f *.o
制作文件
然后我运行
sudo make Makefile.linux clean
sudo make Makefile.linux ica_linux
不幸的是,此错误消息失败了:
```
X@Y:~/Downloads/binica$ sudo make Makefile.linux ica_linux
make: Nothing to be done for 'Makefile.linux'.
gcc -c ica.c -O3 -ansi
ica.c: In function ‘sigproc’:
ica.c:565:10: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘integer {aka long int}’ [-Wformat=]
printf("number of components = %d\n",COMP_NUMBER);
^
ica.c:566:10: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘integer {aka long int}’ [-Wformat=]
printf("number of channels = %d\n",CH_NUMBER);
^
ica.c: In function ‘runica’:
ica.c:904:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘integer {aka long int}’ [-Wformat=]
printf("step %d - lrate %5f, wchange %7.6f, angledelta %4.1f deg\n",step,lrate,change,DEGCONST*angledelta);
^
ica.c:907:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘integer {aka long int}’ [-Wformat=]
printf("step %d - lrate %5f, wchange %7.6f, angledelta %4.1f deg, %d subgauss\n",step,lrate,change,DEGCONST*angledelta,j);
^
ica.c:907:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 6 has type ‘integer {aka long int}’ [-Wformat=]
ica.c:914:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘integer {aka long int}’ [-Wformat=]
printf("step %d - lrate %5f, wchange %7.6f\n",step,lrate,change);
^
ica.c:917:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘integer {aka long int}’ [-Wformat=]
printf("step %d - lrate %5f, wchange %7.6f, %d subgauss\n",step,lrate,change,j);
^
ica.c:917:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘integer {aka long int}’ [-Wformat=]
gcc -c interfc.c -O3 -ansi
interfc.c:50:17: warning: missing terminating " character
#define HELPMSG "# ica - Perform Independent Component Analysis, standalone-version
^
interfc.c:52:5: error: invalid preprocessing directive #Run
# Run the ICA algorithm of Bell & Sejnowski (1996) or the extended-ICA
^
interfc.c:53:5: error: invalid preprocessing directive #of
# of Lee, Girolami & Sejnowski (1998). Original Matlab code: Scott Makeig,
^
interfc.c:54:5: error: invalid preprocessing directive #Tony
# Tony Bell, et al.; C++ code: Sigurd Enghoff, CNL / Salk Institute 7/98
^
interfc.c:56:5: error: invalid preprocessing directive #Usage
# Usage: % ica < my.sc
^
interfc.c:58:5: error: invalid preprocessing directive #Leading
# Leading # -> use default values
^
interfc.c:59:5: error: invalid preprocessing directive #Edit
# Edit a copy of this file to run an ica decomposition
^
interfc.c:60:5: error: invalid preprocessing directive #Contacts
# Contacts: {enghoff,scott,terry,tony,tewon}@salk.edu
^
interfc.c:62:3: error: invalid preprocessing directive #Required
# Required variables:
^
interfc.c:63:5: error: unknown type name ‘DataFile’
DataFile berger/modeldata # Input data to decompose (floats multiplexed
^
interfc.c:63:24: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘/’ token
DataFile berger/modeldata # Input data to decompose (floats multiplexed
^
interfc.c:63:35: error: stray ‘#’ in program
DataFile berger/modeldata # Input data to decompose (floats multiplexed
^
interfc.c:64:32: error: invalid preprocessing directive #by
# by channel (i.e., chan1, chan2, ...))
^
interfc.c:65:28: error: stray ‘#’ in program
chans 31 # Number of data channels (= data rows)
^
interfc.c:66:28: error: stray ‘#’ in program
frames 768 # Number of data points per epoch (= data columns)
^
interfc.c:67:28: error: stray ‘#’ in program
epochs 436 # Number of epochs
^
interfc.c:69:3: error: invalid preprocessing directive #FrameWindow
# FrameWindow 20 # Number of frames per window
^
interfc.c:70:3: error: invalid preprocessing directive #FrameStep
# FrameStep 4 # Number of frames to step per window
^
interfc.c:71:3: error: invalid preprocessing directive #EpochWindow
# EpochWindow 100 # Number of epochs per window
^
interfc.c:72:3: error: invalid preprocessing directive #EpochStep
# EpochStep 25 # Number of epochs to step per window
^
interfc.c:73:3: error: invalid preprocessing directive #Baseline
# Baseline 25 # Number of data points contained in baseline
^
interfc.c:75:36: error: stray ‘#’ in program
WeightsOutFile berger/data.wts # Output ICA weight matrix (floats)
^
interfc.c:76:35: error: stray ‘#’ in program
SphereFile berger/data.sph # Output sphering matrix (floats)
^
interfc.c:78:3: error: invalid preprocessing directive #Processing
# Processing options:
^
interfc.c:80:5: error: invalid preprocessing directive #sphering
# sphering on # Flag sphering of data (on/off) {default: on}
^
interfc.c:81:5: error: invalid preprocessing directive #bias
# bias on # Perform bias adjustment (on/off) {default: on}
^
interfc.c:82:5: error: stray ‘\’ in program
\exextended 1 # Perform \"extended-ICA\" using tnah() with kurtosis
^
interfc.c:82:31: error: stray ‘#’ in program
\exextended 1 # Perform \"extended-ICA\" using tnah() with kurtosis
^
interfc.c:82:5: error: stray ‘\’ in program
\exextended 1 # Perform \"extended-ICA\" using tnah() with kurtosis
^
interfc.c:82:42: warning: missing terminating " character
\exextended 1 # Perform \"extended-ICA\" using tnah() with kurtosis
^
interfc.c:82:5: error: missing terminating " character
\exextended 1 # Perform \"extended-ICA\" using tnah() with kurtosis
^
interfc.c:83:31: error: invalid preprocessing directive #estimation
# estimation every N training blocks. If N < 0,
^
interfc.c:84:31: error: invalid preprocessing directive #fix
# fix number of sub-Gaussian components to -N
^
interfc.c:85:31: error: invalid preprocessing directive #{
# {default|0: off}
^
interfc.c:86:5: error: invalid preprocessing directive #pca
# pca 0 # Decompose a principal component subspace of
^
interfc.c:87:31: error: invalid preprocessing directive #the
# the data. Retain this many PCs. {default|0: all}
^
interfc.c:88:3: error: invalid preprocessing directive #Optional
# Optional input variables:
^
interfc.c:90:4: error: invalid preprocessing directive #WeightsInFile
# WeightsInFile input.wts # Starting ICA weight matrix (nchans,ncomps)
^
interfc.c:91:31: error: invalid preprocessing directive #{
# {default: identity or sphering matrix}
^
interfc.c:92:28: error: stray ‘#’ in program
lrate 2.0e-3 # Initial ICA learning rate (float << 1)
^
interfc.c:93:31: error: invalid preprocessing directive #{
# {default: heuristic ~5e-4}
^
interfc.c:94:5: error: invalid preprocessing directive #blocksize
# blocksize 20 # ICA block size (integer << datalength)
^
interfc.c:95:31: error: invalid preprocessing directive #{
# {default: heuristic fraction of log data length}
^
interfc.c:96:5: error: invalid preprocessing directive #stop
# stop 1.0e-6 # Stop training when weight-change < this value
^
interfc.c:97:31: error: invalid preprocessing directive #{
# {default: heuristic ~0.000001}
^
interfc.c:98:28: error: stray ‘#’ in program
maxsteps 512 # Max. number of ICA training steps {default: 128}
^
interfc.c:99:5: error: invalid preprocessing directive #posact
# posact on # Make each component activation net-positive
^
interfc.c:100:30: error: invalid preprocessing directive #(
# (on/off) {default: on}
^
interfc.c:101:5: error: invalid preprocessing directive #annealstep
# annealstep 0.98 # Annealing factor (range (0,1]) - controls
^
interfc.c:102:31: error: invalid preprocessing directive #the
# the speed of convergence.
^
interfc.c:103:5: error: invalid preprocessing directive #annealdeg
# annealdeg 60 # Angledelta threshold for annealing {default: 60}
^
interfc.c:104:5: error: invalid preprocessing directive #momentum
# momentum 0.0 # Momentum gain (range [0,1]) {default: 0}
^
interfc.c:105:5: error: invalid preprocessing directive #verbose
# verbose off # Give ascii messages (on/off) {default: on}
^
interfc.c:107:3: error: invalid preprocessing directive #Optional
# Optional outputs:
^
interfc.c:109:4: error: invalid preprocessing directive #ActivationsFile
# ActivationsFile data.act # Activations of each component (ncomps,points)
^
interfc.c:110:4: error: invalid preprocessing directive #BiasFile
# BiasFile data.bs # Bias weights (ncomps,1)
^
interfc.c:111:4: error: invalid preprocessing directive #SignFile
# SignFile data.sgn # Signs designating (-1) sub- and (1) super-Gaussian
^
interfc.c:112:31: error: invalid preprocessing directive #components
# components (ncomps,1)
^
interfc.c:114:3: error: invalid preprocessing directive #This
# This script, \"ica.sc\" is a sample ica script file. Copy and modify it as
^
interfc.c:114:17: warning: missing terminating " character
# This script, \"ica.sc\" is a sample ica script file. Copy and modify it as
^
interfc.c:115:3: error: invalid preprocessing directive #desired
# desired. Note that the input data file(s) must be native floats."
^
interfc.c:115:67: warning: missing terminating " character
# desired. Note that the input data file(s) must be native floats."
^
interfc.c: In function ‘help’:
interfc.c:170:3: error: missing terminating " character
puts(HELPMSG);
^
interfc.c:170:3: error: too few arguments to function ‘puts’
interfc.c: In function ‘doit’:
interfc.c:679:12: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘integer {aka long int}’ [-Wformat=]
printf("PDF will be calculated initially every %d blocks using %d data points.\n",extblocks,pdfsize);
^
interfc.c:679:12: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘integer {aka long int}’ [-Wformat=]
interfc.c:681:12: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘integer {aka long int}’ [-Wformat=]
printf("PDF will not be calculated. Exactly %d sub-Gaussian components assumed.\n",nsub);
^
interfc.c:684:10: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘integer {aka long int}’ [-Wformat=]
printf("Initial learning rate will be %g, block size %d.\n",lrate,block);
^
interfc.c:690:10: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘integer {aka long int}’ [-Wformat=]
printf("Training will end when wchange < %g or after %d steps.\n",nochange,maxsteps);
^
interfc.c: In function ‘master’:
interfc.c:923:16: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
keys->token = strdup(token);
^
Makefile:19: recipe for target 'interfc.o' failed
make: *** [interfc.o] Error 1
```
任何帮助和提示我可能做错的地方都将不胜感激!
谢谢,
亚历克斯
'I don't really understand which libraries I have to add. "
<< Alex, do understand the list of Intel MKL libraries you need to add, please refer to the Intel MKL Linker Adviser to choose the list of libraries needed to add. Here is the list of this article: https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor
为了具体的数据分析,我使用了 this repository 中预编译的 ica_linux
二进制文件。在该存储库的 README.md 中,作者声明在使用特定于体系结构的 BLAS/LAPACK 实现编译二进制文件时,您可以实现重大加速。在我们的例子中,加速实际上可能会节省几天的计算时间,所以我非常渴望用适当的库编译文件。现在,我对 makefile 没有太多经验,所以我对这个过程有点困惑——这就是我请求你帮助的原因。
我的系统是 HP ProLiant d360 服务器,配备两个 Intel Xeon E5-2650 v3 十核处理器和 Ubuntu 16.04.6 x64
我尝试了以下方法
克隆回购
sudo git clone https://github.com/sccn/binica
cd binica
安装英特尔 MKL
我用了this manual.
sudo wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB
sudo rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB
sudo wget https://apt.repos.intel.com/setup/intelproducts.list -O /etc/apt/sources.list.d/intelproducts.list
sudo apt update
sudo apt install intel-mkl-2020.0-088
调整Makefile.linux
这是我不太明白我必须添加哪些库的地方。我尝试了以下方法,但我不确定这是否是正确的方法。
PLAT = _linux
CC = gcc
CFLAGS = -O3 -ansi
#BLASLIB = ./CLAPACK/lsblaspii1.2f_03.00.a
#BLASLIB = ./CLAPACK/blas$(PLAT).a
#LAPACKLIB = ./CLAPACK/lapack$(PLAT).a
#F2CLIB = ./CLAPACK/F2CLIBS/libF77$(PLAT).a ./CLAPACK/F2CLIBS/libI77$(PLAT).a
#LIBS = $(LAPACKLIB) $(BLASLIB) $(F2CLIB) -lm
LIBS = /opt/intel/mkl/lib/intel64_lin/libmkl_intel_ilp64.a
OBJS = ica.o interfc.o r250.o randlcg.o dsum.o
ica_linux: Makefile.linux ica.h memap.h $(OBJS)
$(CC) -o ica_linux $(OBJS) $(LIBS)
ica.o: Makefile.linux ica.h memap.h ica.c
$(CC) -c ica.c $(CFLAGS)
interfc.o: Makefile.linux ica.h memap.h interfc.c
$(CC) -c interfc.c $(CFLAGS)
memap.o: Makefile.linux memap.h memap.c
$(CC) -c memap.c $(CFLAGS)
r250.o: Makefile.linux r250.h r250.c
$(CC) -c r250.c $(CFLAGS)
randlcg.o: Makefile.linux randlcg.h randlcg.c
$(CC) -c randlcg.c $(CFLAGS)
dsum.o: Makefile.linux dsum.c
$(CC) -c dsum.c $(CFLAGS)
clean:
rm -f *.o
制作文件
然后我运行
sudo make Makefile.linux clean
sudo make Makefile.linux ica_linux
不幸的是,此错误消息失败了:
```
X@Y:~/Downloads/binica$ sudo make Makefile.linux ica_linux
make: Nothing to be done for 'Makefile.linux'.
gcc -c ica.c -O3 -ansi
ica.c: In function ‘sigproc’:
ica.c:565:10: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘integer {aka long int}’ [-Wformat=]
printf("number of components = %d\n",COMP_NUMBER);
^
ica.c:566:10: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘integer {aka long int}’ [-Wformat=]
printf("number of channels = %d\n",CH_NUMBER);
^
ica.c: In function ‘runica’:
ica.c:904:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘integer {aka long int}’ [-Wformat=]
printf("step %d - lrate %5f, wchange %7.6f, angledelta %4.1f deg\n",step,lrate,change,DEGCONST*angledelta);
^
ica.c:907:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘integer {aka long int}’ [-Wformat=]
printf("step %d - lrate %5f, wchange %7.6f, angledelta %4.1f deg, %d subgauss\n",step,lrate,change,DEGCONST*angledelta,j);
^
ica.c:907:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 6 has type ‘integer {aka long int}’ [-Wformat=]
ica.c:914:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘integer {aka long int}’ [-Wformat=]
printf("step %d - lrate %5f, wchange %7.6f\n",step,lrate,change);
^
ica.c:917:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘integer {aka long int}’ [-Wformat=]
printf("step %d - lrate %5f, wchange %7.6f, %d subgauss\n",step,lrate,change,j);
^
ica.c:917:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘integer {aka long int}’ [-Wformat=]
gcc -c interfc.c -O3 -ansi
interfc.c:50:17: warning: missing terminating " character
#define HELPMSG "# ica - Perform Independent Component Analysis, standalone-version
^
interfc.c:52:5: error: invalid preprocessing directive #Run
# Run the ICA algorithm of Bell & Sejnowski (1996) or the extended-ICA
^
interfc.c:53:5: error: invalid preprocessing directive #of
# of Lee, Girolami & Sejnowski (1998). Original Matlab code: Scott Makeig,
^
interfc.c:54:5: error: invalid preprocessing directive #Tony
# Tony Bell, et al.; C++ code: Sigurd Enghoff, CNL / Salk Institute 7/98
^
interfc.c:56:5: error: invalid preprocessing directive #Usage
# Usage: % ica < my.sc
^
interfc.c:58:5: error: invalid preprocessing directive #Leading
# Leading # -> use default values
^
interfc.c:59:5: error: invalid preprocessing directive #Edit
# Edit a copy of this file to run an ica decomposition
^
interfc.c:60:5: error: invalid preprocessing directive #Contacts
# Contacts: {enghoff,scott,terry,tony,tewon}@salk.edu
^
interfc.c:62:3: error: invalid preprocessing directive #Required
# Required variables:
^
interfc.c:63:5: error: unknown type name ‘DataFile’
DataFile berger/modeldata # Input data to decompose (floats multiplexed
^
interfc.c:63:24: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘/’ token
DataFile berger/modeldata # Input data to decompose (floats multiplexed
^
interfc.c:63:35: error: stray ‘#’ in program
DataFile berger/modeldata # Input data to decompose (floats multiplexed
^
interfc.c:64:32: error: invalid preprocessing directive #by
# by channel (i.e., chan1, chan2, ...))
^
interfc.c:65:28: error: stray ‘#’ in program
chans 31 # Number of data channels (= data rows)
^
interfc.c:66:28: error: stray ‘#’ in program
frames 768 # Number of data points per epoch (= data columns)
^
interfc.c:67:28: error: stray ‘#’ in program
epochs 436 # Number of epochs
^
interfc.c:69:3: error: invalid preprocessing directive #FrameWindow
# FrameWindow 20 # Number of frames per window
^
interfc.c:70:3: error: invalid preprocessing directive #FrameStep
# FrameStep 4 # Number of frames to step per window
^
interfc.c:71:3: error: invalid preprocessing directive #EpochWindow
# EpochWindow 100 # Number of epochs per window
^
interfc.c:72:3: error: invalid preprocessing directive #EpochStep
# EpochStep 25 # Number of epochs to step per window
^
interfc.c:73:3: error: invalid preprocessing directive #Baseline
# Baseline 25 # Number of data points contained in baseline
^
interfc.c:75:36: error: stray ‘#’ in program
WeightsOutFile berger/data.wts # Output ICA weight matrix (floats)
^
interfc.c:76:35: error: stray ‘#’ in program
SphereFile berger/data.sph # Output sphering matrix (floats)
^
interfc.c:78:3: error: invalid preprocessing directive #Processing
# Processing options:
^
interfc.c:80:5: error: invalid preprocessing directive #sphering
# sphering on # Flag sphering of data (on/off) {default: on}
^
interfc.c:81:5: error: invalid preprocessing directive #bias
# bias on # Perform bias adjustment (on/off) {default: on}
^
interfc.c:82:5: error: stray ‘\’ in program
\exextended 1 # Perform \"extended-ICA\" using tnah() with kurtosis
^
interfc.c:82:31: error: stray ‘#’ in program
\exextended 1 # Perform \"extended-ICA\" using tnah() with kurtosis
^
interfc.c:82:5: error: stray ‘\’ in program
\exextended 1 # Perform \"extended-ICA\" using tnah() with kurtosis
^
interfc.c:82:42: warning: missing terminating " character
\exextended 1 # Perform \"extended-ICA\" using tnah() with kurtosis
^
interfc.c:82:5: error: missing terminating " character
\exextended 1 # Perform \"extended-ICA\" using tnah() with kurtosis
^
interfc.c:83:31: error: invalid preprocessing directive #estimation
# estimation every N training blocks. If N < 0,
^
interfc.c:84:31: error: invalid preprocessing directive #fix
# fix number of sub-Gaussian components to -N
^
interfc.c:85:31: error: invalid preprocessing directive #{
# {default|0: off}
^
interfc.c:86:5: error: invalid preprocessing directive #pca
# pca 0 # Decompose a principal component subspace of
^
interfc.c:87:31: error: invalid preprocessing directive #the
# the data. Retain this many PCs. {default|0: all}
^
interfc.c:88:3: error: invalid preprocessing directive #Optional
# Optional input variables:
^
interfc.c:90:4: error: invalid preprocessing directive #WeightsInFile
# WeightsInFile input.wts # Starting ICA weight matrix (nchans,ncomps)
^
interfc.c:91:31: error: invalid preprocessing directive #{
# {default: identity or sphering matrix}
^
interfc.c:92:28: error: stray ‘#’ in program
lrate 2.0e-3 # Initial ICA learning rate (float << 1)
^
interfc.c:93:31: error: invalid preprocessing directive #{
# {default: heuristic ~5e-4}
^
interfc.c:94:5: error: invalid preprocessing directive #blocksize
# blocksize 20 # ICA block size (integer << datalength)
^
interfc.c:95:31: error: invalid preprocessing directive #{
# {default: heuristic fraction of log data length}
^
interfc.c:96:5: error: invalid preprocessing directive #stop
# stop 1.0e-6 # Stop training when weight-change < this value
^
interfc.c:97:31: error: invalid preprocessing directive #{
# {default: heuristic ~0.000001}
^
interfc.c:98:28: error: stray ‘#’ in program
maxsteps 512 # Max. number of ICA training steps {default: 128}
^
interfc.c:99:5: error: invalid preprocessing directive #posact
# posact on # Make each component activation net-positive
^
interfc.c:100:30: error: invalid preprocessing directive #(
# (on/off) {default: on}
^
interfc.c:101:5: error: invalid preprocessing directive #annealstep
# annealstep 0.98 # Annealing factor (range (0,1]) - controls
^
interfc.c:102:31: error: invalid preprocessing directive #the
# the speed of convergence.
^
interfc.c:103:5: error: invalid preprocessing directive #annealdeg
# annealdeg 60 # Angledelta threshold for annealing {default: 60}
^
interfc.c:104:5: error: invalid preprocessing directive #momentum
# momentum 0.0 # Momentum gain (range [0,1]) {default: 0}
^
interfc.c:105:5: error: invalid preprocessing directive #verbose
# verbose off # Give ascii messages (on/off) {default: on}
^
interfc.c:107:3: error: invalid preprocessing directive #Optional
# Optional outputs:
^
interfc.c:109:4: error: invalid preprocessing directive #ActivationsFile
# ActivationsFile data.act # Activations of each component (ncomps,points)
^
interfc.c:110:4: error: invalid preprocessing directive #BiasFile
# BiasFile data.bs # Bias weights (ncomps,1)
^
interfc.c:111:4: error: invalid preprocessing directive #SignFile
# SignFile data.sgn # Signs designating (-1) sub- and (1) super-Gaussian
^
interfc.c:112:31: error: invalid preprocessing directive #components
# components (ncomps,1)
^
interfc.c:114:3: error: invalid preprocessing directive #This
# This script, \"ica.sc\" is a sample ica script file. Copy and modify it as
^
interfc.c:114:17: warning: missing terminating " character
# This script, \"ica.sc\" is a sample ica script file. Copy and modify it as
^
interfc.c:115:3: error: invalid preprocessing directive #desired
# desired. Note that the input data file(s) must be native floats."
^
interfc.c:115:67: warning: missing terminating " character
# desired. Note that the input data file(s) must be native floats."
^
interfc.c: In function ‘help’:
interfc.c:170:3: error: missing terminating " character
puts(HELPMSG);
^
interfc.c:170:3: error: too few arguments to function ‘puts’
interfc.c: In function ‘doit’:
interfc.c:679:12: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘integer {aka long int}’ [-Wformat=]
printf("PDF will be calculated initially every %d blocks using %d data points.\n",extblocks,pdfsize);
^
interfc.c:679:12: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘integer {aka long int}’ [-Wformat=]
interfc.c:681:12: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘integer {aka long int}’ [-Wformat=]
printf("PDF will not be calculated. Exactly %d sub-Gaussian components assumed.\n",nsub);
^
interfc.c:684:10: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘integer {aka long int}’ [-Wformat=]
printf("Initial learning rate will be %g, block size %d.\n",lrate,block);
^
interfc.c:690:10: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘integer {aka long int}’ [-Wformat=]
printf("Training will end when wchange < %g or after %d steps.\n",nochange,maxsteps);
^
interfc.c: In function ‘master’:
interfc.c:923:16: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
keys->token = strdup(token);
^
Makefile:19: recipe for target 'interfc.o' failed
make: *** [interfc.o] Error 1
```
任何帮助和提示我可能做错的地方都将不胜感激!
谢谢, 亚历克斯
'I don't really understand which libraries I have to add. " << Alex, do understand the list of Intel MKL libraries you need to add, please refer to the Intel MKL Linker Adviser to choose the list of libraries needed to add. Here is the list of this article: https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor