-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2f84939
commit cfc9a84
Showing
6 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
ARG RELEASE=40 | ||
FROM 129.104.6.165:32219/phare/teamcity-fedora_dep:$RELEASE | ||
|
||
ENV OMPI_ALLOW_RUN_AS_ROOT=1 | ||
ENV OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 | ||
ENV TMPDIR=/tmp | ||
ENV MODULEPATH=/etc/scl/modulefiles:/etc/scl/modulefiles:/usr/share/Modules/modulefiles:/etc/modulefiles:/usr/share/modulefiles | ||
ENV PYTHONPATH="/root/phare:/root/phare/build:/root/phare/pyphare" | ||
|
||
WORKDIR /root | ||
COPY run.sh /root | ||
RUN chmod +x run.sh && ./run.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env bash | ||
BASEDIR=$(dirname "$0") | ||
RELEASE=${1:-40} | ||
REGISTRY=${2:-"129.104.6.165:32219"} | ||
IMAGE="phare/teamcity-fedora_data" | ||
FULL_NAME="${REGISTRY}/${IMAGE}:${RELEASE}" | ||
$BASEDIR/build_image.sh $RELEASE $REGISTRY | ||
docker push $FULL_NAME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env bash | ||
RELEASE=${1:-40} | ||
REGISTRY=${2:-"129.104.6.165:32219"} | ||
IMAGE="phare/teamcity-fedora_data" | ||
FULL_NAME="${REGISTRY}/${IMAGE}:${RELEASE}" | ||
docker build --build-arg RELEASE=$RELEASE -t ${FULL_NAME} . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env bash | ||
set -xe | ||
|
||
eval "$(modulecmd bash load mpi/openmpi-x86_64)" | ||
|
||
( | ||
cd /root | ||
git clone https://github.com/PHAREHUB/PHARE --depth 10 --recursive --shallow-submodules phare | ||
cd phare && mkdir build && cd build | ||
|
||
# we are not keeping these binaries, only output data - portability is not an issue | ||
CMAKE_CXX_FLAGS="-DNDEBUG -g0 -O3 -march=native -mtune=native" | ||
CMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -DPHARE_DIAG_DOUBLES=1" | ||
CMAKE_CONFIG="-DCMAKE_BUILD_TYPE=Release" | ||
cmake -G Ninja ${CMAKE_CONFIG} -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS}" .. | ||
ninja | ||
) | ||
|
||
( | ||
cd /root/phare | ||
export PYTHONPATH="$PWD:$PWD/build:$PWD/pyphare" | ||
./tools/data/generate.sh | ||
) | ||
rm -rf /root/phare |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env bash | ||
set -ex | ||
CWD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
|
||
( | ||
cd $CWD | ||
mpirun -n 4 tests/simulator/test_init_from_samrai.py | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import copy | ||
import numpy as np | ||
import pyphare.pharein as ph | ||
from pyphare.simulator.simulator import Simulator | ||
from tests.simulator import test_restarts | ||
from tests.diagnostic import dump_all_diags | ||
from pathlib import Path | ||
|
||
time_step = 0.001 | ||
time_step_nbr = 5 | ||
final_time = time_step_nbr * time_step | ||
timestamps = np.arange(0, final_time + time_step, time_step) | ||
first_out = str(Path.home() / "phare_data" / "tests/simulator/test_from_init") | ||
|
||
if __name__ == "__main__": | ||
simput = copy.deepcopy(test_restarts.simArgs) | ||
simput["restart_options"]["dir"] = first_out | ||
simput["restart_options"]["timestamps"] = timestamps | ||
simput["diag_options"]["options"]["dir"] = first_out | ||
sim = ph.Simulation(**simput) | ||
dump_all_diags(test_restarts.setup_model().populations, timestamps=timestamps) | ||
Simulator(sim).run() |