Software
From SnovaWiki
Contents |
Software used by the snova group
Photometry
- Software:DeepLib - the SCP DeepLib library and simplehstltcv
- Software:ACSfltTrnsDeepLib - ACS flat fielded images and DeepLib.
- Software:Hstltcv_Monte_Carlo - Monte Carlo investigations of simplehstltcv
- Software:TOADS - the French imaging and photometry package
- Software:SCPfits - aka SNminuit, lightcurve fitting tool built on IDL and fortran77
- Software:Tracker - a HOWTO on the old Berkeley database
- Software:ELOG - documenting work progress
Lensing
- Software:Lenstool - Jean-Paul Kneib's Lenstool
General
- Software:SnovaPerl - a bunch of perl modules for working with supernova cosmology
Using Snova Software
The snova software directory is located at
/afs/physto.se/snova/dsk03/software
where there should be one subdirectory for each architecture used on physto.se. Each of these subdirectories has the standard UN*X structure with a set of bin/, lib/, man/ etc directories. The source code for each installed package is located under src/. In order to use snova software all you have to do is to source the appropriate setup script, e.g.
/afs/physto.se/snova/dsk03/software/@sys/bin/setup.csh
where @sys is your architecture (there is also a setup.sh script for bash users).
Installing new Snova Software
If you wish to install a new package start by sourcing the setup script mentioned above as well as the development script,
/afs/physto.se/snova/dsk03/software/bin/dev-setup.csh
and then download the package to $SNOVASOFTARCH/src/. The convention in this directory is that all package directories should be named "package-version", and then a symbolic link named "package" should point to the default version. This allows users to quickly switch between different versions by editing their $PATH variable, or creating their own setup scripts.
If your package is using the GNU autoconf framework, it can now be compiled and installed by typing
./configure --prefix=$SNOVASOFTARCH; make; make install
in its source directory, i.e. $SNOVASOFTARCH/src/package-version
Many astronomy packages will depend on libraries that already have been installed in $SNOVASOFTARCH (e.g. CFITSIO), but that are not found by the configure script. In these cases the paths to the dependencies may have to be passed on the command line to the configure script. Check ./configure --help for details.
CVS
The snova CVS area is located under
/afs/physto.se/snova/cvsroot
and has the structure of two "projects", snova and snoc. There is only one branch (nobody would have the time to support different branches anyway) for each project, and snova includes a numerous of other projects. --rahman 10:17, 18 October 2005 (CEST)
Software RAID
There is an excellent HOWTO http://linux-raid.osdl.org/index.php on software RAID on linux. This is basically a summary of how the RAID system on copslxu03 was setup. This is the hardware setup
* ASUS P5Q DELUXE P45 S-775 ATX * INTEL CORE 2 DUO E8400 3.0GHZ 6MB 1333MHZ S-775 * OCZ FLEXXLC 2GB KIT 2X1024MB DDR2 CL5 PC 9600 * 1 x WESTERN DIGITAL CAVIAR BLUE 500GB (IDE) * 8 x SEAGATE BARRACUDA 7200.11 1.5TB 7200RPM SATA/300 32M
The IDE disk is used as the system disk, while the 8 SATA disks are used for the RAID system. Here, 6 of the disks are on one SATA controller, and 1 is on the Silicon Image Sil5723 controller and 1 is spare. The original idea was to put disks on the Sil5723 controller but it turned out that this could only handle one device, so either the two disks would have to be setup as a hardware RAID device or only have one disk. We decided to go for the latter alternative.
The each SATA disk contains 1500301910016 bytes on 182401 cylinders (255 heads, 63 sectors/track, Units = cylinders of 16065 * 512 = 8225280 bytes). We choose to create one partition on each disk, but not using the last 10 cylinders on each disk, i.e the partiotions run from cylinder 1 to 182391. The partition type is da.
Creating the RAID
mdadm --create --chunk=128 --verbose /dev/md0 --level=6 --raid-devices=7 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1 /dev/sdf1 /dev/sdh1
I was not sure how to select the chunk size, but it seems that 128 is a reasonable size. After running this, I executed
mdadm --detail /dev/md_d0
to figure out the UUID of the disks. Then I edited the /etc/mdadm/mdadm.conf and set up the ARRAY using the UUIDs. See the manpage for mdadm.conf for details. After that, bring up the array:
mdadm --assemble --scan
it should be able to figure out what it needs to know from the /etc/mdadm/mdadm.conf
Delete RAID array
To completely delete an array, first bring down the array
mdadm --stop /dev/md_d0
and then zero out the superblock of all devices
mdadm --zero-superblock /dev/sdX
Updates
2009-10-08 After upgrading to 9.04 in an attempt to solve the regular crashes of copslxu03 there were some major problems with the raid array. Apparently this is related to the upgraded version of mdadm. I had to increase the partition size of the /dev/sda1 with a few cylinders for it to work again, and re-add two of the disks and then rebuild the array. It seems that the upgrade wrote the /etc/mdadm/mdadm.conf file which probably was the origin of the problems. The raid device is now called /dev/md_d0 rather than /dev/md0.
Filesystem
It appears that either XFS or JFS are the best candidates for an array of this type. I have not managed to figure out if it is possible to grow a JFS system, and they physto system is using XFS, so... XFS it is!
This is the best explanation I have found on how to set the stripe size on XFS, so using the chosen chunk size of 128 k and assuming we have 7-2=5 disks in operation, it becomes
mkfs.xfs -f -d sunit=256,swidth=1280 -l sunit=256 /dev/md0
NFS
Following the standard procedure to setup an NFS server.
sudo apt-get install nfs-kernel-server nfs-common portmap
When configuring portmap do =not= bind loopback. If you do you can either edit /etc/default/portmap by hand or run:
sudo dpkg-reconfigure portmap sudo /etc/init.d/portmap restart
