MPIRAM: M. D. Collins' Range-dependent Acoustic Model (RAM) for long-range oceanic acoustic propagation coded in FORTRAN 95 and parallelized for OpenMP or Message Passing Interface (MPI)
Authors/Creators
Description
In the early 1990s M. D. Collins developed the "Range-dependent Acoustic Model" (RAM) code for computing long-range acoustic propagation in the ocean using a solution for the wave equation by the parabolic equation method. "RAM is based on the split-step Padé solution." RAM was written in FORTRAN 77. The purpose here is not to delve into the details of Collins' solution, however. RAM quickly gained a loyal following as something of a gold standard for computing the properties of oceanic long-range acoustic propagation.
My associate M. Dzieciuch some years later, rewrote RAM in the MATLAB computing language, with an eye to obtaining more convenient computations and to parallelize the code. While computing acoustic propagation using ray tracing over O(1000 km) ranges took only a few seconds, equivalent (though more thorough) RAM computations took about an hour. At that time, 2008, I wanted to use RAM, but the existing versions appeared slow to me, not taking best advantage of parallelization on SMP computers or on the cluster supercomputers that could be readily assembled. I also wanted to learn FORTRAN 95, and I had noted that MATLAB coding was similar to FORTRAN 95. I therefore went through the process of rewriting Dzieciuch's code into FORTRAN 95, and implementing the appropriate coding for either OPENMP for SMP machines, or the Message Passing Interface (MPI) for cluster computing. RAM computes acoustic propagation for broadband acoustic frequencies, and each computation for the O(100) frequencies is independent of the others. Computations with RAM exploiting parallelization are therefore quite simple. This FORTRAN 95 version appears to be popular.
This author is neither an expert on RAM, nor an expert on the subsequent signal processing computations required to make sense of the results from RAM.
The code provided here is RAM coded in FORTRAN 95, with parallelization implemented in either OPENMP or MPI, depending on which Makefile is use for compiling it. The "Makefile" compiles for OPENMP and links the OPENMP libraries. The "Makefile.mpi" compiles for MPI; I have used OpenMPI implementation of MPI most recently:
but any standard MPI will work. It may be that even on SMP machines, the MPI version will run a little faster than the OPENMP version. OPENMP is readily available on standard linux systems, while MPI requires compiling or installing that suite of libraries, with the "mpif90" binary to compile the code and the "mpirun" binary to run it.
Unpack the tarball with "tar xfz mpiramS.03.14.24.tgz" to create the directory mpiramS. Edit the makefiles "Makefile" or "Makefile.mpi" for your compiler and system; the default is for a standard linux system. Compiling for OPENMP creates the binary "s_mpiram", while compiling for MPI creates the binary "mpiram". (I believe that no additional external software or libraries are needed now for MPIRAM.) The MPI version can be run on a cluster of computers; I recommend disabling all firewalls before attempting to get the MPI version to run across the cluster. Successfully run, the executable writes out the "psif.dat" binary, direct access file with the results. The MATLAB script "plotram.m" will then plot the time fronts, or plottpf.m will plot other aspects of the arrival pattern using Dzieciuch's "Turning point filter". All of these signal processing routines were provided by M. Dzieciuch.
The input file to mpiram is "in.pe", where one can set the frequency, bandwidth, source depth, range of propagation and input the environmental variables. One has to select a "time window width" that will span the expected duration of the arrival pattern; choose a window as short as possible for faster computations; a wider window corresponds to computations at more frequencies. The other details of the parameters I leave to the RAM documentation.
For computing using a cluster, the files "nodes" and "nodewts.dat" are relevant. "nodes" is used with OPENMPI to specify the nodes of a cluster computer and the number of "slots," or available CPUs on each node. The file "nodewts.dat" is used for load balancing, e.g., when several computers of different computing capability are used. The "load balancing" numbers I use are typically the number of seconds it takes for RAM to compute a single frequency, with one number for each "slot". Obviously, one wants all available CPUs to come to an end of their assigned frequencies at about the same time for best efficiency. Until recently, using the hyperthreaded CPUs gave significant speedup (e.g., 8 CPUs, 16 available threads), but for gfortran version 13 that is no longer the case; its worth a bit of trial and error to optimized the computations. Parts of MPIRAM were later implemented in single precision (2013), which speeds up the computations by a factor of 2 at no apparent loss of precision; double precision throughout can be restored by adjusting values in the "kinds.f90" routine.
More information on MPIRAM may be found here:
http://staff.washington.edu/dushaw/AcousticsCode/RamFortranCode.html
Code for computing acoustic propagation by simple ray tracing (EIGENRAY) may be found here:
https://zenodo.org/records/10816780
The example environment and other relevant variables of EIGENRAY and MPIRAM are the same.
Files
ram.pdf
Files
(693.0 kB)
| Name | Size | Download all |
|---|---|---|
|
md5:9438423256b2644dea935c47d1f6533a
|
345.6 kB | Download |
|
md5:7731ff4c49461c71c68755efbfd12c2f
|
347.5 kB | Preview Download |
Additional details
References
- M. D. Collins, (1995), "User's Guide for RAM Versions 1.0 and 1.0p," Naval Research Laboratory, Washington, DC., 14 pp.
- M. D. Collins, (1993), A split-step Pade solution for parabolic equation method," J. Acoust. Soc. Am. 93, 1736-1742.
- M. D. Collins, R. J. Cederberg, D. B. King, S. A. Chin‐Bing (1996), Comparison of algorithms for solving parabolic wave equations. J. Acoust. Soc. Am., 100, 178–182. https://doi.org/10.1121/1.415921
- M. A. Dzieciuch, P. F. Worcester, and W. H. Munk (2001), Turning point filters: Analysis of sound propagation on a gyre-scale, J. Acoust. Soc. Am., 110, 135–149. https://doi.org/10.1121/1.1377869