= Installing Duchamp at ATNF = == Considerations == We need to consider the following effects at ATNF: * Many different platforms * Different flavours of linux with their own /usr/local installs * Need to have an easy-to-update installation procedure. == Installation procedure == The scripts used for the install are in the directory /nfs/atapplic/duchamp/scripts. The directory /nfs/atapplic/duchamp is in fact a symbolic link that points to the most recent version of Duchamp: currently /nfs/atapplic/duchamp-1.1.8. There are two scripts: [attachment:make_atnf_install.sh] and [attachment:duchamp_wrapper.sh]. The former handles the installation, while the latter acts as a wrapper to get the correct version and the libraries correct. The basic functionality of ```make_atnf_install.sh``` is as follows: 1. Work out what platform we're on (via ```uname```). Only SunOS and Linux are supported. 1. Make the appropriate directory for the current version (if it doesn't already exist) -- this means /nfs/atapplic/duchamp-1.1.8 for example. 1. Download the source code: * If linux, we get it directly from the subversion repository * If solaris, svn is not available, so we copy the release tarball from the web download directory 1. Run configure with appropriate directories and compilers (we need to specify the compilers on solaris, so that we get v.3 of gcc etc) 1. Compile and run the test script 1. Make the documentation 1. Copy the wrapper script to /usr/local/bin and make a symbolic link to it 1. Copy the library and the include files to /usr/local The wrapper script just gets LD_LIBRARY_PATH correct then passes all arguments to the actual Duchamp executable, using the symbolic link /nfs/atapplic/duchamp When installing a new version, make sure to update the file /nfs/source/INSTALL.LOG, which is under RCS control: {{{ cd /nfs/source; co -l INSTALL.LOG; vi INSTALL.LOG; ci -u INSTALL.LOG }}} == Notes == * 2009/07/27: Install on ritchie seems to have not found PGPLOT. Need to chase up why. Other linux install (draco) worked fine. * 2010/03/16: Patched source:/tags/release-1.1.8/src/Cubes/saveImage.cc to prevent a memory leak when saving a large mask. Patch file is: {{{ --- src/Cubes/saveImage.cc.orig 2010-03-16 13:13:33.200002000 +1100 +++ src/Cubes/saveImage.cc 2010-03-16 13:14:00.800002000 +1100 @@ -65,7 +65,7 @@ /// objects. Pixels not in a detected object have the value 0. int newbitpix = SHORT_IMG; - long *fpixel = new long[this->numDim]; + long *fpixel = new long[this->header().WCS().naxis]; for(int i=0;iheader().WCS().naxis;i++) fpixel[i]=1; int status = 0; /* MUST initialize status */ fitsfile *fptrOld, *fptrNew; }}} * 2011/07/07: Updated the ATNF installs for 1.1.13 - ritchie (linux), spitzer (linux_64 - for Naomi, could also use hydra), lynx (sun4sol). All confirmed to work.