Skip to content

Commit

Permalink
Update platform scripts from llvm-17 to llvm-18.
Browse files Browse the repository at this point in the history
  • Loading branch information
tskisner committed Dec 19, 2023
1 parent a290388 commit 16b912e
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 22 deletions.
6 changes: 3 additions & 3 deletions platforms/linux-llvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

# This assumes you have created a virtualenv and installed toast
# dependencies (e.g. with wheels/install_deps_linux.sh) into that virtual
# env. This assumes installation of llvm-17 from LLVM apt sources.
# env. This assumes installation of llvm-18 from LLVM apt sources.

venv_path=$(dirname $(dirname $(which python3)))

export LD_LIBRARY_PATH="${venv_path}/lib"

cmake \
-DCMAKE_C_COMPILER="clang-17" \
-DCMAKE_CXX_COMPILER="clang++-17" \
-DCMAKE_C_COMPILER="clang-18" \
-DCMAKE_CXX_COMPILER="clang++-18" \
-DCMAKE_C_FLAGS="-O3 -g -fPIC -pthread -I${venv_path}/include" \
-DCMAKE_CXX_FLAGS="-O3 -g -fPIC -pthread -std=c++11 -stdlib=libc++ -I${venv_path}/include" \
-DUSE_OPENMP_TARGET=TRUE \
Expand Down
8 changes: 4 additions & 4 deletions platforms/venv_dev_llvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set -e

opts="$@"

suf="-17"
suf="-18"
if [ "x$(which clang++${suf})" = "x" ]; then
echo "The clang++${suf} compiler is not in your PATH, trying clang++"
if [ "x$(which clang++)" = "x" ]; then
Expand Down Expand Up @@ -46,10 +46,10 @@ export CFLAGS="-O3 -g -fPIC -pthread"
export FCFLAGS="-O3 -g -fPIC -pthread"
export CXXFLAGS="-O3 -g -fPIC -pthread -std=c++11 -stdlib=libc++ -I${INCDIR}"

export LD_LIBRARY_PATH="/usr/lib/llvm-17/lib:/usr/lib/gcc/x86_64-linux-gnu/11:${LIBDIR}"
export LIBRARY_PATH="/usr/lib/llvm-17/lib:/usr/lib/gcc/x86_64-linux-gnu/11:${LIBDIR}"
export LD_LIBRARY_PATH="/usr/lib/llvm-18/lib:/usr/lib/gcc/x86_64-linux-gnu/11:${LIBDIR}"
export LIBRARY_PATH="/usr/lib/llvm-18/lib:/usr/lib/gcc/x86_64-linux-gnu/11:${LIBDIR}"

# # export CMAKE_MODULE_LINKER_FLAGS="-L/usr/lib/llvm-17/lib -stdlib=libc++ "
# # export CMAKE_MODULE_LINKER_FLAGS="-L/usr/lib/llvm-18/lib -stdlib=libc++ "
# export LINK_OPTIONS="-stdlib=libc++"

cmake \
Expand Down
8 changes: 4 additions & 4 deletions platforms/venv_dev_llvm_static.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set -e

opts="$@"

suf="-17"
suf="-18"
if [ "x$(which clang++${suf})" = "x" ]; then
echo "The clang++${suf} compiler is not in your PATH, trying clang++"
if [ "x$(which clang++)" = "x" ]; then
Expand Down Expand Up @@ -46,10 +46,10 @@ export CFLAGS="-O3 -g -fPIC -pthread"
export FCFLAGS="-O3 -g -fPIC -pthread"
export CXXFLAGS="-O3 -g -fPIC -pthread -std=c++11 -stdlib=libc++ -I${INCDIR}"

export LD_LIBRARY_PATH="/usr/lib/llvm-17/lib:${LIBDIR}"
export LIBRARY_PATH="/usr/lib/llvm-17/lib:${LIBDIR}"
export LD_LIBRARY_PATH="/usr/lib/llvm-18/lib:${LIBDIR}"
export LIBRARY_PATH="/usr/lib/llvm-18/lib:${LIBDIR}"

# # export CMAKE_MODULE_LINKER_FLAGS="-L/usr/lib/llvm-17/lib -stdlib=libc++ "
# # export CMAKE_MODULE_LINKER_FLAGS="-L/usr/lib/llvm-18/lib -stdlib=libc++ "
# export LINK_OPTIONS="-stdlib=libc++"

