does anyone knows how the ulimit
bash (or whatever shell you like) command works? i’m currently running a few instances of the same program on a big server, and it happened yesterday twice that the programs together ate up all available memory (some of the instances using much more than others). there was a hard ulimit
set on memory, and the result was that all these processed were killed. not just the one violating the memory limit in that moment.
this sucks pretty much, since this destroyed some cpu days of work. does anyone knows why ulimit
is doing this? i assume that the rationale is to stop fork bombs, but in this case this is really, really annoying. killing one of the processes would have been perfectly enough…
so, if anyone has good documentation on how ulimit
works, whether it is possible to change this behaviour, and whether this is actually intended or a bug, i would like to hear about it…
tonight i attended a performance of the trans-siberian orchestra here in zürich, where they played their 2000 album beethoven’s last night in its entirely, and some more songs, among them one of my favorites, grieg’s hall of the mountain king. it was an awesome show, really worth its money. i’m still surprised that i didn’t heard about this band before… i took a few pics with my mobile phone; the quality sucks, but you can get an idea of how it looked like:
interestingly, there are already the first recordings online on youtube:
unfortunately, jon oliva couldn’t make it for this tour…
in the last weeks, i had to compile several libraries for our ultrasparc machine running solaris (sunos 5.10). in particular, these libraries were gmp, atlas, iml, ntl and boost. i wanted to use the sun studio c/c++ compiler (cc
has version 5.8, CC
has version 5.9) instead of gcc/g++. moreover, i need 64 bit versions of everything, since my programs need a lot of memory. (the machine has around 140 gb of ram anyway, so it makes a lot of sense.)
since it was somewhat troublesome to get everything running (atleast running enough so that i could use what i needed), i want to describe the process of compiling everything here. maybe this is useful for someone…
i compile everything into my home directory, /home/felix
. i also use stlport4
instead of the sun studio standard c++ stl, since i couldn’t figure out how to compile boost with the usual stl. the code generated will not be portable, but should be fast.
gmp.
for configuration and compilation, i did the following:
$ export CC=cc
$ export CXX=CC
$ export CFLAGS=’-m64 -fast -xO3 -xarch=native64 -xchip=native -xcache=native’
$ export CXXFLAGS=’-m64 -fast -xO3 -xarch=native64 -xchip=native -xcache=native -library=stlport4′
$ ./configure –prefix=/home/felix
$ gmake
$ gmake check
$ gmake install
$ gmake distclean
i didn’t add the –enable-cxx
switch for configure
, since this didn’t work and i didn’t need it. note that i chose the optimization level -xO3
instead of -xO4
or -xO5
since otherwise some of the checks failed. you can try a higher level, but i urge you to run gmake check
and reduce the level when checks fail.
atlas.
to build atlas, i proceeded as follows. you can replace mybuilddir
with any other sensible name; that directory will contain all build specific files for that machine. note that atlas does some profiling to determine which methods are fastest, so it is better to not have anything else running on the machine while building atlas. i didn’t build the fortran parts of the library (by –nof77
), as well as the fortran tests, since i couldn’t get them to link correctly. (one probably has to set FFLAGS
or however the corresponding variable is called…)
$ mkdir mybuilddir
$ cd mybuilddir
$ export CC=cc
$ export CFLAGS=’-m64 -fast -xarch=native64 -xchip=native -xcache=native’
$ ../configure –nof77 –prefix=/home/felix –cc=cc –cflags=’-m64 -fast -xarch=native64 -xchip=native -xcache=native’
$ gmake
$ gmake check
$ gmake ptcheck
$ gmake time
$ gmake install
$ cd ..
iml.
building iml is rather easy. it needs both gmp and atlas.
$ export CC=cc
$ export CFLAGS=’-m64 -fast -xarch=native64 -xchip=native -xcache=native’
$ ./configure –prefix=/home/felix –with-gmp-include=/home/felix/include –with-atlas-include=/home/felix/include –with-gmp-lib=/home/felix/lib –with-atlas-lib=/home/felix/lib
$ gmake
$ gmake check
$ gmake install
ntl.
buliding ntl is a bit more complicated. it requires that gmp is already built. the whole process is more complicated since on our machine, a little tool called MakeDesc
called at the beginning of the build process hangs. the problem lies in src/MakeDesc.c
, when the main program calls DoublePrecision1(one)
in order to find out the (internal) precision of double
registers. if i replace the line
dp1 = DoublePrecision1(one);
by
dp1 = dp;
the whole process works perfectly – though maybe some things will not be 100% correct in the end. (but i’m willing to take that risk.)
$ cd src
$ export CC=cc
$ export CXX=CC
$ export CFLAGS=’-m64 -fast -xarch=native64 -xchip=native -xcache=native’
$ export CXXFLAGS=’-m64 -fast -xarch=native64 -xchip=native -xcache=native -library=stlport4′
$ export LDFLAGS=’-R/home/felix/lib -library=stlport4′
$ ./configure PREFIX=/home/felix CC=cc CXX=CC CFLAGS=’-m64 -fast -xarch=native64 -xchip=native -xcache=native’ CXXFLAGS=’-m64 -fast -xarch=native64 -xchip=native -xcache=native -library=stlport4′ LDFLAGS=’-R:/home/felix/lib’ NTL_GMP_LIP=on GMP_PREFIX=/home/felix
$ gmake
$ gmake check
$ gmake install
$ cd ..
boost.
finally, i had to compile boost. after a lot of trying and fiddling, i found out that these calls seem to work:
$ ./bootstrap.sh –prefix=/home/felix –show-libraries –with-toolset=sun –with-libraries=iostreams
$ ./bjam –prefix=/home/felix toolset=sun –with-iostreams threading=multi address-model=64 link=static install
note that i only build the iostreams
library of boost. remove the –with-libraries=iostreams
to (try to) build all libraries.
conclusion.
yes, the whole process is pretty much a pain in the ass. just installing the packages with apt-get
on some debian-based linux, or compiling them from scratch on a gcc/g++ based linux, is just sooo much easier. but then, if you have a solaris machine standing around, why not use it to crunch some numbers for you? :-) (especially since currently, i essentially have the machine for myself.)
to compile my code, i use
$ CC -I/home/felix/include -m64 -fast -xarch=native64 -xchip=native -xcache=native -c -library=stlport4 object files and so on;
to link, i do
$ CC -m64 -fast -xarch=native64 -xchip=native -xcache=native -L/home/felix/lib -R/home/felix/lib -library=stlport4 -lntl -liml -lcblas -latlas -lgmp -lm -lboost_iostreams -lz object files and so on.
a week ago i attended a concert at the z-7. the first time since over two years. this concert featured five bands, starting at 18:30. i took the train to arrive at the hall at 19:00, and the first band was already done. the second was done pretty fast as well, but nonetheless this wasn’t a good start since the last train was leaving around midnight and i had to plan in a certain time to reach the train station. (in addition, the last train ride which doesn’t involve walking at least half an hour through zürich leaves around 23:00.)
anyway. i didn’t like the second band very much (maybe less than the first, if i’d heard more of the first band…) the third band, psychotic waltz, a progressive metal band from california, was pretty nice. i haven’t heard of them, which isn’t that much a surprise since they disbanded around 1998, and only recently came back together. i guess i have to check out more of their music at some point later.
after psychotic waltz, one of my most favorite bands entered the stage: nevermore. this is the second time i ever saw them. they played for one hour, including many songs from one of my favorite albums, dead heart from a dead world. unfortunately they didn’t continue playing for another hour or so :-) i really miss the good old times when concerts had at most two or maybe three bands, and the bands had much more time to play…
finally, symphony x started playing. i’ve already seen them twice, in 2007 and 2008. unfortunately, i could only listen to maybe half their set, since i had to leave for the train… they played a bit stuff from their upcoming album, iconoclast. let’s see how the whole thing will sound…
this concert was really nice… except that i had to leave before it was done. i really hade this trent to throw that many bands together, and i’m saying this at more and more concerts – since it’s happening really often, and is really annoying. something very positive about this concert is that the z-7 is now smokefree! there’s still a bit of smoke coming in from outside, but the air inside is much better than it was two years ago. this way, going to concerts is much more fun!
while producing last week’s project 52 photo (which i did in fact today), i threw together a few collages. the first one is a collection of flames:
the second one shows the process of breaking a heart. from a full, nice, unused wonderful heart to broken pieces:
the third one is chocolate related: a chocolate heart being eaten. piece for piece.
here’s my project 52 shot for the ninth week. the topic was
fire and shade… a strong contrast, allowing the beholder to only see some details, shrouded in black, while being dazzled by the source of light.
please click the photo to get a larger version:
technical details: 1/30s, f/10, 105mm, iso 200; modified using gimp.
for my eighth project 52 photo i took apart a hard disk and made some macro shots. of course, especially since these are my first macro shots, this resulted in a few more shots. in case you’re interested, here are some more:
thanks a lot to the ones who provided me with the (already dead, before opening it up) hard disk! i hope they’ll like the pictures as well…
here’s my project 52 shot for the eighth week. the topic was
i know, this photo comes a bit late, but i had to wait for a new gadget to do this photo. the idea is already a few weeks old :-) harddisks are a piece of computer equipment which can be friend or foe: they store your data, your photos, your videos, your music, for a long time, fast to access. but sometimes, they suffer from head crashes or other fatal injuries, and your data, your photos, your whatever is gone. sometimes it can be recovered, sometimes not. essentially everyone who has been working with computers had a harddisk failure somewhen, i’m sure. i had several. some of them really kicked me in the ass, since i didn’t had a current backup. (this is also the reason why i don’t have any photos from a longer period many years ago…) nowadays, i have a pretty redundant system of backups, so this shouldn’t happen anymore. but who knows… there is no absolute error tolerance. the disk in the photo is pretty much dead, not only since it is open, but already covered by lots of dust, in just a short period of time. dust on the platter is an absolute killer…
please click the photo to get a larger version:
technical details: 15s, f/45, 105mm, iso 200.
yesterday, i spent over 15 hours on various trains in switzerland. i started at 6 am at the main station in zürich and proceeded to zermatt via visp. in zermatt, i explored the city a bit in the 45 minutes i had, and got back to the train station to get on the glacier express, departing 10 am, which eventually led me to st. moritz. the glacier express is one of the famous panoramic train lines in switzerland, similar to the golden pass panoramics tour i did a couple of years ago, leading through the alps, peaking in oberalbpass at 2033 meters above sea level. the weather was mostly beautiful, except a lot of fog around chur. i had the three course meal on the train, it was really good. (there are also vegetarian choices.) finally, in disentis, there was a fasnacht parade going on.
i took some photos on the trip. unfortunately, one cannot open the windows of the glacier express, whence there are always some more or less ugly reflections lurking around. here are some of the better shots:
if you want to take a lot of photos, better take a usual train, since on these routes they often have windows which can be opened. i might do that somewhen soon, at least for the part from andermatt to disentis.
besides the inability to open the windows, the trip is great! if you have a chance, do it. it’s probably also very interesting during summer, and also during winter when there’s more snow than this year…
yesterday, i again used my ga to explore a bit of switzerland (and italy). i decided to use an offer by the sbb to drive up the cimetta, a mountain next to locarno at the lago maggiore. the weather report for most of switzerland wasn’t very good yesterday, except for the ticino, whence i ended up there. at ground level it was rather foggy, but when climbing up the mountain by cable car i eventually got out of the sea of fog. around the cardada station, the final destination of said cable car, wasn’t too much snow, but still enough left to take a lot of snow photos! later i took the chair lift up to the top and had lunch there, as well as took out my laptop (which i carried with me all the time… i really need to get a netbook!) and worked a bit. that was a funny moment, sitting over 1600 meters over sea level, surrounded by snow, while programming. i guess i have to do that more often :-)
later, i took the cable car back down to locarno and explored the city a bit. here are some impressions, including the madonna del sasso and the castello visconteo:
finally, i took the train to domodossola, operated by fart (ferrovie autolinee regionali ticinesi). the train ride is really beautiful. unfortunately, i had to shoot all photos through the window, which resulted in not so great ones… anyway, there are a few i really like:
i didn’t stay in domodossola, due to being tired and its getting dark outside, so i hopped onto the next train to brig, going through the simplon tunnel (about whose construction i read a novel called simplon some years ago). eventually, 14 hours after my departure, i arrived back in zürich.