Installation

The installation is the same for all flavors of Unix. The recommended location for Bsoft is in /usr/local. If you want to install Bsoft in a different location, change the environment variable BSOFT to point to the appropriate directory:

setenv BSOFT /usr/local/bsoft

OR

setenv BSOFT $OTHERPATH/bsoft

Copy the distribution file to the desired directory (e.g., /usr/local) and unpack it as follows (it will unpack into a directory named "bsoft"):

gunzip bsoft1_6_0 .tgz

tar -xvf bsoft1_6_0 .tar

OR

tar -xzvf bsoft1_6_0 .tgz

All programs are compiled with the C-shell script "bmake" in the main bsoft directory (the -w option prevents display of warnings):

bmake


Compiling over a previous installation

When the operating system has changed or a new version of Bsoft has been downloaded over an old one, the old object files need to be clean out before compilation. A clean install is then required:

bmake clean

OR

bmake cleanall

The last option cleans out all the associated libraries (TIFF, JPEG, PNG and FFTW).


Platform specifics

The bmake script uses platform specifications in the bsoft/platform directory. The file name for the platform is automatically generated from system information. However, a different file may be specified:

bmake file=ia64_Linux.icc


Tcl/Tk (for Bshow and Brun)

The programs bshow and brun requires the Tcl/Tk libraries, including the header files for compilation. The typical Linux installation omits the developer part of the Tcl/Tk package, but this is required for Bsoft.

If for some reason bshow and brun are not desired, the compilation of the Tcl/Tk interface can be bypassed as follows:

bmake notcltk

In some cases the Tcl/Tk libraries may be installed in an odd location. One option is to specify the directory for the Tcl/Tk header files:

bmake tcltk=/usr/local/include


Tcl/Tk on Mac OS X

I've packaged the Tcl/Tk applications bshow and brun to be able to launch them from the Finder and the Dock. Run the macinstall script in the bsoft/macosx folder (this requires administrative priveleges). This should install Bshow and Brun in the "/Applications" folder.


Note on 32 versus 64 bit

Bsoft is 64 bit clean and 64-bit versions should be able to handle large image files (>2Gb). The default on systems capable of both 32 and 64 bit addressing, is 64 bit addressing. To generate 32 bit versions, run the bmake script with the flag "32":

bmake 32

Both 32 and 64 bit versions of Bsoft can coexist by maintaining two separate bsoft directories. When a program is run, the correct version and library for a particular machine will execute, provided that the PATH and LD_LIBRARY_PATH environmental variables are correctly defined. Be sure to distinguish 32 and 64 bit versions of the Bsoft library clearly with the LD_LIBRARYN32_PATH and LD_LIBRARY64_PATH variables under IRIX64.

32-bit only systems: Linux on x86, MacOSX (G4 and pre-Tiger/10.4 on G5, Intel i386), Solaris, VMS, Cygwin_NT (Intel).

64-bit only systems: Linux on Alpha and Itanium, Tru64.

Dual 32- and 64-bit systems: Linux on x86_64, MacOSX Tiger/10.4+ on G5 and Intel, IRIX64.


Note on Macintosh G5 and Intel

Bsoft compiled on an Intel Mac generates universal binaries and libraries, each containing four versions: PowerPC 32 and 64 bit, and Intel 32 and 64 bit.

The Mac OS X versions 10.4 and 10.5+ have different compilers:


Enhancements

XML:

Make sure the header files in /usr/include/libxml2 and the library in /usr/lib are present. Specify XML support with the "xml" flag:

bmake xml


OpenMP:

Make sure the compiler supports OpenMP (gcc version 4.2+ supports OpenMP).

Specify OpenMP support with the "omp" flag:

bmake omp


FFTW3:

Version 3.1.x or later of FFTW3 can be obtained from http://www.fftw.org , configured with the following switches and compiled:

./configure --enable-float --enable-openmp --disable-fortran --with-pic

On Mac OS X, a universal library should be compiled by explicitly specifying the architectures (note on 10.6+ the ppc versions won't compile):

./configure --enable-float --enable-openmp --disable-fortran CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" CPP="gcc -E" CXXCPP="g++ -E"

The compilation and installation should then be simply:

make

make install

Specify FFTW3 support in Bsoft with the "fftw3" flag, usually together with the "omp" flag:

bmake omp fftw3

A custom location for FFTW3 can also be specified:

bmake omp fftw3=/somedisk/mydirectory


Environment

During compilation the script bmake writes two small files called "bsoft.cshrc" and "bsoft.bashrc" with the required environmental variables. The following Bsoft-specific variables are required:

The following general environmental variables need to be modified as well:

Note that there are variants of LD_LIBRARY_PATH, in particular:

For system-wide setting of these environmental variables, the files to modify are: