Saturday, May 23, 2009

QUICKNET installation on Linux

1. Download the QuickNet on http://www.icsi.berkeley.edu/Speech/qn.html . ( ftp://ftp.icsi.berkeley.edu/pub/real/davidj/quicknet.tar.gz )

2. Download the ATLAS BLAS libraries from http://math-atlas.sourceforge.net/ . ( http://sourceforge.net/project/showfiles.php?group_id=23725 )

3. Download the rtst library for testing from http://www.icsi.berkeley.edu/Speech/qn.html . ( ftp://ftp.icsi.berkeley.edu/pub/real/davidj/rtst.tar.gz )

4. Download the example data files from http://www.icsi.berkeley.edu/Speech/qn.html . ( ftp://ftp.icsi.berkeley.edu/pub/real/davidj/quicknet_testdata.tar.gz )

5. Install ATLAS BLAS libraries.
5.1 Turn off CPU throttling.
Use the command: sudo /usr/bin/cpufreq-selector -g performance
Before this command, we can use the command: cat /proc/cpuinfo to see the current CUP information before changing it. Note the one "cpu MHz". Also if more than one processor is listed, do the cpufreq-selecrtor command for each processor, using the command " sudo /usr/bin/cpufreq-selector -c 1 -g performance" to turn off throttling for the second processor, as the first processor is denoted as processor 0 and is the default one when "-c " is not specified.
After issue the command turning off the CUP throttling, we can use the command "cat /proc/cupinfo" to list out the information of the CPU, then you will see that the "cpu MHz" has been increase.
5.2 After all the processors are set to the performance mode, Extract the source from the downloaded tarball file. And create a build folder under the ATLAS folder, for example named with "build".
Then first "cd" to the ATLAS folder.
cd build
../configure -b 64 -D c -DPentiumCPS=2400

"-b 64" set the target to be 64 bit, which is recommanded if no other reasons.
"-D c -DPentiumCPS=2400" tells the configuration the CPU is Cour2Core 2.4GHz.
After I type the above command, it prompts errors saying that no Fortran compiler is found. Then,
sudo apt-get install gfortran
sudo apt-get install fort77

