Friday, April 11, 2008

Install CATS under Cygwin.

It's a great challenge to install CATS under Cygwin@Windows. Actually, it is very simple. Just follow the below general steps.

a). Install Cygwin with GCC compiler;
b). Compile CLAPACK with gcc;
c). Compile CATS with gcc.

However, there are some tricks to make it work.
For step a), please refer to those instructions on the internet.
Step b).
1. Download the latest clapack.tgz from netbig site. Unpack it.
tar zxvf clapack.tgz
This will create a directory named CLPACK-3.1.1.
2. Change to the CLAPACK-3.1.1 directory, type make to compile, and get a cup of coffee.
cd CLAPACK-3.1.1
make
This will create several static libraries:
CLAPACK-3.1.1/blas_LINUX.a
CLAPACK-3.1.1/F2CLIBS/libf2c.a
CLAPACK-3.1.1/lapack_LINUX.a
CLAPACK-3.1.1/tmglib_LINUX.a
It's done.

Step c). Compile CATS
1. Unpack CATS distribution.
tar zxvf cats_v3.1.2.tar.gz
This will create a cats_v3.1.2 directory.
2. Compile CATS libraries.
First, modify the make.inc files to suit your needs.
make.inc:
####################################################################
# CATS make include file. #
# CATS, Version 2.0 #
# August 16, 2002 #
####################################################################

BINDIR = /home/tianyf/gpsf/cgps/bin
CLAPACK = /home/tianyf/CLAPACK-3.1.1

LAPACKLIB = /home/tianyf/CLAPACK-3.1.1/lapack_LINUX.a
BLASLIB = /home/tianyf/CLAPACK-3.1.1/blas_LINUX.a
F77LIB = /home/tianyf/CLAPACK-3.1.1/F2CLIBS/libf2c.a
#-lF77_LINUX
I77LIB = /home/tianyf/CLAPACK-3.1.1/tmglib_LINUX.a
#-lI77_LINUX

COMPILER = gcc
AR = ar
INSTALL = install
#CFLAGS = -static -g3 -pg -O -Q
CFLAGS = -static -O
#CFLAGS = -O

Second, cd lib/time sub-directories and type make.
It is recommended that first clean the existing files by "make cleaner".

Finally, change to analysis directory, type make to compile the cats program.

That's all.

1 comment:

Enod said...

$ cats draoCleanUnf.neu.cat --sinusoid 1y1 --model pl:-1 --model wh: --verbose
Cats Version : 3.1.1
Cats command : cats --sinusoid 1y1 --model pl:-1 --model wh: --verbose draoCleanUnf.neu.cat
Data from file : draoCleanUnf.neu.cat
cats : running on tian
CYGWIN_NT-5.1 release 1.5.24(0.156/4/2) (version 2007-01-31 10:57) on i686
userid : tianyf

Sampling frequency 1.15741e-05 (Hz), 1.00 days
Number of samples 1 period apart = 5407 of 5578
Number of points in full series = 6034
Number of series to process : 3
Start Time : Fri Apr 11 18:30:07 2008

+NORT POWER LAW NOISE
+NORT INDEX : IS FREE
+NORT PL : IS FREE

+NORT WHITE NOISE
+NORT WH : IS FREE

General_outer_simplex : n_params = 1