Building and Testing the Under Sea Modeling Library (USML)

The Under Sea Modeling Library (USML) is a collection of C++ software development modules for sonar modeling and simulation. The Wavefront Queue 3D (WaveQ3D) model is the component of USML that computes acoustic transmission loss in the ocean using Hybrid Gaussian Beams in Spherical/Time Coordinates. At this time, most of the other modules provide support to WaveQ3D.

Before you get started

USML depends on the NetCDF package, for access to test data, and the Boost package, for fast computations (uBLAS) and unit test utilities. Correctly configuring these packages is the #1 problem reported by USML users.

The USML build process assumes that the software will be installed into a directory called usml and it won't build properly if that is not the case. These instructions refer to usml as the home directory. The directory that contains usml is refered to as the parent directory. The header files, *.cc source, and tests for each module are found in the subdirectories of usml. The #include statements in the code explicitly rely on this directory structure. For example, if sreilly decides to install USML under ~/Projects on a Linux machine, the home directory would be /home/sreilly/Projects/usml and the parent directory would be /home/sreilly/Projects. Confusion over this scheme is the #2 problem reported by USML users.

Before you attempt to build and test USML, please read these instructions carefully. Good luck.

Linux using GNU C++ and Unix Makefiles

We've tested this process with: The steps that follow are the process we used to setup USML for a 64-bit CentOS 6 development environment. We expect your environment to be a little different, but this should get you started. Since CentOS is derived from Red Hat Enterprise Linux, (see http://community.redhat.com/centos-faq) we expect this process to work identically in RHEL6.

cmake-gui example

Linux using Eclipse CDT4

This is almost identical to the setup for Unix Makefiles with some small exceptions.

Windows using Microsoft Visual C++

We've tested this process using Windows 7 with: The steps that follow are the process we used to setup USML for a 32-bit Visual Studio 2010 development environment. We expect your environment to be a little different, but this should get you started.

Using USML with CMake

USML does not require your project to use CMake. However, CMake configuration files are provided to automate the integration of USML, Boost, and NetCDF into your CMake build process, if you so choose. The example below shows a CMakeLists.txt script that creates an USML enabled executable called example from a notional file called example.cc.
    cmake_minimum_required( VERSION 2.6 )
    project( usml_example CXX )

    find_package( USML 1.0 REQUIRED )
    include_directories( ${USML_INCLUDES} )
    add_executable( example example.cc )
    target_link_libraries( example ${USML_LIBRARIES} )
    
In this example, the find_package command uses files called USMLConfig.cmake and USMLUse.cmake to configure the include and library files for USML, Boost, and NetCDF. A file called USMLConfigVersion.cmake is used to check the desired USML version against the installed version.