Next redo the command "../configure -b 64 -D c -DPentiumCPS=2400".
At the last line, "DONE configure" is printed out, yes!
5.3 Type command : make build
After several steps during building, i got following errors:
ATL_dset_xp1yp0aXbX.c: Assembler messages:
ATL_dset_xp1yp0aXbX.c:96: Error: bad register name `%rsp)'
ATL_dset_xp1yp0aXbX.c:97: Error: bad register name `%rsp)'
ATL_dset_xp1yp0aXbX.c:101: Error: bad register name `%rsi)'
ATL_dset_xp1yp0aXbX.c:102: Error: bad register name `%rsi'
make[6]: *** [ATL_dset_xp1yp0aXbX.o] Error 1
make[6]: Leaving directory `/home/troy/Software/quicknet/ATLAS/build/src/blas/level1'
make[5]: *** [dgen] Error 2
make[5]: Leaving directory `/home/troy/Software/quicknet/ATLAS/build/src/blas/level1'
make[4]: *** [dlib] Error 2
make[4]: Leaving directory `/home/troy/Software/quicknet/ATLAS/build/src/blas/level1'
make[3]: *** [lib.grd] Error 2
make[3]: Leaving directory `/home/troy/Software/quicknet/ATLAS/build/src/auxil'
make[2]: *** [IStage1] Error 2
make[2]: Leaving directory `/home/troy/Software/quicknet/ATLAS/build/bin'
ERROR 437 DURING CACHESIZE SEARCH!!.  CHECK INSTALL_LOG/Stage1.log FOR DETAILS.
make[2]: Entering directory `/home/troy/Software/quicknet/ATLAS/build/bin'
cd /home/troy/Software/quicknet/ATLAS/build ; make error_report
make[3]: Entering directory `/home/troy/Software/quicknet/ATLAS/build'
make -f Make.top error_report
make[4]: Entering directory `/home/troy/Software/quicknet/ATLAS/build'
uname -a 2>&1 >> bin/INSTALL_LOG/ERROR.LOG
gcc -v 2>&1  >> bin/INSTALL_LOG/ERROR.LOG
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.3.3-5ubuntu4' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all --with-tune=generic --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4)
gcc -V 2>&1  >> bin/INSTALL_LOG/ERROR.LOG
gcc.real: '-V' option must have argument
make[4]: [error_report] Error 1 (ignored)
gcc --version 2>&1  >> bin/INSTALL_LOG/ERROR.LOG
tar cf error_Core264SSE3.tar Make.inc bin/INSTALL_LOG/*
gzip --best error_Core264SSE3.tar
mv error_Core264SSE3.tar.gz error_Core264SSE3.tgz
make[4]: Leaving directory `/home/troy/Software/quicknet/ATLAS/build'
make[3]: Leaving directory `/home/troy/Software/quicknet/ATLAS/build'
make[2]: Leaving directory `/home/troy/Software/quicknet/ATLAS/build/bin'
Error report error_.tgz has been created in your top-level ATLAS
directory.  Be sure to include this file in any help request.
cat: ../../CONFIG/error.txt: No such file or directory
cat: ../../CONFIG/error.txt: No such file or directory
make[1]: *** [build] Error 255
make[1]: Leaving directory `/home/troy/Software/quicknet/ATLAS/build'
make: *** [build] Error 2

Having no idea to go on...
At last I found that somebody install the static library of ATLAS.
Using Synaptic Package Manager to search atlas, and select "libatlas-sse2-dev" to install. At the same time two dependencies "libatlas-headers" and "libatlas3gf-see2" are installed together.
Maybe in the command line, using sudo apt-get install libatlas-sse2-dev will also work.
From: http://seehuhn.de/pages/linear

However, after using that package, I could not find the include and lib file of ATLAS for QuickNet's installation. Thus I removed those package and retry the installation from the source.

Searching the web, I found that the error was caused by the settings of 32 bits or 64 bits. To have a try, I set the configuration to not use the default system archeticuture.
../configure -b 64 -D c -DPentiumCPS=2400 -v 2 -Si archdef 0
make build

Using these two commands, it works. What's more, after the make build command, it automatically make check, make tune and install. Even finally make clean.

In my opinion, maybe for the configuration, -b 64 is changed to be 32 will work either. Or only use the last parameter is enough "-Si archdef".

Finally, it was correctly installed after nearly 3 hours!

However, one thing must be noted is that when type the make install command, do be sure you have the root privillages. Or the operation will be denied. So for this command use "sudo make install".


6. Install QuickNet.
Extract QuickNet source files and the test data files.
"cd" to into the source folder.
mk build
cd build
../configure --with-blas=atlas --with-testdata=/home/troy/Software/quicknet/quicknet_testdata CPPFLAGS="-I/usr/local/atlas/include" LDFLAGS="-L/usr/local/atlas/lib"
make
sudo make install

In this step, errors occurs at the make step.
In file included from ../QN_utils.cc:53:
../QN_fir.h:116: error: extra qualification ‘QN_InFtrStream_FIR::’ on member ‘FillDeltaFilt’
../QN_fir.h:118: error: extra qualification ‘QN_InFtrStream_FIR::’ on member ‘FillDoubleDeltaFilt’
../QN_utils.cc: In function ‘void QN_output_sysinfo(const char*)’:
../QN_utils.cc:87: error: ‘ATL_CCVERS’ was not declared in this scope
../QN_utils.cc:88: error: ‘ATL_CCFLAGS’ was not declared in this scope

What I did is just open the "QN_fir.h" file, remove 'QN_InFtrStream_FIR::'. As in the declearation of the class member function, no need to add the class field.
For the second error, I just commented those two lines as they are just printing out some information.

Also if the option "--with-testdata" is specified, after the install, we can use the scritps built from the source with name "testdata_*.sh" to test the QuickNet.
For example, run command:
cd build
./testdata_qnstrn.sh


Finally, it is installed on my machine. Next thing is to understand how it works, so that I can use it for my experiments. Good luck to myself!

2 comments:

  1. how to install ATLAS on UBUNTU 32-BIT INTEL CORE2DUO SYSTEM? when i did with command "cat /proc/cpuinfo" i am getting 2.2GHZ but in the step 5.2 it is given 2400 ? please reply as soon as possible ,thanks in advance

    ReplyDelete
  2. I am posting the error as:
    raghavendra@Raghu:~/ATLAS/build$ ../configure -b 64 -D c -DPentiumCPS=2400
    make: `xconfig' is up to date.
    ./xconfig -d s /home/raghavendra/ATLAS/build/../ -d b /home/raghavendra/ATLAS/build -b 64 -D c -DPentiumCPS=2400

    OS configured as Linux (1)

    Assembly configured as GAS_x8632 (1)

    Vector ISA Extension configured as SSE3 (6,448)

    Architecture configured as Core2 (24)

    Clock rate configured as 2200Mhz

    Maximum number of threads configured as 2
    Parallel make command configured as '$(MAKE) -j 2'
    Cannot detect CPU throttling.
    rm -f config1.out
    make atlas_run atldir=/home/raghavendra/ATLAS/build exe=xprobe_comp redir=config1.out \
    args="-v 0 -o atlconf.txt -O 1 -A 24 -Si nof77 0 -V 448 -b 64 -d b /home/raghavendra/ATLAS/build"
    make[1]: Entering directory `/home/raghavendra/ATLAS/build'
    cd /home/raghavendra/ATLAS/build ; ./xprobe_comp -v 0 -o atlconf.txt -O 1 -A 24 -Si nof77 0 -V 448 -b 64 -d b /home/raghavendra/ATLAS/build > config1.out
    sh: 2: Syntax error: EOF in backquote substitution
    sh: 2: Syntax error: EOF in backquote substitution
    sh: 2: Syntax error: EOF in backquote substitution
    ./xctest: 1: ./xctest: Syntax error: "(" unexpected
    make[3]: *** [atlas_run] Error 2
    make[2]: *** [IRunCComp] Error 2
    ./xctest: 1: ./xctest: Syntax error: "(" unexpected
    make[3]: *** [atlas_run] Error 2
    make[2]: *** [IRunCComp] Error 2


    Unable to find usable compiler for ICC; abortingMake sure compilers are in your path, and specify good compilers to configure
    (see INSTALL.txt or 'configure --help' for details)make[1]: *** [atlas_run] Error 1
    make[1]: Leaving directory `/home/raghavendra/ATLAS/build'
    make: *** [IRun_comp] Error 2
    ERROR 512 IN SYSCMND: 'make IRun_comp args="-v 0 -o atlconf.txt -O 1 -A 24 -Si nof77 0 -V 448 -b 64"'
    mkdir src bin tune interfaces
    mkdir: cannot create directory `src': File exists
    mkdir: cannot create directory `bin': File exists
    mkdir: cannot create directory `tune': File exists
    mkdir: cannot create directory `interfaces': File exists
    make: *** [make_subdirs] Error 1
    make -f Make.top startup
    make[1]: Entering directory `/home/raghavendra/ATLAS/build'
    Make.top:1: Make.inc: No such file or directory
    Make.top:325: warning: overriding commands for target `/AtlasTest'
    Make.top:76: warning: ignoring old commands for target `/AtlasTest'
    make[1]: *** No rule to make target `Make.inc'. Stop.
    make[1]: Leaving directory `/home/raghavendra/ATLAS/build'
    make: *** [startup] Error 2
    mv: cannot stat `lib/Makefile': No such file or directory
    ../configure: 450: ../configure: cannot create lib/Makefile: Directory nonexistent
    ../configure: 451: ../configure: cannot create lib/Makefile: Directory nonexistent
    ../configure: 452: ../configure: cannot create lib/Makefile: Directory nonexistent
    ../configure: 453: ../configure: cannot create lib/Makefile: Directory nonexistent
    ../configure: 509: ../configure: cannot create lib/Makefile: Directory nonexistent
    DONE configure
    raghavendra@Raghu:~/ATLAS/build$

    ReplyDelete

Google+