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

Commit

Permalink
Fixed typos in environment variables and made sure the -fno-underscor…
Browse files Browse the repository at this point in the history
…ing flag gets set when building SHTOOLS with gfortran
  • Loading branch information
daminton committed Jan 30, 2024
1 parent 0fca3ca commit 4e8def6
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
5 changes: 3 additions & 2 deletions buildscripts/build_shtools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ printf "*********************************************************\n"
printf "* BUILDING SHTOOLS LIBRARY *\n"
printf "*********************************************************\n"
printf "LIBS: ${LIBS}\n"
printf "FFLAGS: ${FFLAGS}\n"
printf "CFLAGS: ${CFLAGS}\n"
printf "CPPFLAGS: ${CPPFLAGS}\n"
printf "CPATH: ${CPATH}\n"
Expand All @@ -27,8 +28,8 @@ printf "LDFLAGS: ${LDFLAGS}\n"
printf "*********************************************************\n"

cd SHTOOLS
make F95="${FC}" CXX="${CXX}" fortran
make F95="${FC}" CXX="${CXX}" fortran-mp
make F95="${FC}" CXX="${CXX}" F95FLAGS="-m64 -fPIC -O3 -std=gnu -ffast-math ${FFLAGS}" fortran
make F95="${FC}" CXX="${CXX}" F95FLAGS="-m64 -fPIC -O3 -std=gnu -ffast-math ${FFLAGS}" fortran-mp
if [ -w ${PREFIX} ]; then
make PREFIX="${PREFIX}" install
else
Expand Down
2 changes: 1 addition & 1 deletion buildscripts/set_compilers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ case $OS in
. ${SCRIPT_DIR}/set_environment_macos.sh
FC=${HOMEBREW_PREFIX}/bin/gfortran-12
CFLAGS="-mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET} -Wno-deprecated-non-prototype -arch ${ARCH}"
FCFLAGS="-mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET} -arch ${ARCH}"
FCFLAGS="-mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET} -arch ${ARCH} -fno-underscoring"
FFLAGS=$FCFLAGS
LD_LIBRARY_PATH=""
CPATH=""
Expand Down
2 changes: 1 addition & 1 deletion buildscripts/set_environment_macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ CPPFLAGS="-isystem ${PREFIX}/include -isystem /usr/local/include -Xclang -fopenm
LIBS="-lomp"
CFLAGS="-mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET} -Wno-deprecated-non-prototype -arch ${ARCH}"
FCFLAGS="-mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET} -fno-underscoring"
FFFLAGS="${FCFLAGS}"
FFLAGS="${FCFLAGS}"
CFLAGS="${FCFLAGS} -Wno-deprecated-non-prototype"
CXXFLAGS="${CFLAGS}"
HDF5_ROOT="${PREFIX}"
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ LDFLAGS="-Wl,-rpath,${ROOT_DIR}/lib -Wl,-no_compact_unwind -L${PREFIX}/lib -L${
CPATH="/usr/local/include:${PREFIX}/include:${HOMEBREW_PREFIX}/include:${ROOT_DIR}/include"
CPPFLAGS="-isystem ${PREFIX}/include -isystem /usr/local/include"
LIBS="-lomp"
FCFLAGS="-mmacos-version-min=${MACOSX_DEPLOYMENT_TARGET} -arch ${ARCH}"
FFFLAGS="${FCFLAGS}"
FCFLAGS="-mmacos-version-min=${MACOSX_DEPLOYMENT_TARGET} -arch ${ARCH} -fno-underscoring"
FFLAGS="${FCFLAGS}"
CFLAGS="${FCFLAGS} -Wno-deprecated-non-prototype -arch ${ARCH}"
CXXFLAGS="${CFLAGS}"
HDF5_ROOT="${PREFIX}"
Expand Down
2 changes: 0 additions & 2 deletions src/whm/whm_kick.f90
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ module subroutine whm_kick_vh_pl(self, nbody_system, param, t, dt, lbeg)
logical, intent(in) :: lbeg !! Logical flag indicating whether this is the beginning of the half step or not.
! Internals
integer(I4B) :: i, npl
real(DP) :: tmp ! to check the acceleration kick due to the CB

associate(pl => self, cb => nbody_system%cb)
npl = self%nbody
Expand All @@ -263,7 +262,6 @@ module subroutine whm_kick_vh_pl(self, nbody_system, param, t, dt, lbeg)
do concurrent(i = 1:npl, pl%lmask(i))
#endif
pl%vh(:, i) = pl%vh(:, i) + pl%ah(:, i) * dt
! tmp = .mag.(pl%ah(:, i) - pl%aobl(:, i))
end do
end associate

Expand Down

0 comments on commit 4e8def6

Please sign in to comment.