Skip to content

Commit

Permalink
Bump to 0.68.1
Browse files Browse the repository at this point in the history
Merge branch 'main' into release/0.68
  • Loading branch information
german committed Apr 2, 2024
2 parents 3d66316 + 5964386 commit 28371c7
Show file tree
Hide file tree
Showing 172 changed files with 4,834 additions and 2,602 deletions.
45 changes: 45 additions & 0 deletions .ci/collect_mapdl_logs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/bin/bash
if [[ $MAPDL_VERSION == *"ubuntu"* ]] ; then
echo "It is an ubuntu based image"
export FILE=/jobs/file
export WDIR='/jobs/'

else
echo "It is a CentOS based image"
export FILE=file
export WDIR=""

fi;


mkdir "$LOG_NAMES" && echo "Successfully generated directory $LOG_NAMES"

####
echo "Collecting MAPDL logs..."

(docker exec "$MAPDL_INSTANCE" /bin/bash -c "mkdir -p /mapdl_logs && echo 'Successfully created directory inside docker container'") || echo "Failed to create a directory inside docker container for logs."
(docker exec "$MAPDL_INSTANCE" /bin/bash -c "if compgen -G '$FILE*.out' > /dev/null ;then cp -f /file*.out /mapdl_logs && echo 'Successfully copied out files.'; fi") || echo "Failed to copy the 'out' files into a local file"
(docker exec "$MAPDL_INSTANCE" /bin/bash -c "if compgen -G '$FILE*.err' > /dev/null ;then cp -f /file*.err /mapdl_logs && echo 'Successfully copied err files.'; fi") || echo "Failed to copy the 'err' files into a local file"
(docker exec "$MAPDL_INSTANCE" /bin/bash -c "if compgen -G '$FILE*.log' > /dev/null ;then cp -f /file*.log /mapdl_logs && echo 'Successfully copied log files.'; fi") || echo "Failed to copy the 'log' files into a local file"
(docker exec "$MAPDL_INSTANCE" /bin/bash -c "if compgen -G '$WDIR*.crash' > /dev/null ;then cp -f /*.crash /mapdl_logs && echo 'Successfully copied crash files.'; fi") || echo "Failed to copy the 'crash' files into a local file"

docker cp "$MAPDL_INSTANCE":/mapdl_logs/. ./"$LOG_NAMES"/. || echo "Failed to copy the 'log-build-docs' files into a local directory"

####
echo "Collecting local build logs..."

echo "Collecting docker run log..."
cp log.txt ./"$LOG_NAMES"/log.txt || echo "MAPDL run docker log not found."

echo "Copying docker launch log..."
cp mapdl_launch_0.log ./"$LOG_NAMES"/mapdl_launch_0.log || echo "MAPDL launch docker log not found."
cp mapdl_launch_1.log ./"$LOG_NAMES"/mapdl_launch_1.log || echo "MAPDL launch docker log not found."

echo "Collecting file structure..."
ls -R > ./"$LOG_NAMES"/files_structure.txt || echo "Failed to copy file structure to a file"

echo "Collecting docker file structure..."
docker exec "$MAPDL_INSTANCE" /bin/bash -c "ls -R" > ./"$LOG_NAMES"/docker_files_structure.txt || echo "Failed to copy the docker structure into a local file"

echo "Tar files..."
tar cvzf ./"$LOG_NAMES".tgz ./"$LOG_NAMES" || echo "Failed to compress"
20 changes: 20 additions & 0 deletions .ci/display_logs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

echo "::group:: Display files structure" && ls -R && echo "::endgroup::"


echo "::group:: Display files structure" && docker exec "$MAPDL_INSTANCE" /bin/bash -c "ls -R" && echo "::endgroup::" || echo "Failed to display the docker structure."


echo "::group:: Display docker run log" && cat log.txt && echo "::endgroup::"

