Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Merge branch 'master' into oblate_coord_rot
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Oct 4, 2023
2 parents 66cee2c + 47e3c88 commit 2b34c48
Show file tree
Hide file tree
Showing 10 changed files with 51 additions and 242 deletions.
5 changes: 5 additions & 0 deletions buildscripts/build_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ if ! command -v ninja &> /dev/null; then
fi
fi

# Get the OpenMP Libraries
if [ $OS = "MacOSX" ]; then
${SCRIPT_DIR}/get_lomp.sh ${ARGS}
fi

${SCRIPT_DIR}/build_zlib.sh ${ARGS}
${SCRIPT_DIR}/build_hdf5.sh ${ARGS}
${SCRIPT_DIR}/build_netcdf-c.sh ${ARGS}
Expand Down
22 changes: 1 addition & 21 deletions buildscripts/build_hdf5.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,14 @@
# If not, see: https://www.gnu.org/licenses.

HDF5_VER="1_14_2"
PLUGIN_VER="1.14.0"
ZLIB_VER="1.3"

SCRIPT_DIR=$(realpath $(dirname $0))
set -a
ARGS=$@
. ${SCRIPT_DIR}/_build_getopts.sh ${ARGS}
. ${SCRIPT_DIR}/set_compilers.sh
# Get the OpenMP Libraries
if [ $OS = "MacOSX" ]; then
${SCRIPT_DIR}/get_lomp.sh ${ARGS}
fi


NPROC=$(nproc)

Expand Down Expand Up @@ -54,7 +50,6 @@ fi
if [ ! -d ${DEPENDENCY_DIR}/hdfsrc ]; then
curl -s -L https://github.com/HDFGroup/hdf5/releases/download/hdf5-${HDF5_VER}/hdf5-${HDF5_VER}.tar.gz | tar xvz -C ${DEPENDENCY_DIR}
fi

printf "\n"
printf "*********************************************************\n"
printf "* BUILDING HDF5 LIBRARY *\n"
Expand All @@ -68,9 +63,6 @@ printf "LDFLAGS: ${LDFLAGS}\n"
printf "*********************************************************\n"

cd ${DEPENDENCY_DIR}/hdfsrc
ZLIB_TGZ_NAME="zlib-${ZLIB_VER}.tar.gz"
ZLIB_TGZ_ORIGPATH="https://github.com/madler/zlib/releases/download/v${ZLIB_VER}/"
curl -L "https://github.com/HDFGroup/hdf5_plugins/archive/refs/tags/${PLUGIN_VER}.tar.gz" -o hdf5_plugins.tar.gz

HDF5_ROOT=${PREFIX}
ZLIB_ROOT=${PREFIX}
Expand Down Expand Up @@ -108,18 +100,6 @@ else
sudo cmake --install build
fi

# tar xvzf hdf5_plugins.tar.gz
# PLUGIN_SOURCE=hdf5_plugins-${PLUGIN_VER}

# BUILD_OPTIONS="-DTGZPATH:PATH=${PLUGIN_SOURCE}/libs -DH5PL_ALLOW_EXTERNAL_SUPPORT:STRING=\"TGZ\""
# cmake -B ${PLUGIN_SOURCE}/build -C ${PLUGIN_SOURCE}/config/cmake/cacheinit.cmake -DCMAKE_BUILD_TYPE:STRING=Release ${BUILD_OPTIONS} -G Ninja ${PLUGIN_SOURCE}
# cmake --build ${PLUGIN_SOURCE}/build -j${NPROC} --config Release
# if [ -w ${PREFIX} ]; then
# cmake --install ${PLUGIN_SOURCE}/build
# else
# sudo cmake --install ${PLUGIN_SOURCE}/build
# fi

if [ $? -ne 0 ]; then
printf "hdf5 could not be compiled.\n"
exit 1
Expand Down
4 changes: 0 additions & 4 deletions buildscripts/build_netcdf-c.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ set -a
ARGS=$@
. ${SCRIPT_DIR}/_build_getopts.sh ${ARGS}
. ${SCRIPT_DIR}/set_compilers.sh
# Get the OpenMP Libraries
if [ $OS = "MacOSX" ]; then
${SCRIPT_DIR}/get_lomp.sh ${ARGS}
fi

