| View previous topic :: View next topic |
| Author |
Message |
bonanit n00b

Joined: 27 Feb 2006 Posts: 54 Location: Catalonia
|
Posted: Wed Nov 22, 2006 5:39 pm Post subject: octave step function not working with gcc-4.1 |
|
|
I'm writing here cause the step function in Octave 2.1.73 (stable version) doesn't work for me when compiled with gcc-4.1.1, but I'm not sure if it's a problem with my pc or it's a bug.
I tried recompiling without any optimization flags, but the problem persisted, and finally solved it by emerging gcc-3.3.6 and re-emerging octave with it.
So, can anyone having octave compiled with gcc-4.1.1 try the following piece of code?
| Code: |
octave:1> G=tf(1,[1 1]);
octave:2> step(G);
|
What this simple code does is find the step response to a transfer function 1/(s+1). If it's working properly, you should get a graphic of the time response, but in my case when the second instruction was issued, the cpu got stuck with 100% usage.
Hope that someone can check this out. Thanks! |
|
| Back to top |
|
 |
didl Developer


Joined: 09 Sep 2003 Posts: 1106 Location: Pittsburgh, PA
|
Posted: Wed Nov 22, 2006 6:05 pm Post subject: |
|
|
Works for me .
Does gnuplot work just by itself? What is your emerge --info? |
|
| Back to top |
|
 |
bonanit n00b

Joined: 27 Feb 2006 Posts: 54 Location: Catalonia
|
Posted: Wed Nov 22, 2006 6:23 pm Post subject: |
|
|
The problem is not related to gnuplot because even if I tried [Y,T]=step(G), which returns the result into two vectors, it got stuck.
Anyway, here is my info:
| Code: |
tanelorn ~ # emerge --info
Portage 2.1.1-r1 (default-linux/x86/2006.1, gcc-4.1.1, glibc-2.4-r3, 2.6.17.6 i686)
=================================================================
System uname: 2.6.17.6 i686 AMD Athlon(tm) Processor
Gentoo Base System version 1.12.1
Last Sync: Mon, 20 Nov 2006 16:50:01 +0000
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: [Not Present]
dev-lang/python: 2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache: [Not Present]
dev-util/confcache: [Not Present]
sys-apps/sandbox: 1.2.17
sys-devel/autoconf: 2.13, 2.59-r7
sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils: 2.16.1-r3
sys-devel/gcc-config: 1.3.13-r3
sys-devel/libtool: 1.5.22
virtual/os-headers: 2.6.17-r1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=i686 -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-march=i686 -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.cites.uiuc.edu/pub/gentoo/ http://gentoo.modulix.net/gentoo/ ftp://darkstar.ist.utl.pt/pub/gentoo/ "
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 3dnow X alsa berkdb bitmap-fonts cdr cli cracklib crypt cups dlloader dri dvd dvdr dvdread elibc_glibc encode flac fortran gd gdbm gif gpm gtk2 iconv imap input_devices_keyboard input_devices_mouse isdnlog joystick jpeg kernel_linux libg++ mad mbox mmx mp3 mpeg ncurses nls nptl nptlonly nsplugin ogg opengl pam pcre pdf perl plotutils png ppds pppd python quicktime readline reflection session sndfile spl ssl svga tcpd tiff truetype truetype-fonts type1-fonts udev unicode userland_GNU video_cards_nvidia vorbis win32codecs xorg xprint xv xvid zlib"
Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
|
|
|
| Back to top |
|
 |
didl Developer


Joined: 09 Sep 2003 Posts: 1106 Location: Pittsburgh, PA
|
Posted: Wed Nov 22, 2006 7:09 pm Post subject: |
|
|
You emerge --info looks fine. Did you do a emerge -e system after
you upgraded to gcc-4.1.1? The problem could be in one
of the dependencies that octave pulls in. |
|
| Back to top |
|
 |
bonanit n00b

Joined: 27 Feb 2006 Posts: 54 Location: Catalonia
|
Posted: Wed Nov 22, 2006 11:01 pm Post subject: |
|
|
Mmm, it's an install from the 2006.1 cd, so everything should be compiled with gcc-4.1.1. Any other suggestion?
Anyway, if I'm the only one with this problem I wouldn't lose too much time on it, especially since it's working with an older gcc version.
Thanks for your help! |
|
| Back to top |
|
 |
