Skip to content

Commit

Permalink
Merge branch 'master' of github.com:leonfoks/ga-aem into leonfoks-master
Browse files Browse the repository at this point in the history
  • Loading branch information
rcb547 committed Jun 19, 2024
2 parents 78e5b9a + edc894f commit 9917c10
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
24 changes: 24 additions & 0 deletions cmake_build_python_bindings.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/sh

#module load gcc/13.2.0
#module load cmake/3.21.4
#module load fftw3/3.3.8
#module list

# Add the PETSc pkg-config path to the pkg-config search path
export PKG_CONFIG_PATH=$PETSC_DIR/lib/pkgconfig:$PKG_CONFIG_PATH

# pkg-config for PETSc seems non-standard on gadi so add the ompi/compiler specific library directory that contains the library file libpetsc.so
export PETSC_LIBRARY_DIR=$PETSC_DIR/lib/ompi3/GNU

# BUILD_DIR is a temporary directory for building (compiling and linking)
export BUILD_DIR=$PWD/build-gnu
# INSTALL_DIR is the directory for installing the build package
export INSTALL_DIR=$PWD/install-gnu

mkdir $BUILD_DIR
cd $BUILD_DIR

cmake -Wno-dev -DCMAKE_C_COMPILER=${CC} -DCMAKE_CXX_COMPILER=${CXX} -DCMAKE_BUILD_TYPE=Release -DWITH_MPI=OFF -DWITH_NETCDF=OFF -DWITH_GDAL=OFF -DWITH_PETSC=OFF -DCMAKE_PREFIX_PATH=$FFTW_ROOT ..
cmake --build . --target python-bindings
cmake --install . --prefix python/gatdaem1d
3 changes: 2 additions & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# March 10 2017
# Updated: Ross C Brodie, March 20 2017
# Updated: Ross C Brodie, March 21 2024 to Version 2.0
# Updated: Leon Foks, June 5 2024. Added .dylib
import sys
import os
from os.path import join
Expand All @@ -22,7 +23,7 @@
setup(name='gatdaem1d',
packages=['gatdaem1d'],
package_dir={'gatdaem1d':'gatdaem1d'},
package_data={'gatdaem1d':['gatdaem1d.so', 'gatdaem1d.dll']},
package_data={'gatdaem1d':['gatdaem1d.so', 'gatdaem1d.dll', 'gatdaem1d.dylib']},
scripts=[],
version='2.0.1',
description='Time-domain airborne electromagnetic forward modelling.',
Expand Down

0 comments on commit 9917c10

Please sign in to comment.