How to make Octave build and run natively on Windows?

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

How to make Octave build and run natively on Windows?

Ole Jacob Hagen-3
Hi.

I believe I saw posting regarding the same topic, but I don't remember
when these postings were posted.
Since I'm lazy, I write another posting regarding this infamous topic:
Octave on Windows.

We have tested Octave on Windows within cygwin environment. And the
conclusion is not very good, since the performance is very poor,
compared to Octave on Linux.

What is neccessary to build Octave with e.g MSVC, besides removing the
readline related files?
What files is handling the readline stuff?

If someone has started to build octave with MSVC, MingW and to run
Octave natively within Windows, please let me know. I would help, or
start such a process, but need more information about which files, that
needs some reworking, and so on.

Have a nice weekend, Octavers.


Cheers,

Ole J.



Reply | Threaded
Open this post in threaded view
|

Re: How to make Octave build and run natively on Windows?

David Bateman-3
Ole,

You should look at the mail from my colleague Laurent Mazet on the 26th
of October about a build under MingW

http://www.octave.org/mailing-lists/octave-maintainers/2004/783

He successfully built octave under MingW, though he didn't inlcude
readline more throuh accident than anything else, and there was a
namespace clash with the Array in one of the MingW files. There is
also some doubt whether the dynamically linked oct-files are usuable,
since he forced them to be in liboctinterp by hand...

I'd be intrested to hear you results, since we are really missing a
Windows release now that 2.1.63 has been declared as testing...

Regards
David

--
David Bateman                                [hidden email]
Motorola CRM                                 +33 1 69 35 48 04 (Ph)
Parc Les Algorithmes, Commune de St Aubin    +33 1 69 35 77 01 (Fax)
91193 Gif-Sur-Yvette FRANCE

The information contained in this communication has been classified as:

[x] General Business Information
[ ] Motorola Internal Use Only
[ ] Motorola Confidential Proprietary


Reply | Threaded
Open this post in threaded view
|

How to make Octave build and run natively on Windows?

John W. Eaton-6
In reply to this post by Ole Jacob Hagen-3
On 19-Nov-2004, Ole Jacob Hagen <[hidden email]> wrote:

| We have tested Octave on Windows within cygwin environment. And the
| conclusion is not very good, since the performance is very poor,
| compared to Octave on Linux.

What part of the performance is bad?  Do you have numbers?

| What is neccessary to build Octave with e.g MSVC, besides removing the
| readline related files?
| What files is handling the readline stuff?

You don't have to remove any files to build without readline.  Try
running configure --help and you should find how to disable readline.

| If someone has started to build octave with MSVC, MingW and to run
| Octave natively within Windows,

What does it mean to run "natively within Windows"?

Suppose that instead of having Cygwin as a separate library, we
included all the functionality we needed inside Octave itself.  Then
would you consider Octave to be running "natively within Windows" even
though the mechanisms it uses to communicate with the OS would be
exactly the same?  But why should we have to duplicate all that when
Cygwin exists precisely for this purpose?

Is it just that you object to having Cygwin?  Suppose you buy some
proprietary binary only software and install it on your Windows
system.  It could come with any number of crufty DLL files that do who
knows what behind the scenes, and you would never know or probably
care.  What makes Cygwin different?

The only significant issue that I see is that we have some filename
handling problems that make Octave on Windows systems work in ways
that surprise Windows users.  But I think that could be solved without
having to eliminte Cygwin entirely.

jwe


Reply | Threaded
Open this post in threaded view
|

Re: How to make Octave build and run natively on Windows?

Andy Adler
In reply to this post by Ole Jacob Hagen-3
On Fri, 19 Nov 2004, Ole Jacob Hagen wrote:

> What is neccessary to build Octave with e.g MSVC, besides removing the
> readline related files?
> What files is handling the readline stuff?

Octave does not get on well with MSVC at all. I have one application
where I need to build an *oct file which links to an MFC based dll
to automate some testing. The link to the MFC dll needs to be built
with MSVC, but I needed to create another 'layer' of dynimic libraries
to link it to octave.

One issue was that 'windows.h' conflicts badly with the octave headers.
MSVC _really_ seems to want to include 'windows.h'.

Another issue is that MSVC compliance to C++ is (charitably) not good.

I don't think this one is worth the effort.
--
Andy Adler


Reply | Threaded
Open this post in threaded view
|

Re: How to make Octave build and run natively on Windows?

Paul Thomas-10
In reply to this post by John W. Eaton-6
> What part of the performance is bad?  Do you have numbers?
>

I have dual boot system XP + RH9, which was originally intended to
circumvent the "bad performance" of Cygwin.  Barring the much reported
carry-on with certain versions of gcc, cpu intensive applications are
sometimes faster under Cygwin than under RH9; not by much but a whisker or
so.  I think, although I have never made a quantitative comparison, that I/O
operations are slower on Cygwin.  Scripting operations, such as make, are
famously so.  Next time I build octave, I will time both builds.  I would
guess that there is a factor of two in it.

