Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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: 11 additions & 5 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
set -e

export ROOT=$(pwd)
export ROOT="$(pwd)"
echo "Building in $ROOT"

Help()
Expand Down Expand Up @@ -150,7 +150,8 @@ if [[ "$OS" == "Linux" ]]; then
BOOST_INCLUDEDIR=/usr/include/boost
BOOST_LIBRARYDIR=/usr/lib/x86_64-linux-gnu
CMAKE_CONFIG_DIR=/usr/lib/x86_64-linux-gnu/cmake
export BOOST_INCLUDEDIR BOOST_LIBRARYDIR CMAKE_CONFIG_DIR
MAKE="make"
export BOOST_INCLUDEDIR BOOST_LIBRARYDIR CMAKE_CONFIG_DIR MAKE
else
echo "Unknown Linux distro - please figure out the packages to install and submit an issue!"
exit 1
Expand All @@ -176,7 +177,8 @@ elif [[ "$OS" == "Darwin" ]]; then
CPPFLAGS="-I/$HOMEBREW_PREFIX/opt/libomp/include -I$HOMEBREW_PREFIX/include/suitesparse -I$HOMEBREW_PREFIX/include $CPPFLAGS -I$HOMEBREW_PREFIX//opt/openblas/include"
LEX=$HOMEBREW_PREFIX/opt/flex/bin/flex
BISON=$HOMEBREW_PREFIX/opt/bison/bin/bison
export PKG_CONFIG_PATH PATH LDFLAGS CPPFLAGS LEX BISON
MAKE="make"
export PKG_CONFIG_PATH PATH LDFLAGS CPPFLAGS LEX BISON MAKE

SUITESPARSE_INC=$HOMEBREW_PREFIX/include/suitesparse
LIBRARY_PATH=$HOMEBREW_PREFIX/lib
Expand All @@ -190,17 +192,21 @@ elif [[ "$OS" == "Windows_MSYS2" || "$OS" == "Cygwin" ]]; then
# check we have pacman
pacman --version

powershell -File ./scripts/set-path-length.ps1

./scripts/windows-install.sh

TRILINOS_CONFIGURE_OPTS="-DBLAS_LIBRARY_NAMES=openblas_64 -DBLAS_INCLUDE_DIRS=/ucrt64/include/openblas64 -DLAPACK_LIBRARY_NAMES=lapack64"
CONFIGURE_OPTS="-DBLAS_LIBRARY_NAMES=openblas_64 -DBLAS_INCLUDE_DIRS=/ucrt64/include/openblas64 -DLAPACK_LIBRARY_NAMES=lapack64 -DCMAKE_OBJECT_PATH_MAX=10000"
TRILINOS_CONFIGURE_OPTS="-DBLAS_LIBRARY_NAMES=openblas_64 -DBLAS_INCLUDE_DIRS=/ucrt64/include/openblas64 -DLAPACK_LIBRARY_NAMES=lapack64 -DCMAKE_OBJECT_PATH_MAX=10000"
SUITESPARSE_INC=/ucrt64/include/suitesparse
LIBRARY_PATH=/ucrt64/lib/x86_64-linux-gnu
INCLUDE_PATH=/ucrt64/include
BOOST_ROOT=/ucrt64
BOOST_INCLUDEDIR=/ucrt64/include/boost
BOOST_LIBRARYDIR=/ucrt64/lib/
PYTHON=/ucrt64/usr/bin/python3
export SUITESPARSE_INC LIBRARY_PATH INCLUDE_PATH BOOST_ROOT BOOST_INCLUDEDIR BOOST_LIBRARYDIR
MAKE=/ucrt64/bin/mingw32-make
export SUITESPARSE_INC LIBRARY_PATH INCLUDE_PATH BOOST_ROOT BOOST_INCLUDEDIR BOOST_LIBRARYDIR MAKE

