help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: More on Octave 2.1.36 for Windows


From: Andy Adler
Subject: Re: More on Octave 2.1.36 for Windows
Date: Sun, 25 Aug 2002 10:48:20 -0400
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.0) Gecko/20020530

Agustin Barto wrote:

1) No. I had some problems compiling them in the past and never tried again. I'll try again this weekend if I have some spare time?

2) No. How can I do that? And more important, what are ATLAS optimizations? :)

ATLAS optimizations give a performance boost to basic linear algebra operations in octave. Sometimes you can get up to 10x performance gain. ATLAS does an architecture specific compile, but I've found that my P3 compiles give good overall performance, and
work with almost everybody's machine.

Here are my build instructions for Octave 2.1.36 + octave-forge + ATLAS . They are part of the package http://prdownloads.sf.net/octave/octave-2.1.36-ATLAS-P3SSE1-gnuplot-octaveforge.tar.bz2
  in /usr/doc/octave-2.1.36/INSTALL

--- BUILD INSTRUCTIONS---

BUILDING octave-1.1.36 for cygwin

This is a description of how I got
octave-2.1.36 and gnuplot-3.7.1
and octave-forge to build under win2000.

I have made a cygwin tar.bz2 package
to download of this.

Andy Adler <address@hidden>

$Id: INSTALL.WINDOWS,v 1.3 2002/05/21 06:38:13 aadler Exp $

COPYRIGHT:

  All components: GNU GPL

  Except GNUPLOT,
  and some octave-forge components

PREREQUISITES:
Download from www.cygwin.com
  recent version of cygwin (at least jan 2002 )
  gcc
  g77
  readline-4.2a
  libreadline5

BUILDING

  Download octave-2.1.36.tar.bz2 from www.octave.org
  tar xvfj octave-2.1.36.tar.bz2
  cd  octave-2.1.36
  ./configure --prefix=/usr

OBTAIN GNUPLOT COMPONENTS

  Download from www.gnuplot.info

  get gp371cyg.zip.
  Unzip the file wgnuplot.exe and put it in /usr/bin
get gnuplot-3.7.1.tar.gz
  Compile win/pgnuplot.c

  1. comment out #include <conio.h>
  2. gcc -o pgnuplot.exe pgnuplot.c -luser32 -s
copy pgnuplot.exe to /usr/bin

MODIFY octaverc FILE

for the following
$ cat /usr/share/octave/site/m/startup/octaverc
  ## System-wide startup file for Octave.
  ##
  ## This file should contain any commands that should be executed each
  ## time Octave starts for every user at this site.
# find where cygwin is mounted
  mount_path= system('echo -n `cygpath -ws /tmp`');
  mount_path( findstr(mount_path,"\\") ) = "/";
  putenv('TMPDIR',  mount_path );
clear mount_path; gnuplot_binary ="pgnuplot.exe";
  gnuplot_has_multiplot = 1;

BUILD OCTAVE FORGE

1. EDIT /usr/src/octave-2.1.36/src/Makefile

A. REPLACE

#DLD_XSRC := balance.cc besselj.cc betainc.cc chol.cc colloc.cc dassl.cc \
#    det.cc eig.cc expm.cc fft.cc fft2.cc filter.cc find.cc \
#    fsolve.cc gammainc.cc getgrent.cc getpwent.cc getrusage.cc \
#    givens.cc hess.cc ifft.cc ifft2.cc inv.cc log.cc lpsolve.cc \
#    lsode.cc lu.cc minmax.cc pinv.cc qr.cc quad.cc qz.cc rand.cc \
#    schur.cc sort.cc svd.cc syl.cc time.cc

WITH

DLD_XSRC := $(shell cd DLD-FUNCTIONS ; ls *.cc )

B. ADD AFTER LINE

CXXFLAGS_NO_PT_FLAGS = $(filter-out $(PT_FLAGS), $(ALL_CXXFLAGS))

THESE LINES

all: octave

OCTAVEFORGE= /usr/src/octave-forge/
SPARSE  = $(OCTAVEFORGE)/main/sparse/
SUPERLU = $(SPARSE)/SuperLU/SRC/
CPPFLAGS := -I$(SUPERLU) $(CPPFLAGS)

$(SPARSE)/libsuperlu.a:
   cd $(SPARSE) && make libsuperlu.a

