|
From: | Jim Langston |
Subject: | Re: compiling with Sun Studio |
Date: | Wed, 29 Aug 2007 16:01:09 -0400 |
User-agent: | Thunderbird 1.5.0.8 (X11/20061204) |
Thanks John, that did the job - you wouldn't know what this means when
running the simple example: bash-3.00$ octave GNU Octave, version 2.9.13 Copyright (C) 2007 John W. Eaton and others. 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'. Octave was configured for "i386-pc-solaris2.11". 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 <address@hidden> (but first, please read http://www.octave.org/bugs.html to learn how to write a helpful report). For information about changes from previous versions, type `news'. octave:1> A = [ 1, 1, 2; 3, 5, 8; 13, 21, 34 ] A = 1 1 2 3 5 8 13 21 34 octave:2> B = rand (3, 2); octave:3> B B = 0.57366 0.93030 0.69102 0.30208 0.34980 0.91603 octave:4> 2 * A ans = 2 2 4 6 10 16 26 42 68 octave:5> A * B ans = 1.9643 3.0644 7.9745 11.6295 33.8624 49.5826 octave:6> A' * A ans = 179 289 468 289 467 756 468 756 1224 octave:7> A \ B warning: matrix singular to machine precision, rcond = 1.50423e-18 warning: attempting to find minimum norm solution ans = 0.86976 1.85329 -0.73387 -1.56583 0.13589 0.28746 octave:8> function xdot = f (x, t) > r = 0.25; > k = 1.4; > a = 1.5; > b = 0.16; > c = 0.9; > d = 0.8; > xdot(1) = r*x(1)*(1 - x(1)/k) - a*x(1)*x(2)/(1 + b*x(1)); > xdot(2) = c*a*x(1)*x(2)/(1 + b*x(1)) - d*x(2); > endfunction octave:9> x0 = [1; 2]; octave:10> octave:10> t = linspace (0, 50, 200)'; octave:11> x = lsode ("f", x0, t); octave:12> plot (t, x) line 0: undefined variable: title Cannot open load file '--version' line 0: (No such file or directory) error: Version numbers must be a single row error: evaluating if command near line 73, column 3 error: called from `compare_versions' in file `/usr/local/share/octave/2.9.13/m/miscellaneous/compare_versions.m' error: evaluating static command near line 35, column 5 error: evaluating if command near line 29, column 3 error: called from `__go_draw_axes__' in file `/usr/local/share/octave/2.9.13/m/plot/__go_draw_axes__.m' error: evaluating switch command near line 57, column 4 error: evaluating for command near line 55, column 2 error: evaluating if command near line 37, column 7 error: evaluating if command near line 30, column 5 error: evaluating if command near line 29, column 3 error: called from `__go_draw_figure__' in file `/usr/local/share/octave/2.9.13/m/plot/__go_draw_figure__.m' error: evaluating if command near line 61, column 6 error: evaluating if command near line 58, column 4 error: evaluating if command near line 56, column 2 error: evaluating for command near line 55, column 7 error: evaluating if command near line 38, column 5 error: called from `drawnow' in file `/usr/local/share/octave/2.9.13/m/plot/drawnow.m' octave:13> exit Anyway - off to look at this. Thanks again. Jim //////////////////////// John W. Eaton wrote: On 29-Aug-2007, Jim Langston wrote: | Don't know exactly what I need to do, I have looked at re-writing | the class, but before I do, I wanted to make sure no one has attempted | to get octave compiled with the Sun Studio compilers. | | stlport4 tells the Sun compiler to use STLport's implementation of the | standard library, which seems to be ok with the cast as written. | | I have tried this: | | class pid_equal | { | public: | | pid_equal (pid_t v) : val (v) { } | | bool operator () (const octave_child& oc) const { return oc.pid == val; } | bool operator () (const pid_equal& pid) const { return pid == val ; } | | private: | | pid_t val; | }; | | but this generates: | | "sighandlers.cc", line 892: Error: Overloading ambiguity between | "operator==(const octave_int<long long>&, const octave_int<unsigned>&)" | and "operator==(const octave_int<unsigned>&, const octave_int<char>&)". I don't think a simple modification to the pid_equal class is going to fix the problem you are seeing. Earlier, you wrote It is in sighandlers.cc, and I get this error: "./base-list.h", line 45: Error: Cannot cast from pid_equal to bool(*)(const octave_child&). so it seems that the remove_if function in the default library is expecting a function pointer rather than a predicate class. I don't think that's the standard definition of remove_if. How about the following patch? jwe -- ///////////////////////////////////////////// Jim Langston Sun Microsystems, Inc. (877) 854-5583 (AccessLine) AIM: jl9594 address@hidden |
[Prev in Thread] | Current Thread | [Next in Thread] |