Tools are external packages that are required dependencies for IceCube Offline software packages. These are distributed as source and built on your local cluster using the Ports system. This will help you setup your toolset (often referred to as I3_PORTS.
There is a single “meta-package” that collects all needed tools into a single, one-stop-shopping experience. The current toolset is:
i3-tools-v4
First you’ll need to install dependencies, these are system libraries that our software requires in order to build. The easiest way to do this is with one of the scripts here:
Run these scripts as root and they should install the necessary dependencies. If they don’t drop us a mail at dataclass@icecube.wisc.edu.
If your platform is not listed, the process may be more trial-and-error. For sure you’ll need:
You can have a look at some of the scripts for other platforms to get an idea of what else is required.
The MacPorts two-step:
Perform a checkout of the project’s latest copy of the MacPorts source from Subversion:
svn co http://code.icecube.wisc.edu/icetray-dist/tools/DarwinPorts/trunk port_source
Build MacPorts and the toolset
Cd to the directory just created:
cd port_sourceDefine $I3_PORTS location. This will be the location where your new toolset will be installed. Make sure you have permissions to write in this area. A good location is “/opt/i3/ports” or in your home directory in “i3/ports”. Assuming you use your home directory, it is recommended that you add the following to your startup files.
For ~/.bashrc:
export I3_PORTS="~/i3/ports"For ~/.cshrc:
setenv I3_PORTS ~/i3/ports
Execute i3-install.sh passing $I3_PORTS as the sole argument:
./i3-install.sh $I3_PORTSi3-install.sh will configure, compile, and install the MacPorts distribution. Afterwards it will begin compiling the entire Offline Software toolset within MacPorts. Go read the day’s news or make a lasagna while you’re at it - this step will take some time and is significantly quicker on a fast system.
For an even more manual installation, the following steps are those i3-install.sh will perform for you.
Perform a checkout of the project’s latest copy of the MacPorts source from Subversion:
svn co http://code.icecube.wisc.edu/icetray-dist/tools/DarwinPorts/trunk <path_to_port_src>
Change your working directory to <path_to_port_src>. Configure the MacPorts source tree with the installation location:
cd <path_to_port_src> && ./configure --prefix=$I3_PORTS
Compile and install MacPorts:
make && make install
Change your working directory to $I3_PORTS. Fetch a set of portfiles:
cd $I3_PORTS && ./bin/port -dv sync
Install the complete IceCube Offline Software tools distribution:
./bin/port -dv install <DISTRIBUTION>
Where <DISTRIBUTION> is the package or metapackage appropriate to the software you intend to build.
For the unit test and test scripts, a selection of small test-data files has been prepared. These files traditionally were rsynced along with the binary tools. Now this process has been split from the I3_PORTS tool installation process.
The tools are stored in a directory “test-data” which will live in your I3_PORTS directory.
If you have write permission in your I3_PORTS directory, from any I3_PORTS-based workspace run:
make rsync
If your I3_PORTS is not generally writeable by you (a group or software install account), then run the following command with appropriate write permissions:
rsync -vrlpt code.icecube.wisc.edu::Offline/test-data $I3_PORTS/
When new tools or changes to existing tools happen, you will need to update your tool installation.
A few points regarding updates to tools.
The port system allows for easy upgrading of your tool installation. Here are some simple steps:
cd $I3_PORTS
Update your tool list from the server:
./bin/port -vd sync
Now update your tool installs (update the tool meta-package):
./bin/port -vd upgrade i3-tools-v4
Do not upgrade between “meta-tool” versions. I.e., do not use this method to move from i3-tools-v3 to i3-tools-v4.
If you know that there is a specific package you want to force a rebuild of, you can:
./bin/port -fvd install <tool name>
Installing the Icecube tools for a cluster installation is almost the same as for a single installation. Please keep the following things in mind:
Essentially, you will be making several IceCube tool installations into a common, shared disk, one for each OS/Architecture you are working with:
Make a common area on your shared NFS disk for your tool installs to live in:
mkdir /path/to/NFS/disk (example: /disk02/software/i3tools)</pre>
Make sure this area is writable by your dedicate account user.
Make sure you have a dedicated machine that meets all the prerequisites for each OS/Archicture that you wish to build tools for.
On each OS/Architecture:
svn co http://code.icecube.wisc.edu/icetray-dist/tools/DarwinPorts/trunk port_src
port_src directory can be, but doesn’t have to be on the shared NFS disk.
cd port_src
./i3-install.sh /path/to/NFS/disk/<arch-ident> (example: ./i3-install.sh /disk02/software/i3tools/rhel4-i386)
<arch-ident> will be the ports installation for that OS/Arch.
<arch-ident> can NOT contain “+” (so don’t use: Linux-libstdc++6-i386 or similar)
Link this toolset to each installed toolset:
ln -s /path/to/NFS/disk/test-data /path/to/NFS/disk/<arch-ident>
If your i3-install.sh build gets interrupted for some reason (other than an error), there is no need to remove all your previous work and start from scratch. You can take a look at the contents of the i3-install.sh file. As long as you are past the “make install” step (first couple of minutes), you can simply repeat any of the subsequent commands ($1 in this script is your $I3_PORTS directory) This is essentially switching to the manual instructions.
If ports appear to build correctly, but you see this error near the end of the output (when executing port install with the -vd flags), add the flag --enable-broken-nfs-hacks to the ./configure line when building the ports package.
This error has been reported when building tools on a Mac to a network volume:
Error: Target com.apple.destroot returned: error deleting
"/Volumes/Home/toale/tmp/tools/var/db/dports/build/file._Volumes_Home_toale_tmp_tools_var_db_dports_sources_rsync.code.icecube.wisc.edu_icecube-tools-ports_devel_cdk/work/destroot/Volumes/Home/toale/tmp/tools/man/man3":
file already exists Warning: the following items did not execute (for
cdk): com.apple.activate com.apple.destroot com.apple.archive
com.apple.install
Workaround: build tools to local disk.
See also Details by Platform.