Archive for March, 2007
March 26, 2007 at 10:06 pm
· Filed under linux, scripting
I wanted to be able to generate Gnuplot images of my SPH results for an arbitrary number of state files. Thanks to the magic of shell scripting, I can!
Here is a bash script:
#! /bin/bash
ls sphstate.* > list
for i in `cat list` ; do
echo item: $i
sed -e "s/INPUTFILE/$i/" -e "s/OUTPUTFILE/$i/" sphplot.plt | gnuplot
done
Here is a gnuplot script:
set term png small
set output "OUTPUTFILEtemp.png"
plot "INPUTFILE" using 1:7 title "temperature"
Here are a few URLS:
Sed tutorial
Gnuplot IFAQs (recommended)
Bash scripting guide
Permalink
March 25, 2007 at 5:51 pm
· Filed under fortran
I have discovered that there is a (beta) IDE for fortran, based on Eclipse. I’m going to try it out – emacs just doesn’t do it for me, and is a whole other world (windows style keyboard shortcuts are burned into my brain – think ctrl-x, ctrl-v). The IDE is called Photran.
Update – eclipse has a learning curve, but it’s not hard to get started. Seems like a pretty nice IDE. Need to figure out how to make different targets – I’ve got a ‘put’ target that copies the source to the supercomputer, I need to use a shell to run it atm.
Permalink
March 25, 2007 at 5:50 pm
· Filed under research
I’m resolving to be professional in my approach to the development that this project requires. Professional developers: use CVS for source code; make and frequently revise roadmaps; follow a set of style rules. Some of this stuff I alread do, this is a just a resolution to be more concious about it.
This was sparked by a conversation with a colleague in which it came out that the code in use in a major scientific organisation was basically a mess – global variables, no sense of structured-ness.
Permalink
March 20, 2007 at 11:19 am
· Filed under linux, scripting
rsync -av username@host:sourcedir/ destdir/
e.g.
rsync -av andy@apac.com:~/ ~/mybackupfolder/monday1/
The slashes on the ends specify to copy the contents of the folders and not the folders themselves.
To use wildcards, use –include and –exclude flags e.g. rsync -avtubz –include=’/sa_*’ –exclude=’/*’ ac@source.com:~/ ~/backup/
Include arguments override subsequent exclude arguments.
http://blogs.warwick.ac.uk/chrismay/entry/idiots_guide_to/
Permalink
March 15, 2007 at 12:20 pm
· Filed under linux, scripting
I just wasted hours as a result of a “feature” of Edgy, the distro of Ubuntu I’ve installed on my new deck. The developers have replaced bash with dash as the shell that is invoked by scripts using #! /bin/sh
This has the effect of breaking scripts that rely on bash extensions. Apparently it is the script writers who are to blame – thing is I don’t care! What bugs me is that the process of installing my fortran compiler, so that I can get to work, was made more difficult. The developers who’ve stuck by this change have decided that trying to enforce a standard is more important than the usability of their software. One more truly annoying Ubuntu experience like this and I will start shopping for another distro.
https://launchpad.net/ubuntu/+source/dash/+bug/61463
There are several solutions to this – you can modify the scripts that fail such that they use bash (change #! /bin/sh to #! /bin/bash), or more simply you can change the symbolic link sh, found in the /bin directory, to point to /bin/bash. I went as far as uninstalling the dash shell on principle.
*Edit* Now that I’ve cooled down, I’ve reinstalled dash. The argument in favour of the change is a speedup of shell script execution, which it’s claimed leads to significantly faster startup times. Might as well make the most of it.
Permalink
March 15, 2007 at 1:27 am
· Filed under research
Multiple smoothing lengths has worked wonders. Now let’s hope we can get a homogeneous fluid at sup-critical temperatures!
Inkscape is not as capable as I’d hoped – it can’t read latex equations directly. (To be fair, there is an extension that does this, but it doesn’t want to play on my system). To import my equations into illustrations, then, I need to output postscript, and use gsview to convert it to paths. A little more manual that I was hoping, but acceptable.
Permalink
March 15, 2007 at 1:25 am
· Filed under linux, scripting
My shell skills are a little rusty. Now that I’m relying on Ubuntu to be my main OS for development and writing, I better sharpen, cut and buff them.
Permalink
March 12, 2007 at 6:02 am
· Filed under hardware
Purchased a new Toshiba Satellite M110/J00 notebook. Gotta love 24 months interest free finance!
Now I am installing Ubuntu – the plan is to dual boot with XP, but I will lose XP if it gives me grief.
The first hitch – the wireless “kill switch” must be off. That is wireless enabled. If the kill switch is on, a cpu soft lock occurs. This is a documented bug.
Most everything worked right out of the box, not that I’ve tested Bluetooth or the fingerprint scanner yet.
Permalink
March 8, 2007 at 12:13 am
· Filed under research, simulation
Doing a quick implementation of multiple smoothing lengths. The droplets formed are remarkably more circular and stable.
Update – Thielot says that this approach (of having a short smoothing length for the repulsive force and a large smoothing length for the attractive force) “numerically induces” a surface tension.
Permalink
March 7, 2007 at 6:37 am
· Filed under toshiba laptop
Once again, I’m considering purchasing a notebook. Maintaining multiple copies of my files is getting tedious. My only easy remote access is to the local supercomputing facility – it would be cheeky to use that as my primary storage.
Permalink
Older Posts »