click on the Biowiki logo to go to homepage
Edit Raw Print
Links Diffs RSS
About Stats Recent
Research Teaching | Blog
Main | JBrowse | TWiki
Biowiki > Main > TWiki Users > Lars Barquist > AmazonEC2

Search

Advanced search...

Topics

PageRank Checker

Amazon Elastic Compute Cloud (EC2)

Resources:

Holmes lab AMIs:

The following construct can be used to seed the random number generator with a hostname-specific value (useful e.g. for running several parallel MCMC jobs):

handalign -rndseed `hostname | md5sum | perl -ne 's/ .*\n//;printf"ibase=16;%s%1000000\n",uc' | bc` ...

To add current-time-in-seconds to this random seed, use the following:

handalign -rndseed `hostname | md5sum | perl -ne 's/ .*\n//;printf"ibase=16;(%X+%s)%1000000\n",time,uc' | bc` ...

Finally, to add the process ID as well:

handalign -rndseed `hostname | md5sum | perl -ne 's/ .*\n//;printf"ibase=16;(%X+%X+%s)%1000000\n",time,$$,uc' | bc` ...

Note that the last one includes $ symbols, which must be escaped in a Makefile (i.e. $$$$ instead of $$).

(If on a Mac, use md5 instead of md5sum...)

-- LarsBarquist - 11 Mar 2009

Actions: Edit | Attach | New | Ref-By | Printable view | Raw view | Normal view | See diffs | Help | More...