rigo n00b


Joined: 10 Sep 2006 Posts: 17
|
Posted: Thu Nov 30, 2006 9:20 am Post subject: |
|
|
Hi!
| bonanit wrote: | | Anyway, if I'm the only one with this problem I wouldn't lose too much time on it, especially since it's working with an older gcc version. |
You're not alone! Same problem here.
I found a more interesting way to exploit this problem:
If you stop it with Ctrl+C after it's hung, and you give the command again, it gives an error message: | Code: | error: dgeev failed to converge
error: evaluating assignment expression near line 65, column 9
error: evaluating if command near line 62, column 5
error: evaluating if command near line 59, column 3
error: called from `roots' in file `/usr/share/octave/2.1.73/m/polynomial/roots.m' |
A funny thing is that the roots() function works perfectly with vectors of less than 4 elements, after it's hung the first time and has been interrupted.
I'm running the latest stable packages here. This system is a Centrino 1.5 GHz, and I tried to compile octave with just "-pipe" in my CFLAGS.
Oputput of my emerge --info:
| Code: | Gentoo Base System version 1.12.6
Portage 2.1.1-r2 (default-linux/x86/2006.1, gcc-4.1.1, glibc-2.4-r4, 2.6.18-gentoo-r3 i686)
=================================================================
System uname: 2.6.18-gentoo-r3 i686 Intel(R) Pentium(R) M processor 1.50GHz
Last Sync: Thu, 30 Nov 2006 00:50:01 +0000
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: 1.3.7, 2.0.30
dev-lang/python: 2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache: [Not Present]
dev-util/confcache: [Not Present]
sys-apps/sandbox: 1.2.17
sys-devel/autoconf: 2.13, 2.60
sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils: 2.16.1-r3
sys-devel/gcc-config: 1.3.13-r4
sys-devel/libtool: 1.5.22
virtual/os-headers: 2.6.17-r1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="ftp://ftp.solnet.ch/mirror/Gentoo http://mirror.mcs.anl.gov/pub/gentoo/ ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo "
LANG="en_US.UTF-8"
LINGUAS="en de it"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://snail.casa/gentoo-portage"
USE="x86 7zip X a52 aac aalib acpi alsa apache2 arts audiofile bash-completion bcmath berkdb bitmap-fonts bzip2 calendar cdparanoia cdr cli cracklib crypt cups curl dbus dga dio dlloader doc dri dts dv dvb dvd dvdr dvdread elibc_glibc emacs encode exif expat ffmpeg fftw firefox flac flash foomaticdb fortran ftp gd gdbm gif glut gmp gnutls gpm gtk gtk2 gtkhtml hal iconv icq ieee1394 imagemagick imap imlib input_devices_evdev input_devices_keyboard input_devices_mouse ipv6 isdnlog jabber java javascript jpeg jpeg2k kde kernel_linux ladspa lash ldap leim lesstif libcaca libg++ libwww linguas_de linguas_en linguas_it mad maildir matroska mbox mcal mikmod mime ming mmap mmx mng motif mp3 mpeg msn mysql ncurses nls nptl nptlonly nsplugin offensive ogg openal opengl osc oscar oss pam pcmcia pcntl pcre pdf perl php plotutils png pop portaudio posix ppds pppd python qt3 qt4 quicktime readline reflection samba sdl session sharedmem shorten skey slang sndfile sockets socks5 sox speex spell spl sqlite sse sse2 ssl startup-notification svg symlink sysvipc tcl tcpd tetex theora threads tidy tiff tk tokenizer truetype truetype-fonts type1-fonts udev unicode usb userland_GNU v4l vcd video_cards_apm video_cards_ark video_cards_ati video_cards_chips video_cards_cirrus video_cards_cyrix video_cards_dummy video_cards_fbdev video_cards_glint video_cards_i128 video_cards_i740 video_cards_i810 video_cards_imstt video_cards_mga video_cards_neomagic video_cards_nsc video_cards_nv video_cards_rendition video_cards_s3 video_cards_s3virge video_cards_savage video_cards_siliconmotion video_cards_sis video_cards_sisusb video_cards_tdfx video_cards_tga video_cards_trident video_cards_tseng video_cards_v4l video_cards_vesa video_cards_vga video_cards_via video_cards_vmware video_cards_voodoo videos vorbis wifi win32codecs wmf wxwindows xface xine xinerama xinetd xml xmlrpc xorg xosd xpm xprint xscreensaver xsl xv xvid yahoo zlib"
Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY |
I think we should file a bug... as soon as Bugzilla comes back on-line. _________________ rigo
http://rigo.altervista.org |
|
| Back to top |
|
 |