I now use Cygwin/XP nearly all the time and RH9 for checking software.

> system.  It could come with any number of crufty DLL files that do who
> knows what behind the scenes, and you would never know or probably
> care.  What makes Cygwin different?
>

Exactly!  Paul K's releases show just how little of Cygwin is needed for a
viable octave. ( Note to self - an API to mingw might be handy.......)

> The only significant issue that I see is that we have some filename
> handling problems that make Octave on Windows systems work in ways
> that surprise Windows users.  But I think that could be solved without
> having to eliminte Cygwin entirely.
>

One can easily learn to live with these "surprises".  Although, to begin
with, I was in Ole's camp, working continuously with Cygwin has proven to be
very easy.  Just tonight, I was doing benchmark comparisons of gfortran and
Digital f90, with an editor in Windows and Cygwin running the two
compilers - no sweat!

I agree with you John.

Paul T


Reply | Threaded
Open this post in threaded view
|

Re: How to make Octave build and run natively on Windows?

Laurent Mazet-6
In reply to this post by Ole Jacob Hagen-3
Helo,

As sugested Ole, I run the Octave2 test from
http://www.sciviews.org/other/benchmark.htm on my MinGW Octave to evaluate
the performance of the build. The CPU is a AMD Duron 800MHz, 384MB,
Windows 2000-SP4 and I got this:

$ octave -f Octave2.m
GNU Octave, version 2.1.60 (i686-pc-mingw32).
Copyright (C) 2004 John W. Eaton.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTIBILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type `warranty'.

Additional information about Octave is available at http://www.octave.org.

Please contribute if you find this software useful.
For more information, visit http://www.octave.org/help-wanted.html

Report bugs to <[hidden email]> (but first, please read
http://www.octave.org/bugs.html to learn how to write a helpful report).

   Octave Benchmark 2
   ==================
Number of times each test is run__________________________: 3
 
   I. Matrix calculation
   ---------------------
Creation, transp., deformation of a 1500x1500 matrix (sec): 2.922
800x800 normal distributed random matrix ^1000______ (sec): 4.237
Sorting of 2,000,000 random values__________________ (sec): 3.36
700x700 cross-product matrix (b = a' * a)___________ (sec): 15.05
Linear regression over a 600x600 matrix (c = a \ b') (sec): 3.011
                  ------------------------------------------------------
                Trimmed geom. mean (2 extremes eliminated): 3.5
 
   II. Matrix functions
   --------------------
FFT over 800,000 random values______________________ (sec): 2.154
Eigenvalues of a 320x320 random matrix______________ (sec): 2.627
Determinant of a 650x650 random matrix______________ (sec): 3.964
Cholesky decomposition of a 900x900 matrix__________ (sec): 3.493
Inverse of a 400x400 random matrix__________________ (sec): 2.838
                  ------------------------------------------------------
                Trimmed geom. mean (2 extremes eliminated): 2.964
 
   III. Programmation
   ------------------
750,000 Fibonacci numbers calculation (vector calc)_ (sec): 11.15
Creation of a 2250x2250 Hilbert matrix (matrix calc) (sec): 1.768
Grand common divisors of 70,000 pairs (recursion)___ (sec): 1.585
Creation of a 220x220 Toeplitz matrix (loops)_______ (sec): 3.315
Escoufier's method on a 37x37 matrix (mixed)________ (sec): 7.21
                  ------------------------------------------------------
                Trimmed geom. mean (2 extremes eliminated): 3.483
 
 
Total time for all 15 tests_________________________ (sec): 68.68
Overall mean (sum of I, II and III trimmed means/3)_ (sec): 3.306
                      --- End of test ---


By the way, I realized that the kpathsearch doesn't work properly and I
have to source all the used functions:
%%%% Shell function
%% function get () {
%%  f="$1".m; find /usr/local/share/octave/2.1.60/m/ -name $f -exec cp {}
 \;
%%  sed 's/\(libs={\)/\1"'$1'"; /' Octave2.m >t
%%  mv -f t Octave2.m
%% }
libs={"trace"; "cov"; "corrcoef"; "gcd2"; "strcmp"; "mean"; "rem";
"is_leap_year"; "isvector"; "etime"; "clock"; "toc"; "tic"; "findstr";
"split"; "rows"; "setstr"; "isscalar"; "columns"; "repmat"; "deblank";
"strcat"; "isstr"; "num2str"};
for n=1:length(libs);
  source([libs{n}, ".m"]);
endfor

On the same computer, I run the standard Octave2.m test on octave 2.1.50a
from  http://octave.sf.net i.e. with octave-forge and a blas optimzed for
PIII (some segfault on my Duron :-( ):

GNU Octave, version 2.1.50 (i686-pc-cygwin).
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 John W.
Eaton.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTIBILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type `warranty'.

