Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
749c7b4
Update .gitignore
richardt94 Jul 1, 2020
18bbabf
add nuisance vars to netcdf pmaps
richardt94 Jul 1, 2020
d6836e7
Add julia script for saving noisy synthetics easily
richardt94 Jul 2, 2020
1de8d3d
adaptive plotting of nuisance and noise histograms
richardt94 Jul 7, 2020
a6ed2bd
add failing tests for expected noise move behaviour
richardt94 Jul 7, 2020
91e6b2b
add container to manage vector of unique_ptr to make nuisance polymor…
richardt94 Jul 7, 2020
713547c
improve ptrvec and tests
richardt94 Jul 7, 2020
ebf7edd
modify rjmcmc headers to use ptr_vec for nuisance storage
richardt94 Jul 7, 2020
f02c00b
fix true model plotting in rjmcmcpmaptools
richardt94 Jul 9, 2020
690723d
add configuration and data files for testing the synthetic transmitte…
richardt94 Jul 9, 2020
4cc28db
fix bug with no-nuisances pmap reading
richardt94 Jul 10, 2020
2bb4852
change julia plot colour map to match Neil's inversions
richardt94 Jul 28, 2020
6b19312
better visualisation of change points and colours for p10 p50 p90 mean
richardt94 Jul 28, 2020
317d982
add script to save forward with multiplicative noise
richardt94 Aug 5, 2020
216c38e
revert conductivity model in makesounding.jl to original three-layer
richardt94 Aug 5, 2020
c44166a
fix bug in initialisation of noises and nuisances
Aug 10, 2020
0955085
enable custom noise inversion proposal std dev
richardt94 Aug 13, 2020
155d4d2
fix noise std quotation in percent
Aug 13, 2020
6494f12
add nuisance priors defined by offset from initial value
richardt94 Aug 20, 2020
ed79267
add mean model extraction to rjmcmc_pmap_tools
richardt94 Aug 21, 2020
ef32745
update UseGA_AEM to get gate times direct from C++ object
richardt94 Aug 21, 2020
a3b2f41
change to geometric mean for gate times for backwards compat with pre…
richardt94 Aug 21, 2020
3953252
add scripts and data for testing synthetic modelling with an extracte…
richardt94 Aug 24, 2020
fdfdd88
use directory macros to make julia scripts more robust for reuse in o…
richardt94 Aug 24, 2020
2a50f32
cleanup directory structure
richardt94 Aug 25, 2020
aed8e19
Fix misfit reporting in text output:
richardt94 Aug 25, 2020
5de91b2
fix nuisance offset prior initialisation bug
richardt94 Aug 26, 2020
1f01011
add julia notebook for analysing estimated noise magnitudes across an…
richardt94 Aug 31, 2020
271d323
add relative uncertainty plotting to julia cal analysis notebook
richardt94 Aug 31, 2020
0f44ad0
update .gitignore
richardt94 Aug 31, 2020
fd9f3ac
reshuffle plotting layout for pmaps, change colour scheme to more cle…
richardt94 Sep 2, 2020
a62448a
update .gitignore
richardt94 Aug 31, 2020
d78bf85
add some basic section building utilities for plots
richardt94 Sep 10, 2020
de2116e
fix bugs, add more functionality to section plotter
richardt94 Sep 11, 2020
a4acfd4
Update section plotter to make a nuisance plot over the line too
richardt94 Sep 14, 2020
10e6450
update plot_section.jl to enable reading a directory of pmaps into me…
richardt94 Sep 16, 2020
72289ac
add script to sort a folder of netCDF outputs from garjmcmc into fold…
richardt94 Sep 16, 2020
61ecc3d
write noise quantiles to netCDF and disable noise and nuisance ascii …
richardt94 Sep 16, 2020
152b2cc
write nuisance percentiles to netCDF
richardt94 Sep 17, 2020
8d9c5c0
Move using-directives to function scope, as is apparently best practice
richardt94 Sep 18, 2020
17314b2
add option to save individual posterior models
richardt94 Sep 25, 2020
98342e2
update gadi make script
Sep 25, 2020
ebe567e
make sure to clear sampled model vector when resetting sampler
Sep 25, 2020
29dcf9e
fix bug in ensemble nc writing
Sep 30, 2020
77621af
write out system geometry properties as netCDF attributes
richardt94 Oct 8, 2020
b747cd1
update pmap tools to use NCDatasets.jl (support variable-length arrays)
richardt94 Oct 12, 2020
c97c6ff
change julia tools directory structure in preparation for change to i…
richardt94 Oct 12, 2020
76f3f34
integrate julia forward modelling and visualisation into a slightly b…
richardt94 Oct 12, 2020
6230001
Update docs for julia stuff
richardt94 Oct 13, 2020
2cc97ab
Update docs
richardt94 Oct 13, 2020
397bb7b
Fix typo in docs
richardt94 Oct 13, 2020
84c819d
add some info about plotting to GAAEMTools docs
richardt94 Oct 14, 2020
f80b6d5
describe section plots in readme
richardt94 Oct 14, 2020
3d5ce47
Add additional installation testing info
richardt94 Oct 14, 2020
47e181f
Fix sign error in reading netcdf tx height and hardcoded numbers of L…
richardt94 Oct 21, 2020
9652e65
update to latest cpp-utils patches
richardt94 Oct 21, 2020
0742884
update vdi makefile for new vdi environment
Nov 2, 2020
9cd9b40
Better handling of missing con files
richardt94 Nov 16, 2020
fa09586
avoid dangling file handles when opening pmaps
richardt94 Nov 20, 2020
f66fda0
add hacky multithreading for garjmcmc parallel tempering
richardt94 Jun 30, 2020
7454328
enable compilation with openMP and computationally-efficient parallel…
richardt94 Nov 20, 2020
d6e5f42
add basic synthetic example with specified noise move std deviation f…
richardt94 Nov 23, 2020
fc897b2
Add CMake build system
Nov 26, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ examples/**/output
examples/**/*.out
examples/**/*.log