didl Developer


Joined: 09 Sep 2003 Posts: 1106 Location: Pittsburgh, PA
|
Posted: Thu Nov 30, 2006 1:34 pm Post subject: |
|
|
You might want to browse the octave list archives and post this issue
to their lists. It likely is an octave problem and there's probably
not too much we can do about it unless we can identify a patch
for it. Unfortunately, I can not reproduce it on any of my boxes hence
tracking this down is virtually impossible atm. |
|
| Back to top |
|
 |
didl Developer


Joined: 09 Sep 2003 Posts: 1106 Location: Pittsburgh, PA
|
Posted: Thu Nov 30, 2006 1:45 pm Post subject: |
|
|
Do you guys have lapack/blas installed on your boxes? If not, could
you please try emerging one of virtual/lapack and virtual/blas
(e.g. blas-reference, lapack-reference or blas-atlas, lapack-atlas)
and then recompile octave against these libs. |
|
| Back to top |
|
 |
rigo n00b


Joined: 10 Sep 2006 Posts: 17
|
Posted: Thu Nov 30, 2006 2:58 pm Post subject: |
|
|
| didl wrote: | | Do you guys have lapack/blas installed on your boxes? | None of them.
| Quote: | If not, could
you please try emerging one of virtual/lapack and virtual/blas
(e.g. blas-reference, lapack-reference or blas-atlas, lapack-atlas)
and then recompile octave against these libs. |
EDIT: virtual/lapack doesn't build!
These are the last lines:
| Code: | [...]
If you have problems during configure or installation, consult the file
'ATLAS/doc/TroubleShoot.txt'.
Are you ready to continue? [y]: Probing to make operating system determination:
Operating system configured as Linux
archinfo_x86.c: In function PrintUsage:
archinfo_x86.c:106: warning: incompatible implicit declaration of built-in function exit
archinfo_x86.c: In function main:
archinfo_x86.c:211: warning: incompatible implicit declaration of built-in function exit
make[2]: *** [atlas_run] Error 21
make[1]: *** [IRunx8664] Error 2
Probing for architecture:
make[2]: *** [atlas_run] Error 21
make[1]: *** [IRunx86Info] Error 2
make: *** [config] Error 255
*
* ATLAS auto-config failed.
* Please run 'interactive=1 emerge blas-atlas' to configure manually.
*
!!! ERROR: sci-libs/blas-atlas-3.7.11 failed.
Call stack:
ebuild.sh, line 1546: Called dyn_compile
ebuild.sh, line 937: Called src_compile
blas-atlas-3.7.11.ebuild, line 120: Called atlas_fail
blas-atlas-3.7.11.ebuild, line 74: Called die
|
_________________ rigo
http://rigo.altervista.org |
|
| Back to top |
|
 |
didl Developer


Joined: 09 Sep 2003 Posts: 1106 Location: Pittsburgh, PA
|
Posted: Thu Nov 30, 2006 3:43 pm Post subject: |
|
|
Try the reference ebuilds. The atlas based blas/lapack are nasty
beasts that sometimes fail to build on some CPUs (see bugzilla)
You are welcome to try the package.masked 3.7.19 versions.
They have been working fine for me on x86 for quite some time. But
be prepared for a lengthy compile. |
|
| Back to top |
|
 |
rigo n00b