SPLINES = $(OCTAVEFORGE)/main/splines/
SPLINES_SRC := $(shell ls $(SPLINES)/*.f )
SPLINES_OBJ := $(patsubst %.f, %.o, $(SPLINES_SRC))

$(SPLINES_OBJ): %.o: %.f
   $(FC) -c -fPIC -O -o $@ $<


C. REPLACE

octave: stamp-prereq $(LIBRARIES) stamp-oct-links \
       octave.o builtins.o ops.o $(DLD_STATIC_OBJ)
       $(LD_CXX) $(CPPFLAGS) $(ALL_CXXFLAGS) $(RDYNAMIC_FLAG) \
       $(ALL_LDFLAGS) -o octave \
       octave.o builtins.o ops.o $(XERBLA) $(DLD_STATIC_OBJ) \
       $(OCTAVE_LFLAGS) \
       $(OCTAVE_LIBS) \
       $(LEXLIB) $(BLAS_LIBS) $(FFTW_LIBS) $(LIBS) $(FLIBS)

WITH

octave: stamp-prereq $(LIBRARIES) stamp-oct-links \
   octave.o builtins.o ops.o $(DLD_STATIC_OBJ) \
$(SPARSE)/libsuperlu.a $(SPLINES_OBJ) $(LD_CXX) $(CPPFLAGS) $(ALL_CXXFLAGS) $(RDYNAMIC_FLAG) \
   $(ALL_LDFLAGS) -o octave \
   octave.o builtins.o ops.o $(XERBLA) $(DLD_STATIC_OBJ) \
   $(OCTAVE_LFLAGS) \
   $(OCTAVE_LIBS) \
   $(LEXLIB) $(BLAS_LIBS) $(FFTW_LIBS) $(LIBS) $(FLIBS) \
       -L$(SPARSE) -lsuperlu -ljpeg $(SPLINES_OBJ)

2. CREATE LINKS

cd /usr/src
cvs -d :pserver:address@hidden:/cvsroot/octave checkout
OCTAVEFORGE=/usr/src/octave-forge
cd /usr/src/octave-2.1.36/src
mkdir octave
cd octave
ln -s ../../config.h
ln -s ../defun-dld.h
ln -s ../error.h
ln -s ../../libcruft/misc/f77-fcn.h
ln -s ../gripes.h
ln -s ../help.h
ln -s ../../liboctave/lo-ieee.h
ln -s ../../liboctave/lo-mappers.h
ln -s ../../liboctave/lo-utils.h
ln -s ../../liboctave/mx-base.h
ln -s ../oct-obj.h
ln -s ../oct.h
ln -s ../ops.h
ln -s ../ov-base.h
ln -s ../ov-complex.h
ln -s ../ov-cell.h
ln -s ../ov-cx-mat.h
ln -s ../ov-re-mat.h
ln -s ../ov-scalar.h
ln -s ../ov-typeinfo.h
ln -s ../ov.h
ln -s ../pager.h
ln -s ../parse.h
ln -s ../pr-output.h
ln -s ../../liboctave/str-vec.h
ln -s ../symtab.h
ln -s ../toplev.h
ln -s ../utils.h
ln -s ../variables.h
ln -s ../../liboctave/EIG.h
ln -s ../../liboctave/mx-cm-cdm.h
ln -s ../oct-strstrm.h
ln -s ../../liboctave/CmplxSCHUR.h
ln -s ../../liboctave/dbleSCHUR.h
cd ../DLD-FUNCTIONS
ln -s $OCTAVEFORGE/main/linear-algebra/GramSchmidt.cc
ln -s $OCTAVEFORGE/main/general/bitand.cc
ln -s $OCTAVEFORGE/main/general/command.cc
ln -s $OCTAVEFORGE/main/general/SHA1.cc
ln -s $OCTAVEFORGE/main/general/deref.cc
ln -s $OCTAVEFORGE/main/sparse/complex_sparse_ops.cc
ln -s $OCTAVEFORGE/main/image/conv2.cc
ln -s $OCTAVEFORGE/main/image/cordflt2.cc
ln -s $OCTAVEFORGE/main/image/bwfill.cc
ln -s $OCTAVEFORGE/main/image/jpgread.cc
ln -s $OCTAVEFORGE/main/image/jpgwrite.cc
ln -s $OCTAVEFORGE/main/specfun/ellipj.cc
ln -s $OCTAVEFORGE/main/optim/leval.cc
ln -s $OCTAVEFORGE/main/optim/lp.cc
ln -s $OCTAVEFORGE/main/sparse/make_sparse.cc
ln -s $OCTAVEFORGE/main/sparse/make_sparse.h
ln -s $OCTAVEFORGE/main/signal/medfilt1.cc
ln -s $OCTAVEFORGE/extra/linear-algebra/ov-re-tri.cc
ln -s $OCTAVEFORGE/extra/linear-algebra/ov-re-tri.h
ln -s $OCTAVEFORGE/extra/testfun/pretty.cc
ln -s $OCTAVEFORGE/extra/symband/SymBand.cc
rm rand.cc
ln -s $OCTAVEFORGE/FIXES/rand.cc
ln -s $OCTAVEFORGE/FIXES/MersenneTwister.h
rm fsolve.cc
ln -s $OCTAVEFORGE/FIXES/fsolve.cc
rm log.cc
ln -s $OCTAVEFORGE/FIXES/logm.cc
ln -s $OCTAVEFORGE/FIXES/sqrtm.cc
ln -s $OCTAVEFORGE/main/signal/remez.cc
ln -s $OCTAVEFORGE/main/strings/regexp.cc
ln -s $OCTAVEFORGE/main/struct/getfield.cc
ln -s $OCTAVEFORGE/main/struct/setfield.cc
ln -s $OCTAVEFORGE/main/linear-algebra/rsf2csf.cc
ln -s $OCTAVEFORGE/main/sparse/sparse_full.cc
ln -s $OCTAVEFORGE/main/sparse/sparse_inv.cc
ln -s $OCTAVEFORGE/main/sparse/sparse_ops.cc
ln -s $OCTAVEFORGE/main/sparse/sparse_ops.h
ln -s $OCTAVEFORGE/main/splines/trisolve.cc
ln -s $OCTAVEFORGE/extra/Windows/grab.cc
ln -s $OCTAVEFORGE/extra/Windows/grab_win32part.cc


3. BUILD OCTAVE AGAIN

cd /usr/src/octave-2.1.36
make install
#make install-strip - doesn't work for some octave subdirectories
strip /usr/bin/octave*
find /usr/share/octave -type f | xargs strip


4. COPY *.M FILES INTO PLACE

OCTAVEM=/usr/share/octave/2.1.36/m/
mkdir -p  $OCTAVEM/image
mkdir -p  $OCTAVEM/integration
mkdir -p  $OCTAVEM/ode
mkdir -p  $OCTAVEM/testfun
mkdir -p  $OCTAVEM/comm
mkdir -p  $OCTAVEM/control
mkdir -p  $OCTAVEM/ident
mkdir -p  $OCTAVEM/image
mkdir -p  $OCTAVEM/io
mkdir -p  $OCTAVEM/linear-algebra
mkdir -p  $OCTAVEM/miscellaneous
mkdir -p  $OCTAVEM/optim
mkdir -p  $OCTAVEM/path
mkdir -p  $OCTAVEM/plot
mkdir -p  $OCTAVEM/set
mkdir -p  $OCTAVEM/signal
mkdir -p  $OCTAVEM/sparse
mkdir -p  $OCTAVEM/specfun
mkdir -p  $OCTAVEM/special-matrix
mkdir -p  $OCTAVEM/splines
mkdir -p  $OCTAVEM/statistics
mkdir -p  $OCTAVEM/strings
mkdir -p  $OCTAVEM/struct
mkdir -p  $OCTAVEM/symband
mkdir -p  $OCTAVEM/time
mkdir -p  $OCTAVEM/tsa

cp -r $OCTAVEFORGE/extra/Windows/*.m  $OCTAVEM/image
cp -r $OCTAVEFORGE/extra/integration/*.m  $OCTAVEM/integration
cp -r $OCTAVEFORGE/extra/ode/*.m  $OCTAVEM/ode
cp -r $OCTAVEFORGE/extra/testfun/*.m  $OCTAVEM/testfun
cp -r $OCTAVEFORGE/extra/tsa/*.m  $OCTAVEM/tsa
cp -r $OCTAVEFORGE/extra/symband/*.m  $OCTAVEM/symband
cp -r $OCTAVEFORGE/main/comm/*.m  $OCTAVEM/comm
cp -r $OCTAVEFORGE/main/control/*.m  $OCTAVEM/control
cp -r $OCTAVEFORGE/main/ident/*.m  $OCTAVEM/ident
cp -r $OCTAVEFORGE/main/image/*.m  $OCTAVEM/image
cp -r $OCTAVEFORGE/main/io/*.m  $OCTAVEM/io
cp -r $OCTAVEFORGE/main/linear-algebra/*.m  $OCTAVEM/linear-algebra
cp -r $OCTAVEFORGE/main/miscellaneous/*.m  $OCTAVEM/miscellaneous
cp -r $OCTAVEFORGE/main/optim/*.m  $OCTAVEM/optim
cp -r $OCTAVEFORGE/main/path/*.m  $OCTAVEM/path
cp -r $OCTAVEFORGE/main/plot/*.m  $OCTAVEM/plot
cp -r $OCTAVEFORGE/main/set/*.m  $OCTAVEM/set
cp -r $OCTAVEFORGE/main/signal/*.m  $OCTAVEM/signal
cp -r $OCTAVEFORGE/main/sparse/*.m  $OCTAVEM/sparse
cp -r $OCTAVEFORGE/main/specfun/*.m  $OCTAVEM/specfun
cp -r $OCTAVEFORGE/main/special-matrix/*.m  $OCTAVEM/special-matrix
cp -r $OCTAVEFORGE/main/splines/*.m  $OCTAVEM/splines
cp -r $OCTAVEFORGE/main/statistics/*.m  $OCTAVEM/statistics
cp -r $OCTAVEFORGE/main/strings/*.m  $OCTAVEM/strings
cp -r $OCTAVEFORGE/main/struct/*.m  $OCTAVEM/struct
cp -r $OCTAVEFORGE/main/time/*.m  $OCTAVEM/time

GENERATE CYGWIN PACKAGE

VER=2.1.36
tar cvfj octave-$VER-gnuplot-octaveforge.tar.bz2 \
        /usr/bin/octave \
        /usr/bin/octave-$VER* \
        /usr/bin/octave-bug \
        /usr/bin/octave-bug-$VER* \
        /usr/bin/octave-config \
        /usr/bin/octave-config-$VER* \
        /usr/bin/mkoctfile \
        /usr/bin/mkoctfile-$VER* \
        /usr/bin/pgnuplot.exe \
        /usr/bin/wgnuplot.exe \
        /usr/info/octave.info* \
        /usr/man/man1/octave* \
        /usr/share/octave/site/ \
        /usr/share/octave/$VER/ \
        /usr/doc/octave-$VER/


## NOTES: These *.cc files are not included in this build
## for the following reasons
FIXES/kron.cc - I don't understand the rational for this fix

extra/linear-algebra/chol.cc
 - this doesn't seem complete to me - I'm reluctant to
   override the chol in octave for this

extra/mex/mex.cc
 - this is a staticaly linked build - so mex capability
   doesn't help

extra/tk_octave/tk_interp.cc
 - this is fairly complicated build - I don't know how
   to do this right now.

main/audio/aurecord.cc
main/audio/endpoint.cc
 - audio for octave on cygwin doesn't seem to work

main/geometry/__voronoi__.cc
main/geometry/convhulln.cc
main/geometry/delaunayn.cc
 - this depends on qhull - I haven't looked into this -
   I'm not sure if the extra size is worth it.

main/plot/grab.cc
main/plot/graphics.cc
main/plot/gtext.cc
main/plot/gzoom.cc
main/plot/ginput.cc
 - graphics functions are tied to X11 - we need some
   windows replacements

main/strings/regexp.cc
main/struct/getfield.cc
main/struct/setfield.cc
main/symbolic/differentiate.cc
main/symbolic/op-ex-mat.cc
main/symbolic/op-ex.cc
main/symbolic/op-sym.cc
main/symbolic/op-vpa.cc
main/symbolic/ov-ex-mat.cc
main/symbolic/ov-ex.cc
main/symbolic/ov-relational.cc
main/symbolic/ov-sym.cc
main/symbolic/ov-vpa.cc
main/symbolic/probably_prime.cc
main/symbolic/sym-bool.cc
main/symbolic/sym-create.cc
main/symbolic/symbols.cc
 - these depend on the GiNac library
    which is not included with octave-forge

nonfree/gpc/gpc_clip.cc
nonfree/gpc/gpc_create.cc
nonfree/gpc/gpc_get.cc
nonfree/gpc/gpc_is_polygon.cc
nonfree/gpc/gpc_read.cc
nonfree/gpc/gpc_tristrip.cc
nonfree/gpc/gpc_write.cc
nonfree/gpc/octave-gpc.cc
nonfree/splines/gcvspl.cc
 - I don't consider these licenses GPL compatible - so they
   can't be linked to octave

## NOTES: These directories of *m files are not included

extra/NaN
- overwrites octave stat functions - do we want this
extra/civil
- too specialized? seems perhaps incomplete
extra/engine
- won't work without DLD
extra/fake-sparse
- we have real sparse
extra/integration/test
extra/integration/testfun
- I think the test functions aren't necessary for the install
extra/linear-algebra
- All *.cc files
extra/mex
- won't work without DLD
extra/patches
- not applied for this package
extra/pdb
extra/pdb/bin
extra/pdb/data
- too specialized?
extra/perl
- too specialized? - needs to be installed into perl
extra/symband
- install except Example* files
extra/tk_octave
- won't work without DLD?
extra/ver20
- not for 2.1.* build
main/audio
main/audio/bin
main/audio/data
- can't make audio work under cygwin - yet
main/optim/doc
main/symbolic
main/symbolic/doc
- looks like quite a bit of work - later ...





-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]