NCPUS=$NUMBER_OF_PROCESSORS
CFLAGS="$CFLAGS -fpermissive"
Expand Down
6 changes: 4 additions & 2 deletions scripts/build-trilinos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,13 @@ cmake \
-DAMD_LIBRARY_DIRS="$LIBRARY_PATH" \
-DTrilinos_SET_GROUP_AND_PERMISSIONS_ON_INSTALL_BASE_DIR="$ARCHDIR" \
$CONFIGURE_OPTS \
-G "Unix Makefiles" \
-DCMAKE_MAKE_PROGRAM=${MAKE} \
-S "$ROOT/_source/trilinos" \
-B "$ROOT/$BUILDDIR/trilinos" 2>&1 | tee "$ROOT/$BUILDDIR/configure-trilinos.log"

echo "Building Trilinos..."
NCPUS="${NCPUS:-$(nproc)}"
make -C $BUILDDIR/trilinos -j $NCPUS 2>&1 | tee "$ROOT/$BUILDDIR/build-trilinos.log"
make -C $BUILDDIR/trilinos install
${MAKE} -C $BUILDDIR/trilinos -j $NCPUS 2>&1 | tee "$ROOT/$BUILDDIR/build-trilinos.log"
${MAKE} -C $BUILDDIR/trilinos install

2 changes: 1 addition & 1 deletion scripts/build-xdm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ $CONFIGURE_OPTS \

echo "Building XDM..."
NCPUS="${NCPUS:-$(nproc)}"
make -C $BUILDDIR/XDM -j $NCPUS 2>&1 | tee "$ROOT/$BUILDDIR/build-XDM.log"
${MAKE} -C $BUILDDIR/XDM -j $NCPUS 2>&1 | tee "$ROOT/$BUILDDIR/build-XDM.log"

4 changes: 2 additions & 2 deletions scripts/build-xyce.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ popd

echo "Building Xyce..."
NCPUS="${NCPUS:-$(nproc)}"
echo "make -C $BUILDDIR/Xyce -j $NCPUS V=1 2>&1 | tee \"$ROOT/$BUILDDIR/Xyce-build.log\""
make -C $BUILDDIR/Xyce -j $NCPUS V=1 2>&1 | tee "$ROOT/$BUILDDIR/Xyce-build.log"
echo "${MAKE} -C $BUILDDIR/Xyce -j $NCPUS V=1 2>&1 | tee \"$ROOT/$BUILDDIR/Xyce-build.log\""
${MAKE} -C $BUILDDIR/Xyce -j $NCPUS V=1 2>&1 | tee "$ROOT/$BUILDDIR/Xyce-build.log"

30 changes: 15 additions & 15 deletions scripts/fetch-source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,30 @@ CloneOrUpdate()
repo=$3
echo

if [ ! -d $repo ]; then
echo "Cloning $url branch $branch into $repo"
git clone --depth=1 $url -b $branch $repo
if [ ! -d "$repo" ]; then
echo "Cloning $url branch $branch into "$repo""
git clone --depth=1 $url -b $branch "$repo"
else
echo "Updating $url branch $branch into $repo"
git -C $repo remote set-url origin $url
git -C $repo fetch --depth=1
git -C $repo checkout $branch
if [ -n "$RESET_GIT" ]; then git -C $repo reset --hard origin/$branch; fi
git -C $repo clean -xdf
git -C $repo prune --expire now
git -C $repo repack -a -d
echo "Updating $url branch $branch into "$repo""
git -C "$repo" remote set-url origin $url
git -C "$repo" fetch --depth=1
git -C "$repo" checkout $branch
if [ -n "$RESET_GIT" ]; then git -C "$repo" reset --hard origin/$branch; fi
git -C "$repo" clean -xdf
git -C "$repo" prune --expire now
git -C "$repo" repack -a -d
fi
echo
}
mkdir -p _source
CloneOrUpdate https://github.com/Xyce/Xyce master $ROOT/_source/Xyce
CloneOrUpdate https://github.com/Xyce/Xyce master "$ROOT/_source/Xyce"

