Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updates #1

Merged
merged 1 commit into from
Mar 13, 2024
Merged
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
17 changes: 17 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: ubuntu

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
sudo apt-get update
sudo apt-get install -y libopenmpi-dev libhdf5-openmpi-dev
./mkn.sh
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.cmake*
include
lib
share
Expand Down
29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

44 changes: 33 additions & 11 deletions mkn.sh
Original file line number Diff line number Diff line change
@@ -1,22 +1,44 @@
#!/usr/bin/env bash
set -e
THREADS=${THREADS:=""}
THREADS=${THREADS:="2"}
CWD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
DIR="samrai"
GIT_URL="https://github.com/llnl/$DIR"
VERSION="master"
VERSION="develop"
FFF=("include" "lib" "$DIR" "share")
[ ! -z "$MKN_CLEAN" ] && (( $MKN_CLEAN == 1 )) && for f in ${FFF[@]}; do rm -rf $CWD/$f; done
[ ! -d "$CWD/$DIR" ] && git clone --depth 1 $GIT_URL -b $VERSION $DIR --recursive
cd $CWD/$DIR
rm -rf build && mkdir build && cd build
rm -rf build && mkdir build

cmake .. \
-DENABLE_OPENMP=OFF -DENABLE_SAMRAI_TESTS=OFF \
-DCMAKE_INSTALL_PREFIX=$CWD \
-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=true \
-DCMAKE_CXX_FLAGS="-g0 -O3 -march=native -mtune=native" \
-DCMAKE_BUILD_TYPE=Release # -DBUILD_SHARED_LIBS=ON
CMAKE_CONFIG=""

make VERBOSE=1 -j$THREADS && make install
cd .. && rm -rf build
## SUPER RELEASE
CMAKE_CXX_FLAGS="-DNDEBUG -g0 -O3 -march=native -mtune=native"
CMAKE_BUILD_TYPE="Release"

# ## OPTIMZ AND DEBUG
# CMAKE_CXX_FLAGS="-g3 -O3 -march=native -mtune=native -fno-omit-frame-pointer"
# CMAKE_BUILD_TYPE="RelWithDebInfo"

# ## PURE DEBUG
# CMAKE_CXX_FLAGS="-g3 -O0 -fno-omit-frame-pointer"
# CMAKE_BUILD_TYPE="Debug"

CMAKE_CONFIG+=" -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}"

time (
date
(
cd build
cmake .. \
-DENABLE_OPENMP=OFF -DENABLE_SAMRAI_TESTS=OFF \
-DCMAKE_INSTALL_PREFIX=$CWD -DENABLE_DOCS=ON \
-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=true \
-DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS}" \
${CMAKE_CONFIG} # -DBUILD_SHARED_LIBS=ON
make VERBOSE=1 -j$THREADS && make install
)
rm -rf build
date
) 1> >(tee $CWD/.cmake.sh.out ) 2> >(tee $CWD/.cmake.sh.err >&2 )
2 changes: 1 addition & 1 deletion mkn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ profile:
SAMRAI_mesh SAMRAI_pdat
SAMRAI_solv SAMRAI_xfer
SAMRAI_hier SAMRAI_tbox
mpi++ mpi
mpi