# Ignore output from julia synthetic tests
julia/output

# Ignore misc matlab scripts
octave_matlab_utils/
menindee_aem_calibration_range/

# Ignore all binary executables
*.exe
*.dll
Expand All @@ -20,8 +27,12 @@ examples/**/*.log
/bin/x64/Debug/*.exe
/bin/x64/Debug/*.exp
/bin/x64/Debug/*.lib
*_debug.dll
*_debug.mexw64
*_debug.dll
*_debug.mexw64
*/a.out

# CMake build artifacts
build/*

# Python
*.pyc
Expand Down Expand Up @@ -140,4 +151,3 @@ Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

85 changes: 85 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
cmake_minimum_required(VERSION 3.12)

project(GA_AEM VERSION 2.1
DESCRIPTION "Geoscience Australia AEM Inversion Software"
LANGUAGES CXX)

option(WITH_OMP_GARJMCMC "WITH_OMP_GARJMCMC" OFF)
option(WITH_MPI "WITH_MPI" ON)

#add object libraries for Ross's IO and data types
add_subdirectory(submodules/cpp-utils)

add_executable(
garjmcmctdem
src/garjmcmctdem.cpp
)
target_link_libraries(garjmcmctdem PRIVATE file_utils general_utils)

add_executable(
gaforwardmodeltdem
src/gaforwardmodeltdem.cpp
)
target_link_libraries(gaforwardmodeltdem PRIVATE file_utils general_utils)

# cmake build broken for galeiallatonce because I can't find a nice way
# to search for petsc
add_executable(
galeiallatonce
EXCLUDE_FROM_ALL
src/galeiallatonce.cpp
)
target_link_libraries(galeiallatonce PRIVATE file_utils general_utils)

add_executable(
galeisbstdem
src/galeisbstdem.cpp
)
target_link_libraries(galeisbstdem PRIVATE file_utils general_utils)

set_target_properties(
garjmcmctdem
gaforwardmodeltdem
galeiallatonce
galeisbstdem
PROPERTIES
CXX_STANDARD 11
CXX_STANDARD_REQUIRED ON
)

if(WITH_OMP_GARJMCMC)
message("Configuring with OpenMP multithreading...")
find_package(OpenMP)
if(OpenMP_CXX_FOUND)
target_link_libraries(garjmcmctdem PUBLIC OpenMP::OpenMP_CXX)
endif()
endif()

#configure MPI build for programs that support it
if(WITH_MPI)
find_package(MPI)
if(MPI_FOUND)
message("Configuring with MPI support...")
target_link_libraries(garjmcmctdem PRIVATE MPI::MPI_CXX)
target_compile_definitions(garjmcmctdem PRIVATE _MPI_ENABLED)
target_link_libraries(galeisbstdem PRIVATE MPI::MPI_CXX)
target_compile_definitions(galeisbstdem PRIVATE _MPI_ENABLED)
target_link_libraries(galeiallatonce PRIVATE MPI::MPI_CXX)
target_compile_definitions(galeiallatonce PRIVATE _MPI_ENABLED)
else()
message("Could not find MPI on this system. Configuring without MPI support...")
endif()
else()
message("Build without MPI specified. Configuring without MPI support...")
endif()

target_include_directories(galeisbstdem PRIVATE submodules/eigen)
target_link_libraries(garjmcmctdem PRIVATE netcdf netcdf_c++4 fftw3)
target_link_libraries(galeisbstdem PRIVATE netcdf netcdf_c++4 fftw3)
target_link_libraries(galeiallatonce PRIVATE netcdf netcdf_c++4 fftw3)
target_link_libraries(gaforwardmodeltdem PRIVATE fftw3)

install(
TARGETS garjmcmctdem galeisbstdem gaforwardmodeltdem
RUNTIME DESTINATION bin
)
34 changes: 23 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

## Geoscience Australia Airborne Electromagnetics Programs

- Author: Ross C Brodie, Geoscience Australia (ross.c.brodie at ga.gov.au)
- Author: Ross C Brodie, Geoscience Australia (ross.c.brodie at ga.gov.au) and Richard Taylor, Geoscience Australia
- Language: mostly C++, some matlab, some python

## Releases
Expand All @@ -26,15 +26,28 @@
- [Theoretical details for GALEISBSTDEM](docs/GALEISBSTDEM_Inversion_Algorithm_Theoretical_Details.pdf)

## Building on Linux
- cd makefiles
- edit the file run_make.sh to setup for your compiler
- set the C++ compiler (e.g., cxx=g++)
- set the MPI C++ compiler (e.g., mpicxx=mpiCC)
- set the C++ compiler flags (e.g. cxxflags='-std=c++11 -O3 -Wall')
- set the executable directory (e.g., exedir='../bin/raijin/gnu')
- run_make.sh
- Matlab shared library should go into ga-aem/matlab/bin/linux (.dll on Windows or .so on linux)
- Python shared library should go into ga-aem/python/gatdaem1d (.dll on Windows or .so on linux)
Building GA-AEM on Linux requires that you install the following software:
- [CMake](https://cmake.org/) >= 3.12
- [netCDF-4](https://www.unidata.ucar.edu/software/netcdf/) with C++ bindings and headers
- [fftw3](http://www.fftw.org/) with headers

For production-scale inversions, you will also need a working MPI installation on your system, and the MPI headers must be on your compiler's search path.

There are also legacy shell scripts and makefiles in the makefiles subdirectory for use with make. These will require you to manually specify which compiler you would like to use (GCC or Intel compiler) and are not actively maintained, so the CMake build system is recommended.

To run an out-of-source build, avoiding polluting the source tree, run the following commands from the root of the repository:
```
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make
sudo make install
```
This will configure and compile the package and install the binaries into `/usr/local/bin`. If you'd like to install somewhere else or you aren't a `sudo`er you can specify a custom install prefix using `-DCMAKE_INSTALL_PREFIX`. The `-DCMAKE_BUILD_TYPE=Release` flag sets your compiler to optimise the compiled binaries for speed (e.g. `-O3` with gcc). If you would like to include debugging symbols in the binaries, you can set `-DCMAKE_BUILD_TYPE=Debug` instead.

Finally, when invoking `cmake`, you can configure the build manually to not use MPI by setting `-DWITH_MPI=OFF`, and to use OpenMP multi-threading with the GARJMCMC parallel tempering program by setting `-DWITH_OMP_GARJMCMC=ON`. These options can be useful if you're building GA_AEM to do synthetic inversions or single soundings on a desktop machine instead of production inversions on a cluster.

The CMake build system should also be capable of generating cross-platform recipes to compile GA-AEM on Windows or MacOS, but this is not tested.

## Building on Windows
- You can build the programs with the free Microsoft Visual Studion 2013 Express.
Expand Down Expand Up @@ -95,4 +108,3 @@ The programs required additional code or libraries as described below.
- Windows users can obtain the header files and precompiled libraries from the GitHub, here
- https://github.com/rcb547/petsc-3.4.3-vs2013, or
- git clone git@github.com:rcb547/petsc-3.4.3-vs2013.git.

Loading