Joined: 10 Sep 2006 Posts: 17
|
Posted: Thu Nov 30, 2006 4:47 pm Post subject: |
|
|
| didl wrote: | Try the reference ebuilds. The atlas based blas/lapack are nasty
beasts that sometimes fail to build on some CPUs (see bugzilla)
You are welcome to try the package.masked 3.7.19 versions.
They have been working fine for me on x86 for quite some time. But
be prepared for a lengthy compile. |
I didn't think that it could get so complicated...
In order to emerge that, I'm adding the following lines to my package.keywords:
| Code: | app-admin/eselect-blas ~x86
app-admin/eselect ~x86
app-admin/eselect-cblas ~x86
|
EDIT: after emerging /usr/portage/sci-libs/blas-atlas/blas-atlas-3.7.19.ebuild and re-emerging 0ctave with the "blas" USE flag, I still encounter the same problem.
I compiled octave with more "optimizing" CFLAGS: "-O2 -march=pentium-m -pipe". I'll now launch the emerge again, with only "-pipe" in CFLAGS. I'll tell you tomorrow (CEST) if anything changes.
I forgot to thank you for your help. So: thank you for your help, by now!
EDIT: It doesn't work! It shows always the same problem, also when compiled, with miminal CFLAGS, against libatlas. _________________ rigo
http://rigo.altervista.org |
|
| Back to top |
|
 |
rigo n00b


Joined: 10 Sep 2006 Posts: 17
|
Posted: Sat Dec 09, 2006 2:24 pm Post subject: |
|
|
A funny thing now happened: it seems like it's working!
This is what I've done:- roll-back the package.keywords editings
- uninstall blas & co.
- emerge "the interactive way" sci-libs/blas-atlas. stable version
- emerge "the interactive way" sci-libs/lapack-atlas, stable version
- emerge octave, stable version, with the "blas" USE flag
I re-emerged sci-libs/blas-atlas and sci-libs/lapack-atlas because I had to emerge scilab, who needed also some other packages, like app-text/sablotron
I'm quite confused now, about what was the reason of the problem. I'm glad that octave looks like it's working fine but, I can't tell why!  _________________ rigo
http://rigo.altervista.org |
|
| Back to top |
|
 |
didl Developer


Joined: 09 Sep 2003 Posts: 1106 Location: Pittsburgh, PA
|
Posted: Sat Dec 09, 2006 2:33 pm Post subject: |
|
|
I am glad it works now. In your previous trial octave might still have linked
against its internal lapack/blas. I've always linked against atlas and
never had any such problems. I'll have to look into this some more.
In case the octave's internal blas/lapack routines are broken it might be necessary
to have octave pull in virtual/blas and virtual/lapack by default instead of
making it optional. |
|
| Back to top |
|
 |
rigo n00b


Joined: 10 Sep 2006 Posts: 17
|
Posted: Sun Dec 10, 2006 12:04 pm Post subject: |
|
|
| didl wrote: | I am glad it works now. In your previous trial octave might still have linked
against its internal lapack/blas. | Actually, I'm not sure, because I could see some links to blas using ldd on the octave executable, when I tried first. But now it works, so... I don't know!
| Quote: | I've always linked against atlas and
never had any such problems. I'll have to look into this some more.
In case the octave's internal blas/lapack routines are broken it might be necessary
to have octave pull in virtual/blas and virtual/lapack by default instead of
making it optional. | I think this would be a nice idea. Much better than the other possibility, that is adding a dependency for the old gcc.
But, and this may be off-topic in this thread, I think that this would urge to find a way for those libraries to be emerged without needing user interaction.
Thank you again for your help and cooperation!  _________________ rigo
http://rigo.altervista.org |
|
| Back to top |
|
 |
bonanit n00b

Joined: 27 Feb 2006 Posts: 54 Location: Catalonia
|
Posted: Thu Dec 14, 2006 1:03 pm Post subject: |
|
|
Somehow the problem was solved for me as well a few days after my last post. Now I realize that somewhere in between I installed octave-forge, which requires blas and lapack, so that was probably what solved it.
Oh, and I've seen that you've already dropped the blas use flag in the latest testing revision of octave, so I suppose this problem is solved Thanks! |
|
| Back to top |
|
 |
didl Developer


Joined: 09 Sep 2003 Posts: 1106 Location: Pittsburgh, PA
|
Posted: Thu Dec 14, 2006 2:04 pm Post subject: |
|
|
| bonanit wrote: |
Oh, and I've seen that you've already dropped the blas use flag in the latest testing revision of octave, so I suppose this problem is solved Thanks! |
Let's hope so and you are welcome  |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|