Please contribute if you find this software useful.
For more information, visit http://www.octave.org/help-wanted.html

Report bugs to <[hidden email]>.

>> source("Octave2.m")

   Octave Benchmark 2
   ==================
Number of times each test is run__________________________: 3
 
   I. Matrix calculation
   ---------------------
Creation, transp., deformation of a 1500x1500 matrix (sec): 3.918
800x800 normal distributed random matrix ^1000______ (sec): 0.811
Sorting of 2,000,000 random values__________________ (sec): 16.45
700x700 cross-product matrix (b = a' * a)___________ (sec): 14.87
Linear regression over a 600x600 matrix (c = a \ b') (sec): 2.964
                  ------------------------------------------------------
                Trimmed geom. mean (2 extremes eliminated): 5.569
 
   II. Matrix functions
   --------------------
FFT over 800,000 random values______________________ (sec): 1.571
Eigenvalues of a 320x320 random matrix______________ (sec): 6.769
Determinant of a 650x650 random matrix______________ (sec): 3.774
Cholesky decomposition of a 900x900 matrix__________ (sec): 3.201
Inverse of a 400x400 random matrix__________________ (sec): 2.411
                  ------------------------------------------------------
                Trimmed geom. mean (2 extremes eliminated): 3.077
 
   III. Programmation
   ------------------
750,000 Fibonacci numbers calculation (vector calc)_ (sec): 1.979
Creation of a 2250x2250 Hilbert matrix (matrix calc) (sec): 1.322
Grand common divisors of 70,000 pairs (recursion)___ (sec): 1.426
Creation of a 220x220 Toeplitz matrix (loops)_______ (sec): 3.596
Escoufier's method on a 37x37 matrix (mixed)________ (sec): 6.195
                  ------------------------------------------------------
                Trimmed geom. mean (2 extremes eliminated): 2.165
 
 
Total time for all 15 tests_________________________ (sec): 71.26
Overall mean (sum of I, II and III trimmed means/3)_ (sec): 3.335
                      --- End of test ---
 
Cheers,

     Laurent
--
Dr. Laurent Mazet    -=-  /Use the source, Luke/  -=-  
[hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: How to make Octave build and run natively on Windows?

John W. Eaton-6
On 19-Nov-2004, Laurent Mazet <[hidden email]> wrote:

| As sugested Ole, I run the Octave2 test from
| http://www.sciviews.org/other/benchmark.htm on my MinGW Octave to evaluate

If I'm looking at the same benchmark that you used, then it uses tic
and toc for timing, which is not reliable because it measures
wall-clock time and that can be affected by other processes running on
your system when you run the tests.

| By the way, I realized that the kpathsearch doesn't work properly and I
| have to source all the used functions:
| %%%% Shell function
| %% function get () {
| %%  f="$1".m; find /usr/local/share/octave/2.1.60/m/ -name $f -exec cp {}
|  \;
| %%  sed 's/\(libs={\)/\1"'$1'"; /' Octave2.m >t
| %%  mv -f t Octave2.m
| %% }
| libs={"trace"; "cov"; "corrcoef"; "gcd2"; "strcmp"; "mean"; "rem";
| "is_leap_year"; "isvector"; "etime"; "clock"; "toc"; "tic"; "findstr";
| "split"; "rows"; "setstr"; "isscalar"; "columns"; "repmat"; "deblank";
| "strcat"; "isstr"; "num2str"};
| for n=1:length(libs);
|   source([libs{n}, ".m"]);
| endfor

Can you investigate what might be causing this?  There is extensive
tracing code in the path searching functions that you can enable.

| On the same computer, I run the standard Octave2.m test on octave 2.1.50a
| from  http://octave.sf.net i.e. with octave-forge and a blas optimzed for
| PIII (some segfault on my Duron :-( ):

If the BLAS is optimized for PIII, then couldn't that be the reason
that you are seeing different results rather than it being linked with
Cygwin?  It seems to me that we need a comparison where the only
difference is Cygwin vs. no Cygwin.

jwe


Reply | Threaded
Open this post in threaded view
|

Re: How to make Octave build and run natively on Windows?

Laurent Mazet-7
"John W. Eaton" <[hidden email]> said:
> On 19-Nov-2004, Laurent Mazet <[hidden email]> wrote:
..
> | On the same computer, I run the standard Octave2.m test on octave 2.1.50a
> | from  http://octave.sf.net i.e. with octave-forge and a blas optimzed for
> | PIII (some segfault on my Duron :-( ):
>
> If the BLAS is optimized for PIII, then couldn't that be the reason
> that you are seeing different results rather than it being linked with
> Cygwin?  It seems to me that we need a comparison where the only
> difference is Cygwin vs. no Cygwin.

Same benchmaks on octave 2.1.49 CygWin from ftp://ftp.octave.org

   Octave Benchmark 2
   ==================
Number of times each test is run__________________________: 3

   I. Matrix calculation
   ---------------------
Creation, transp., deformation of a 1500x1500 matrix (sec): 3.996
800x800 normal distributed random matrix ^1000______ (sec): 0.7217
Sorting of 2,000,000 random values__________________ (sec): 15.36
700x700 cross-product matrix (b = a' * a)___________ (sec): 14.45
Linear regression over a 600x600 matrix (c = a \ b') (sec): 2.951
                  ------------------------------------------------------
                Trimmed geom. mean (2 extremes eliminated): 5.544

   II. Matrix functions
   --------------------
FFT over 800,000 random values______________________ (sec): 1.582
Eigenvalues of a 320x320 random matrix______________ (sec): 6.713
Determinant of a 650x650 random matrix______________ (sec): 3.755
Cholesky decomposition of a 900x900 matrix__________ (sec): 3.092
Inverse of a 400x400 random matrix__________________ (sec): 2.367
                  ------------------------------------------------------
                Trimmed geom. mean (2 extremes eliminated): 3.018

   III. Programmation
   ------------------
750,000 Fibonacci numbers calculation (vector calc)_ (sec): 1.987
Creation of a 2250x2250 Hilbert matrix (matrix calc) (sec): 4.368
Grand common divisors of 70,000 pairs (recursion)___ (sec): 1.126
Creation of a 220x220 Toeplitz matrix (loops)_______ (sec): 4.251
Escoufier's method on a 37x37 matrix (mixed)________ (sec): 6.555
                  ------------------------------------------------------
                Trimmed geom. mean (2 extremes eliminated): 3.329


Total time for all 15 tests_________________________ (sec): 73.27
Overall mean (sum of I, II and III trimmed means/3)_ (sec): 3.819
                      --- End of test ---


--
Dr. Laurent Mazet    -=-  /Use the source, Luke/  -=-  
[hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: How to make Octave build and run natively on Windows?

Laurent Mazet-7
"John W. Eaton" <[hidden email]> said:

> On 19-Nov-2004, Laurent Mazet <[hidden email]> wrote:
> ..
> | On the same computer, I run the standard Octave2.m test on octave 2.1.50a
> | from  http://octave.sf.net i.e. with octave-forge and a blas optimzed for
> | PIII (some segfault on my Duron :-( ):
>
> If the BLAS is optimized for PIII, then couldn't that be the reason
> that you are seeing different results rather than it being linked with
> Cygwin?  It seems to me that we need a comparison where the only
> difference is Cygwin vs. no Cygwin.
 
Same benchmaks on octave 2.1.60 CygWin compiled by myself with gcc 3.3.1.
If someone have an archive of gcc 3.2.3, I can rebuild with it to be fair

   Octave Benchmark 2
   ==================
Number of times each test is run__________________________: 3

   I. Matrix calculation
   ---------------------
Creation, transp., deformation of a 1500x1500 matrix (sec): 2.751
800x800 normal distributed random matrix ^1000______ (sec): 0.8403
Sorting of 2,000,000 random values__________________ (sec): 3.69
700x700 cross-product matrix (b = a' * a)___________ (sec): 14.85
Linear regression over a 600x600 matrix (c = a \ b') (sec): 3.016
                  ------------------------------------------------------
                Trimmed geom. mean (2 extremes eliminated): 3.128

   II. Matrix functions
   --------------------
FFT over 800,000 random values______________________ (sec): 1.731
Eigenvalues of a 320x320 random matrix______________ (sec): 2.604
Determinant of a 650x650 random matrix______________ (sec): 3.733
Cholesky decomposition of a 900x900 matrix__________ (sec): 3.169
Inverse of a 400x400 random matrix__________________ (sec): 2.424
                  ------------------------------------------------------
                Trimmed geom. mean (2 extremes eliminated): 2.714

   III. Programmation
   ------------------
750,000 Fibonacci numbers calculation (vector calc)_ (sec): 2.023
Creation of a 2250x2250 Hilbert matrix (matrix calc) (sec): 2.019
Grand common divisors of 70,000 pairs (recursion)___ (sec): 2.683
Creation of a 220x220 Toeplitz matrix (loops)_______ (sec): 20.25
Escoufier's method on a 37x37 matrix (mixed)________ (sec): 20.49
                  ------------------------------------------------------
                Trimmed geom. mean (2 extremes eliminated): 4.79

Total time for all 15 tests_________________________ (sec): 86.27
Overall mean (sum of I, II and III trimmed means/3)_ (sec): 3.439
                      --- End of test ---
--
Dr. Laurent Mazet    -=-  /Use the source, Luke/  -=-  
[hidden email]