cmake \
Expand Down
4 changes: 2 additions & 2 deletions platforms/venv_dev_setup_llvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ popd >/dev/null 2>&1
# Location of build helper tools
venvpkgdir=$(dirname "${scriptdir}")/packaging/venv

suf="-17"
suf="-18"
if [ "x$(which clang++${suf})" = "x" ]; then
echo "The clang++${suf} compiler is not in your PATH, trying clang++"
if [ "x$(which clang++)" = "x" ]; then
Expand Down Expand Up @@ -54,6 +54,6 @@ export CXXFLAGS="-O3 -g -fPIC -pthread -std=c++11 -stdlib=libc++"
export OMPFLAGS="-fopenmp"
export FCLIBS="-L/usr/lib/gcc/x86_64-linux-gnu/11 -lgfortran"

export LD_LIBRARY_PATH="/usr/lib/llvm-17/lib:/usr/lib/gcc/x86_64-linux-gnu/11:${envname}/lib"
export LD_LIBRARY_PATH="/usr/lib/llvm-18/lib:/usr/lib/gcc/x86_64-linux-gnu/11:${envname}/lib"

eval "${venvpkgdir}/install_deps_venv.sh" "${envname}" ${optional} no
4 changes: 2 additions & 2 deletions platforms/venv_dev_setup_llvm_static.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ popd >/dev/null 2>&1
# Location of build helper tools
venvpkgdir=$(dirname "${scriptdir}")/packaging/venv

suf="-17"
suf="-18"
if [ "x$(which clang++${suf})" = "x" ]; then
echo "The clang++${suf} compiler is not in your PATH, trying clang++"
if [ "x$(which clang++)" = "x" ]; then
Expand Down Expand Up @@ -54,6 +54,6 @@ export CXXFLAGS="-O3 -g -fPIC -pthread -std=c++11 -stdlib=libc++"
export OMPFLAGS="-fopenmp"
export FCLIBS="-L/usr/lib/gcc/x86_64-linux-gnu/11 -lgfortran"

export LD_LIBRARY_PATH="/usr/lib/llvm-17/lib:/usr/lib/gcc/x86_64-linux-gnu/11:${envname}/lib"
export LD_LIBRARY_PATH="/usr/lib/llvm-18/lib:/usr/lib/gcc/x86_64-linux-gnu/11:${envname}/lib"

eval "${venvpkgdir}/install_deps_venv.sh" "${envname}" ${optional} yes
2 changes: 2 additions & 0 deletions src/toast/ops/mapmaker_solve.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,8 @@ def _exec(self, data, detectors=None, **kwargs):
return

def _finalize(self, data, **kwargs):
for tname in data[self.template_matrix.amplitudes].keys():
print(f"DEBUG RHS {tname} = {data[self.template_matrix.amplitudes][tname]}", flush=True)
return

def _requires(self):
Expand Down
9 changes: 2 additions & 7 deletions src/toast/ops/pixels_wcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,9 +444,7 @@ def _exec(self, data, detectors=None, **kwargs):
# this calculation. This could eventually be a kernel.
ob.detdata[self.pixels].accel_update_host()
restore_dev = True
for det in ob.select_local_detectors(
detectors, flagmask=self.detector_pointing.det_flag_mask
):
for det in dets:
for vslice in view_slices:
good = ob.detdata[self.pixels][det, vslice] >= 0
self._local_submaps[
Expand Down Expand Up @@ -479,9 +477,7 @@ def _exec(self, data, detectors=None, **kwargs):
center_lonlat = ob.shared[self.center_offset].data

# Process all detectors
for det in ob.select_local_detectors(
detectors, flagmask=self.detector_pointing.det_flag_mask
):
for det in dets:
for vslice in view_slices:
# Timestream of detector quaternions
quats = ob.detdata[quats_name][det][vslice]
Expand Down Expand Up @@ -546,7 +542,6 @@ def _finalize(self, data, **kwargs):
return

def _requires(self):
req = self.detector_pointing.requires()
req = self.detector_pointing.requires()
if "detdata" not in req:
req["detdata"] = list()
Expand Down

0 comments on commit 16b912e

Please sign in to comment.