# https://github.com/Xyce/Xyce_Regression/issues/4
CloneOrUpdate https://github.com/robtaylor/Xyce_Regression cmake-370-windows $ROOT/_source/Xyce_Regression
CloneOrUpdate https://github.com/robtaylor/Xyce_Regression cmake-370-windows "$ROOT/_source/Xyce_Regression"
# See https://github.com/Xyce/XDM/issues/11
CloneOrUpdate https://github.com/robtaylor/XDM fixsstream $ROOT/_source/XDM
CloneOrUpdate https://github.com/robtaylor/XDM fixsstream "$ROOT/_source/XDM"

# Backport KokkosKernels: patch #2296 to 14.4.0
CloneOrUpdate https://github.com/robtaylor/Trilinos win-fix $ROOT/_source/trilinos
CloneOrUpdate https://github.com/robtaylor/Trilinos win-fix "$ROOT/_source/trilinos"


2 changes: 1 addition & 1 deletion scripts/install-xdm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e
set -o pipefail

echo "Installing XDMe..."
make -C $BUILDDIR/XDM install 2>&1 | tee $BUILDDIR/install-XDM.log
${MAKE} -C $BUILDDIR/XDM install 2>&1 | tee $BUILDDIR/install-XDM.log

echo "Build completed successfully!"
echo "Xyce installed to: $INSTALL_PATH"
Expand Down
2 changes: 1 addition & 1 deletion scripts/install-xyce.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e
set -o pipefail

echo "Installing Xyce..."
make -C $BUILDDIR/Xyce install 2>&1 | tee $BUILDDIR/install-Xyce.log
${MAKE} -C $BUILDDIR/Xyce install 2>&1 | tee $BUILDDIR/install-Xyce.log

echo "Build completed successfully!"
echo "Xyce installed to: $INSTALL_PATH"
Expand Down
1 change: 1 addition & 0 deletions scripts/set-path-length.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
30 changes: 17 additions & 13 deletions scripts/windows-install.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
#!/bin/bash
d# Install dependencies using apt
# Install dependencies using apt
echo "Installing dependencies..."
pacman -S --needed \
pactoys \
bison \
flex \
mingw-w64-ucrt-x86_64-cmake \
mingw-w64-ucrt-x86_64-make \
mingw-w64-ucrt-x86_64-msmpi \
mingw-w64-ucrt-x86_64-openblas64 \
mingw-w64-ucrt-x86_64-lapack64 \
mingw-w64-ucrt-x86_64-fftw \
mingw-w64-ucrt-x86_64-suitesparse \
mingw-w64-ucrt-x86_64-msmpi \
mingw-w64-ucrt-x86_64-pkgconf \
mingw-w64-ucrt-x86_64-boost \
mingw-w64-ucrt-x86_64-boost-libs
flex

pacboy -S --needed \
msmpi \
cmake \
make \
openblas64 \
lapack64 \
fftw \
suitesparse \
pkgconf \
boost \
boost-libs \
automake \
autoconf

curl -L -O https://github.com/microsoft/Microsoft-MPI/releases/download/v10.1.1/msmpisetup.exe
./msmpisetup.exe -unattend -force
Expand Down
8 changes: 4 additions & 4 deletions scripts/xyce-regression.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ BUILD_DIR="$ROOT/$BUILDDIR"
mkdir -p $BUILD_DIR

XYCE_BINARY="$BUILD_DIR/Xyce/src/Xyce"
XYCE_REGRESSION=$ROOT/_source/Xyce_Regression
XYCE_REGRESSION="$ROOT/_source/Xyce_Regression"

NCPUS="${NCPUS:-$(nproc)}"

Expand All @@ -17,8 +17,8 @@ eval `$XYCE_REGRESSION/TestScripts/suggestXyceTagList.sh "$XYCE_BINARY"`
$XYCE_REGRESSION/TestScripts/run_xyce_regressionMP \
--verbose \
--numproc=$NCPUS \
--xyce_test=$XYCE_REGRESSION \
--xyce_test="$XYCE_REGRESSION" \
--taglist="${TAGLIST}" \
--output=$BUILD_DIR/Xyce_Regression \
--resultfile=$BUILD_DIR/regression.results \
--output="$BUILD_DIR/Xyce_Regression" \
--resultfile="$BUILD_DIR/regression.results" \
"${EXECSTRING}"
Loading