NPROC=$(nproc)

Expand Down
4 changes: 0 additions & 4 deletions buildscripts/build_netcdf-fortran.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ set -a
ARGS=$@
. ${SCRIPT_DIR}/_build_getopts.sh ${ARGS}
. ${SCRIPT_DIR}/set_compilers.sh
# Get the OpenMP Libraries
if [ $OS = "MacOSX" ]; then
${SCRIPT_DIR}/get_lomp.sh ${ARGS}
fi

NPROC=$(nproc)

Expand Down
4 changes: 0 additions & 4 deletions buildscripts/build_zlib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ set -a
ARGS=$@
. ${SCRIPT_DIR}/_build_getopts.sh ${ARGS}
. ${SCRIPT_DIR}/set_compilers.sh
# Get the OpenMP Libraries
if [ $OS = "MacOSX" ]; then
${SCRIPT_DIR}/get_lomp.sh ${ARGS}
fi

NPROC=$(nproc)

Expand Down
9 changes: 5 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "swiftest"
version = "2023.9.4"
version = "2023.10.0"
authors=[
{name = 'David A. Minton', email='daminton@purdue.edu'},
{name = 'Carlisle Wishard'},
Expand Down Expand Up @@ -30,8 +30,9 @@ dependencies = [
'dask>=2022.1',
'distributed>=2022.1',
'bottleneck>=1.3.5',
'h5netcdf>=1.0.2',
'netcdf4>=1.6.2',
'h5netcdf',
'h5py',
'netcdf4',
'matplotlib>=3.7.1',
'astropy>=5.1',
'astroquery>=0.4.6',
Expand Down Expand Up @@ -103,7 +104,7 @@ before-all = [
]

[tool.cibuildwheel.linux]
skip = "cp312-*"
skip = "cp312-* pp* -manylinux_i686* *-musllinux*"
before-all = [
"yum install doxygen libxml2-devel libcurl-devel fftw-devel blas-devel lapack-devel -y",
"buildscripts/build_dependencies.sh -p /usr/local"
Expand Down
2 changes: 1 addition & 1 deletion src/globals/globals_module.f90
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ module globals
integer(I4B), parameter :: UPPERCASE_OFFSET = iachar('A') - iachar('a') !! ASCII character set parameter for lower to upper
!! conversion - offset between upper and lower

character(*), parameter :: VERSION = "2023.9.4" !! Swiftest version
character(*), parameter :: VERSION = "2023.10.0" !! Swiftest version

!> Symbolic name for integrator types
character(*), parameter :: UNKNOWN_INTEGRATOR = "UKNOWN INTEGRATOR"
Expand Down
11 changes: 5 additions & 6 deletions swiftest/simulation_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,15 +412,16 @@ def run(self,dask: bool = False, **kwargs):
if len(kwargs) > 0:
self.set_parameter(**kwargs)

# Write out the current parameter set before executing run
self.write_param()

if self.codename != "Swiftest":
warnings.warn(f"Running an integration is not yet supported for {self.codename}",stacklevel=2)
return

# Save initial conditions
if not self.restart:
self.clean()

# Write out the current parameter set before executing run
self.write_param(verbose=False,**kwargs)

print(f"Running a {self.codename} {self.integrator} run from tstart={self.param['TSTART']} {self.TU_name} to tstop={self.param['TSTOP']} {self.TU_name}")

Expand Down Expand Up @@ -2176,10 +2177,8 @@ def add_solar_system_body(self,
dsnew = init_cond.vec2xr(self.param,**kwargs)

dsnew = self._combine_and_fix_dsnew(dsnew)
if dsnew['npl'] > 0 or dsnew['ntp'] > 0:
if dsnew['id'].max(dim='name') > 0 and dsnew['name'].size > 0:
self.save(verbose=False)



self.init_cond = self.data.copy(deep=True)

Expand Down
Loading

0 comments on commit 2b34c48

Please sign in to comment.