grep biotech | more

A blog about my experiences with bioinformatics, operating systems, and random other technologies and bits.

Sunday, September 27, 2009

If you are trying to build libSBML, you may run into a problem similar to this.
As the post seems to indicate, building gcc with --disable-concept-checks should fix the problem. This is the case for libSBML. It seems that disabled concept checks may be the default for gcc; I am not sure why my gcc build had them enabled originally (I suppose it is a good idea if you only have to worry about your own code).

Tuesday, July 21, 2009

Monitor hardware faults in Solaris

I found the following script:
http://prefetch.net/code/fmadmnotifier

which makes use of Solaris' FMA service (Fault Management):
http://opensolaris.org/os/community/fm/

Really, it would be nice to have email notifications set up and easily configurable. I didn't want to mess with syslog-ng, as I wasn't sure where to start (I certainly didn't want everything it finds emailed to me).

As always, you'll want to test that your mail gets past SPAM filters - you can do this with mailx from the command line. I edited the script to use mailx -r my_reply_address to keep it consistent with my testing (since gmail initially did mark my tests as spam). I also tested the script in VirtualBox to verify that it works when a hard drive that is part of a zpool goes missing.

Saturday, December 20, 2008

Blender for Solaris X64 (Core2Duo)

Download: Blender Bundle

This is a rough build (no packages) of Blender 2.4.8a. Furthermore, it may only run on Intel Core2Duo systems, since I used -march=core2 and -mtune=core2 when building with gcc. This build was done without OpenAL; if you need this, let me know. All "make install"s for dependencies install in /usr/local, with the exception of blender itself, which does not appear to have a make install; instead, copy the directory to the desired location and create a script like the following to run Blender (say, at /usr/local/blender):


#!/bin/sh
LD_LIBRARY_PATH=/usr/gnu/lib/amd64:/usr/local/lib/amd64 /usr/local/blender-2.48a/obj/solaris-2.11-x86_64/bin/blender



You will also need to have libstdc++.so (64bit) on your system; see the post below on building gcc if you need this. If you use this or have any suggestions, please let me know.

Friday, September 5, 2008

Remove advertisement text from searched content

Web search engines, google's included, need to remove (by default anyway) any text that appears to be coming from an advertisement in the page from the searched text of the page. I could talk more about why, but I think this is obvious.

Wednesday, July 23, 2008

Equality of elements should imply equality of types

Unfortunately, few things are perfect. I'll leave it to someone else to tell me I'm wrong (or right?) here, but the following seems less than ideal:

sage: a = int('1')
sage: b = Integer('1')
sage: a == b
True
sage: type(a) == type(b)
False

I love Sage, so maybe I'll come back to this later when I have more time. Right now, I think that if type(a) is contained in type(b) *and* a == b, then type(a) == type(b) should return true. But this brings up interesting questions about what are types ... I'll edit this entry more later once I've read up on more type theory, more category theory, and sage/python type handling design (this could be a while!).

Saturday, August 4, 2007

Update 08/03/07

I've been doing a fair amount of coding lately, I don't feel like going in to details just yet. One project is CthughaNix, the resurrection of a great music visualization tool. Speaking of bring back things from the past, I started reading The Wheel of Time saga again, since there's only the last book left to be written. This was most likely a bad decision on my part as it is hard for me to put a book down and I'm fairly busy right now. The other project is work related – it is intended to be parametric alignment software eventually, but right now I'm finalizing regular global alignment and integrating it with EMBOSS.


Here's a SS of Cthughanix running in Solaris, but screen shots don't really do it justice:




Tuesday, July 3, 2007

GMP 4.2.1 on OS X 10.3.9

You don't want the same company that makes the iPhone to make your enterprise servers. Regardless, it seems I'm stuck with using a small OS X 10.3.9 cluster. We can't upgrade easily (I won't get in to the reasons, though some of them are partly Apple's fault of course), but suffice to say that despite having such a nice machine, we are stuck in the 32 bit land of the not so ancient OS X 10.3 and can't even get things like Java JDK 1.5 or 1.6 (an added incentive to upgrade to OS X 10.4 from Apple...).

At any rate, if you also have these problems (unlikely, but I know some of you are out there), here are the options I used to build GMP 4.2.1 with GCC 4.2.0 (prerelease):

CFLAGS and CXXFLAGS: -O3 -m32 -mcpu=7450 -mpowerpc -maltivec

make distclean && ./configure --enable-cxx ABI=32 && make && make check

Monday, July 2, 2007

Sun Consumer Products

Open Solaris isn't perfect for the end user yet, but it has a lot of potential. I'd like to show my support to Sun by buying something from them. There's the media kit, but even though I'm just wanting to show my support I think media kits are kind of useless since Open Solaris is updated so frequently. Star Office appears to be free with Open Solaris, so no need to buy that either. The one thing I found that appeared to be useful and affordable was a plugin for Open Office or Star Office that gives you bogging functionality within the office application. This isn't much, but it is only $10.00 and it is something I can use regularly.


What I'd really like to see is an Open Solaris User membership. Members could vote for new value added features and get some minimal amount of tech support. The tech support is secondary to me however, voting is what Open Solaris needs. I don't know of any commercially driven OS that has such a support option (then again, I'm not keen on every Linux or BSD distribution and I don't get paid to blog). I got the idea from Transgaming's Cedega. Transgaming holds a monthly poll for its subscribers, and subscribers get to cast as many votes as they have subscriptions. To me this seems like a great way to run a software business, and it would be great if someone employed the model for an operating system. I hope that someone will be Sun, though admittedly my hopes aren't high.


Saturday, June 30, 2007

The "simple" way to do things.

Who wants to make play lists or keep an alarm clock when you have your laptop with you 23/24 hours each day?

Say I want to find all the songs with bach or mozart in the title and loop through them. This (somewhat long) one-liner will do the trick:

echo `find ./ -name '*[B|b]ach*' -o -name '*[M|m]ozart*' | xargs -I song echo "'song'"` | xargs mplayer -loop 0

(substitute mplayer with your favorite command line music player) There is probably a shorter way of accomplishing the same thing. If you find such a way, please post it!


Setting an alarm is much simpler. If you want to get up in 8 hours,

bash-3.00$ bc
8*3600
28800
quit
bash-3.00$ sleep 28800 && mplayer Shared/George\ Michael\ wham\ -\ wake_me_up_before_you_go_go.mp4

If you have a more regular sleep schedule (but then, why would you be reading this?) you may find setting up a cron job to play a song more useful.

Tuesday, June 19, 2007

Useful Solaris tips for Linux Users

Since I'm coming from Linux, I thought it would be useful to start a long entry about Solaris tips for Linux users. I'll update this entry with new tips as I find them.

ldconfig and ld.so.conf solaris equivalents (taken from the blog of Chris Miles):

If you're a Linux admin on Solaris and are looking for the Solaris equivalent of ldconfig and /etc/ld.so.conf read on.

The command you are looking for is crle(1) - this is the equivalent of Linux's ldconfig but even more powerful. Read the man pages to crle for all the details. But here's a quick howto - how to add /usr/local/lib to the default ls.so.1 path. Run crle with no arguments to see the default paths.
mad[~] crle

Default configuration file (/var/ld/ld.config) not found
Default Library Path (ELF): /lib:/usr/lib (system default)
Trusted Directories (ELF): /lib/secure:/usr/lib/secure (system default)
Use crle -u -l /usr/local/lib to add /usr/local/lib to the default ld.so.1 path.
mad[~] sudo crle -u -l /usr/local/lib
Password:
mad[~] crle

Configuration file [version 4]: /var/ld/ld.config
Default Library Path (ELF): /lib:/usr/lib:/usr/local/lib
Trusted Directories (ELF): /lib/secure:/usr/lib/secure (system default)

Command line:
crle -c /var/ld/ld.config -l /lib:/usr/lib:/usr/local/lib
And that's it really. The configuration is stored in /var/ld/ld.config but crle should always be used to manipulate it. Hope that is useful.

08/11/07
prstat can be used instead of top, and is supposedly more robust.