# Displaying MAPDL files
FILE_PAT=./"$LOG_NAMES"/*.err
if compgen -G "$FILE_PAT" > /dev/null ;then for f in "$FILE_PAT"; do echo "::group:: Error file $f" && cat "$f" && echo "::endgroup::" ; done; fi || echo "Failed to display the 'out' files."

FILE_PAT=./"$LOG_NAMES"/*.log
if compgen -G "$FILE_PAT" > /dev/null ;then for f in "$FILE_PAT"; do echo "::group:: Log file $f" && cat "$f" && echo "::endgroup::" ; done; fi || echo "Failed to display the 'err' files."

FILE_PAT=./"$LOG_NAMES"/*.out
if compgen -G "$FILE_PAT" > /dev/null ;then for f in "$FILE_PAT"; do echo "::group:: Output file $f" && cat "$f" && echo "::endgroup::" ; done; fi || echo "Failed to display the 'log' files."

48 changes: 41 additions & 7 deletions .ci/start_mapdl.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,40 @@
#!/bin/bash
echo "MAPDL Instance name: $INSTANCE_NAME"
echo "MAPDL_VERSION: $MAPDL_VERSION"

export MAPDL_IMAGE="$MAPDL_PACKAGE:$MAPDL_VERSION"
echo "MAPDL_IMAGE: $MAPDL_IMAGE"
docker pull "$MAPDL_IMAGE"

export MAJOR=$(echo "$MAPDL_VERSION" | head -c 3 | tail -c 2)
export MINOR=$(echo "$MAPDL_VERSION" | head -c 5 | tail -c 1)

export VERSION="$MAJOR$MINOR"
echo "MAPDL VERSION: $VERSION"


if [[ $MAPDL_VERSION == *"latest-ubuntu"* ]]; then
echo "It is latest-ubuntu. Using 'ansys' script to launch"
export EXEC_PATH=ansys
# export P_SCHEMA=/ansys_inc/ansys/ac4/schema

elif [[ $MAPDL_VERSION == *"ubuntu"* ]] ; then
echo "It is an ubuntu based image"
export EXEC_PATH=/ansys_inc/v$VERSION/ansys/bin/mapdl
export P_SCHEMA=/ansys_inc/v$VERSION/ansys/ac4/schema

else
echo "It is a CentOS based image"
export EXEC_PATH=/ansys_inc/ansys/bin/mapdl
export P_SCHEMA=/ansys_inc/ansys/ac4/schema
fi;

echo "EXEC_PATH: $EXEC_PATH"
echo "P_SCHEMA: $P_SCHEMA"

docker run \
--name mapdl \
--entrypoint "/bin/bash" \
--name "$INSTANCE_NAME" \
--restart always \
--health-cmd="ps aux | grep \"[/]ansys_inc/.*ansys\.e.*grpc\" -q && echo 0 || echo 1" \
--health-interval=0.5s \
Expand All @@ -12,12 +45,13 @@ docker run \
-e ANSYS_LOCK="OFF" \
-p "$PYMAPDL_PORT":50052 \
-p "$PYMAPDL_DB_PORT":50055 \
--shm-size=1gb \
--shm-size=2gb \
-e I_MPI_SHM_LMT=shm \
-e P_SCHEMA=/ansys_inc/ansys/ac4/schema \
--oom-kill-disable \
--memory=6656MB \
-e P_SCHEMA="$P_SCHEMA" \
-w /jobs \
-u=0:0 \
--memory=6656MB \
--memory-swap=16896MB \
"$MAPDL_IMAGE" \
-"$DISTRIBUTED_MODE" -np 2 > log.txt &
"$MAPDL_IMAGE" "$EXEC_PATH" -grpc -dir /jobs -"$DISTRIBUTED_MODE" -np 2 > log.txt &

grep -q 'Server listening on' <(timeout 60 tail -f log.txt)
18 changes: 0 additions & 18 deletions .ci/start_mapdl_student.sh

This file was deleted.

24 changes: 0 additions & 24 deletions .ci/start_mapdl_ubuntu.sh

This file was deleted.

5 changes: 5 additions & 0 deletions .ci/substitute_defective_gif.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
cd doc/_build/html/examples/gallery_examples/00-mapdl-examples
cp ../../../../../source/images/dcb.gif ../../../_images/
sed -i 's+../../../_images/sphx_glr_composite_dcb_004.gif+../../../_images/dcb.gif+g' composite_dcb.html
cd ../../../../../../
19 changes: 19 additions & 0 deletions .ci/waiting_services.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash
echo "Waiting for the MAPDL service to be up..."
nc -v -z localhost "$PYMAPDL_PORT"
echo "::group:: ps aux Output" && ps aux && echo "::endgroup::"

echo "Waiting for MAPDL port is open..."
echo "::group:: Waiting for the MAPDL port to be open..."
while ! nc -z localhost "$PYMAPDL_PORT"; do
sleep 0.1
done
echo "::endgroup::"
echo "MAPDL service is up!"

echo "::group:: Waiting for the DPF port to be open..."
while ! nc -z localhost "$DPF_PORT"; do
sleep 0.1
done
echo "::endgroup::"
echo "DPF service is up!"
14 changes: 7 additions & 7 deletions .devcontainer/codespaces-dev/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
ansys-dpf-core==0.10.1
autopep8==2.0.4
autopep8==2.1.0
matplotlib==3.8.3
scipy==1.12.0
pandas==2.2.0
pandas==2.2.1
pyiges[full]==0.3.1
pytest==8.0.1
pytest-cov==4.1.0
pyvista==0.43.3
pytest==8.1.1
pytest-cov==5.0.0
pyvista==0.43.4
pyansys-tools-report==0.7.0
vtk==9.3.0
pytest-rerunfailures==13.0
pytest-rerunfailures==14.0
pytest-pyvista==0.1.9
pytest-timeout==2.2.0
pytest-timeout==2.3.1
12 changes: 6 additions & 6 deletions .devcontainer/codespaces-docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
sphinx==7.2.6
ansys-dpf-core==0.10.1
ansys-mapdl-reader==0.53.0
ansys-sphinx-theme==0.14.0
grpcio==1.62.0
ansys-sphinx-theme==0.14.1
grpcio==1.62.1
imageio-ffmpeg==0.4.9
imageio==2.34.0
jupyter_sphinx==0.5.3
jupyterlab>=3.2.8
matplotlib==3.8.3
numpydoc==1.6.0
pandas==2.2.0
plotly==5.19.0
numpydoc==1.7.0
pandas==2.2.1
plotly==5.20.0
pyiges[full]==0.3.1
pypandoc==1.13
pytest-sphinx==0.6.0
pythreejs==2.4.2
pyvista[trame]==0.43.3
pyvista[trame]==0.43.4
sphinx-autobuild==2024.2.4
sphinx-autodoc-typehints==1.25.2
sphinx-copybutton==0.5.2
Expand Down
14 changes: 7 additions & 7 deletions .devcontainer/devcontainer-local/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
ansys-dpf-core==0.10.1
autopep8==2.0.4
autopep8==2.1.0
matplotlib==3.8.3
scipy==1.12.0
pandas==2.2.0
pandas==2.2.1
pyiges[full]==0.3.1
pytest==8.0.1
pytest-cov==4.1.0
pyvista==0.43.3
pytest==8.1.1
pytest-cov==5.0.0
pyvista==0.43.4
pyansys-tools-report==0.7.0
vtk==9.3.0
pytest-rerunfailures==13.0
pytest-rerunfailures==14.0
pytest-pyvista==0.1.9
pytest-timeout==2.2.0
pytest-timeout==2.3.1
21 changes: 16 additions & 5 deletions .github/workflows/cache_cleaner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
uses: actions/checkout@v4.1.2

- name: Cleanup PR caches
if: github.event_name != 'workflow_dispatch'
Expand All @@ -26,9 +26,15 @@ jobs:
## Setting this to not fail the workflow while deleting cache keys.
set +e
echo "Deleting caches..."
for cacheKey in $cacheKeysForPR
while [ ! -z "$cacheKeysForPR" ];
do
gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm && echo "Deleting cache with key: $cacheKey"
for cacheKey in $cacheKeysForPR
do
gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm && echo "Deleting cache with key: $cacheKey"
done
cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH | cut -f 1 )
done
echo "Done"
env:
Expand All @@ -48,9 +54,14 @@ jobs:
## Setting this to not fail the workflow while deleting cache keys.
set +e
echo "Deleting caches..."
for cacheKey in $cacheKeysForPR
while [ ! -z "$cacheKeysForPR" ];
do
gh actions-cache delete $cacheKey -R $REPO --confirm && echo "Deleting cache with key: $cacheKey"
for cacheKey in $cacheKeysForPR
do
gh actions-cache delete $cacheKey -R $REPO --confirm && echo "Deleting cache with key: $cacheKey"
done
cacheKeysForPR=$(gh actions-cache list -R $REPO | cut -f 1 )
done
echo "Done"
env:
Expand Down

0 comments on commit 28371c7

Please sign in to comment.