Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
eb3417b
draft
dipinknair Aug 18, 2025
498eb2d
draft
dipinknair Aug 18, 2025
3a2fa8f
feat: applying latest changes
clatapie Aug 19, 2025
6aa0102
Merge branch 'main' into feat/pymapdl-dpf
clatapie Sep 1, 2025
facb2d3
update path
dipinknair Sep 3, 2025
4bfe7bf
update workflow
dipinknair Sep 3, 2025
4d2042f
fix style
dipinknair Sep 3, 2025
4a00f5f
Merge branch 'main' into feat/pymapdl-dpf
dipinknair Sep 3, 2025
0ac3a44
add mapdl py file
dipinknair Sep 3, 2025
97a7814
update checkout
dipinknair Sep 3, 2025
fb97a97
change shel script permission
Sep 4, 2025
b0c784b
feat: using latest PyMAPDL docker files
clatapie Sep 10, 2025
1b923da
Merge branch 'main' into feat/pymapdl-dpf
clatapie Sep 10, 2025
2c00834
fix: MAPDL workflow
clatapie Sep 12, 2025
d29bbc9
fix: MAPDL workflow - 2
clatapie Sep 12, 2025
5263eee
fix: adding missing file
clatapie Sep 12, 2025
54a8b9e
fix: applying @germa89's suggestions
clatapie Sep 19, 2025
21df61a
fix: python version
clatapie Sep 19, 2025
68d167d
fix: applying @germa89 feedback
clatapie Sep 19, 2025
62b7628
fix: adding a venv
clatapie Sep 19, 2025
1fd3bf2
fix: activate venv
clatapie Sep 19, 2025
23dace6
fix: activate venv -2
clatapie Sep 19, 2025
f858ee5
fix: applying @germa89 feedback - 2
clatapie Sep 19, 2025
6d80a0f
fix: virtual environment
clatapie Sep 19, 2025
23e4b3c
fix: issue with source
clatapie Sep 19, 2025
99e95b6
fix: removing ` Login to GitHub Container Registry` step
clatapie Sep 19, 2025
7c61be0
fix: trying to fix ``start_mapdl.sh``
clatapie Sep 19, 2025
af82ebd
fix: DPF servie and test virtual framebuffer
clatapie Sep 19, 2025
433df22
fix: MAPDL version
clatapie Sep 19, 2025
dd550a2
fix: pre-commit
clatapie Sep 19, 2025
366dd8b
fix: commenting step as not used for the moment
clatapie Sep 19, 2025
f77b6bf
fix: ``start_mapdl.sh``
clatapie Sep 19, 2025
a1ff2ee
fix: removing CICD
clatapie Oct 6, 2025
641f930
fix: removing matrix for testing purpose
clatapie Oct 6, 2025
73a12b9
fix: requirements
clatapie Oct 6, 2025
e65dcdb
test: check if PyMAPDL port is free
clatapie Oct 6, 2025
8cb7d37
fix: few fixes in ``start_mapdl``
clatapie Oct 6, 2025
07547d6
fix: ``start_mapdl``
clatapie Oct 6, 2025
63264ed
fix: using ``nc`` approach
clatapie Oct 6, 2025
59db90e
fix: installing netcat
clatapie Oct 6, 2025
9dbac4b
fix: using ``netstat``
clatapie Oct 6, 2025
1425a1e
fix: CICD
clatapie Oct 6, 2025
998f213
fix: MAPDL_PID
clatapie Oct 6, 2025
e8b64a0
fix: ``start_mapdl``
clatapie Oct 6, 2025
55e74cf
fix: ``start_mapdl`` - 2
clatapie Oct 6, 2025
093f9db
fix: ``start_mapdl`` - 3
clatapie Oct 6, 2025
f6f389b
fix: removing sleep
clatapie Oct 7, 2025
db08801
feat: simplifying ``wf_mapdl-dpf.py`` for tests
clatapie Oct 7, 2025
7f72246
fix: pre-commit
clatapie Oct 7, 2025
5c99dfd
fix: make files
clatapie Oct 8, 2025
d43d8ef
Merge branch 'main' into feat/pymapdl-dpf
clatapie Oct 8, 2025
07ba8c8
fix: printing the logs
clatapie Oct 9, 2025
5aad9e8
test: reverting doc version
clatapie Oct 9, 2025
6038051
test: reverting doc version + testing MapdlPool
clatapie Oct 9, 2025
a865a2c
fix: launching two MAPDL instances
clatapie Oct 9, 2025
6881bb7
fix: MapdlPool
clatapie Oct 9, 2025
631083c
fix: MapdlPool
clatapie Oct 10, 2025
879e241
fix: MapdlPool - 2
clatapie Oct 10, 2025
39b17f4
feat: adding the all example
clatapie Oct 10, 2025
5d91422
fix: example
clatapie Oct 10, 2025
2ea8491
fix: pre-commit
clatapie Oct 10, 2025
a39a986
test: calling pydpf
clatapie Oct 10, 2025
45ddb75
fix: pydpf server
clatapie Oct 10, 2025
eb8b419
fix: DPF_PORT value
clatapie Oct 10, 2025
f9dda24
fix: DPF server
clatapie Oct 10, 2025
fc1f9db
fix: env variable
clatapie Oct 10, 2025
e3561aa
fix: DPF ports
clatapie Oct 10, 2025
0a29fdc
feat: adding the full example
clatapie Oct 10, 2025
43ce38d
fix: python file
clatapie Oct 10, 2025
b18fcd0
fix: running python script in ``xvfb`` mode
clatapie Oct 10, 2025
af97bb5
fix: pyvista off_screen
clatapie Oct 10, 2025
7d3242c
fix: pyvista off_screen - 2
clatapie Oct 10, 2025
2dc3d6a
docs: run the doc
clatapie Oct 10, 2025
e4f7c9f
fix: documentation build
clatapie Oct 10, 2025
bd19bac
fix: install make
clatapie Oct 10, 2025
c7738db
fix: requirement files
clatapie Oct 10, 2025
0733db7
feat: adding ``bvp.png`` sketch
clatapie Oct 10, 2025
7c4c034
feat: clean up
clatapie Oct 13, 2025
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
30 changes: 30 additions & 0 deletions .ci/display_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates.
# SPDX-License-Identifier: MIT
#
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

"""Quickly check if VTK off screen plotting works."""

import pyvista
from pyvista.plotting import system_supports_plotting

print("system_supports_plotting", system_supports_plotting())
pyvista.OFF_SCREEN = True
pyvista.plot(pyvista.Sphere())
154 changes: 154 additions & 0 deletions .ci/start_mapdl.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
#!/bin/bash
# This script is modified to start MAPDL directly inside a container (no Docker-in-Docker)
#
# Usage:
# ------
# This script is intended to be run in a CI/CD environment where we're already inside a MAPDL container.
#
# Required environment variables:
# -------------------------------
#
# - DISTRIBUTED_MODE: The mode of operation for MAPDL (e.g., "smp", "dmp").
# - DPF_PORT: The port for the DPF service (e.g., 50055).
# - INSTANCE_NAME: The name of the MAPDL instance (e.g., "MAPDL_0").
# - LICENSE_SERVER: The address of the license server (e.g., "123.123.123.123").
# - MAPDL_VERSION: The version of the MAPDL image to use (e.g., "v25.2-ubuntu-cicd").
# - PYMAPDL_DB_PORT: The port for the PyMAPDL database service (e.g., 50056).
# - PYMAPDL_PORT: The port for the PyMAPDL service (e.g., 50052).
#

export MAJOR MINOR VERSION

echo "MAPDL Instance name: $INSTANCE_NAME"
echo "MAPDL_VERSION: $MAPDL_VERSION"
echo "Running inside container - no Docker pull needed"

# Extract version from MAPDL_VERSION
MAJOR=$(echo "$MAPDL_VERSION" | head -c 3 | tail -c 2)
MINOR=$(echo "$MAPDL_VERSION" | head -c 5 | tail -c 1)

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

# Determine executable path based on image type
if [[ $MAPDL_VERSION == *"latest-ubuntu"* ]]; then
echo "It is latest-ubuntu. Using 'ansys' script to launch"
EXEC_PATH=ansys
P_SCHEMA=/ansys_inc/ansys/ac4/schema

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

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

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

# Handle CICD version specifics
if [[ $MAPDL_VERSION == *"cicd"* ]] ; then
echo "It is a CICD version"
if [ "$RUN_DPF_SERVER" == "true" ]; then
echo "RUN_DPF_SERVER is set to true, DPF will be available"
export ANSYS_DPF_ACCEPT_LA=Y
fi

echo "DPF_PORT: $DPF_PORT"
echo "PYMAPDL_DB_PORT: $PYMAPDL_DB_PORT"

echo "Setting DISTRIBUTED_MODE to $DISTRIBUTED_MODE for CICD version"
else
export PYMAPDL_DB_PORT=DPF_PORT
fi;

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

# Verify executable exists
if [ ! -f "$EXEC_PATH" ] && [ "$EXEC_PATH" != "ansys" ]; then
echo "Executable not found at $EXEC_PATH, searching for alternatives..."

# Try alternative paths
ALTERNATIVE_PATHS=(
"/ansys_inc/v$VERSION/ansys/bin/ansys$VERSION"
"/ansys_inc/ansys/bin/mapdl"
"/ansys_inc/ansys/bin/ansys$VERSION"
"/opt/ansys_inc/v$VERSION/ansys/bin/mapdl"
)

for alt_path in "${ALTERNATIVE_PATHS[@]}"; do
if [ -f "$alt_path" ]; then
EXEC_PATH="$alt_path"
echo "Found alternative executable: $EXEC_PATH"
break
fi
done

# If still not found, try which command
if [ ! -f "$EXEC_PATH" ]; then
if command -v "ansys$VERSION" >/dev/null 2>&1; then
EXEC_PATH="ansys$VERSION"
echo "Using system command: $EXEC_PATH"
else
echo "ERROR: Could not find MAPDL executable"
echo "Searched paths:"
printf '%s\n' "${ALTERNATIVE_PATHS[@]}"
exit 1
fi
fi
fi

# Set environment variables for MAPDL
export ANSYS_LOCK="OFF"
export I_MPI_SHM_LMT=shm
export VERSION=$VERSION
export P_SCHEMA=$P_SCHEMA

# Allow MPI to run as root (required for container environments)
export OMPI_ALLOW_RUN_AS_ROOT=1
export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1

echo "Starting MAPDL directly in container..."
echo "Environment variables:"
echo " ANSYS_LOCK: $ANSYS_LOCK"
echo " I_MPI_SHM_LMT: $I_MPI_SHM_LMT"
echo " DISTRIBUTED_MODE: $DISTRIBUTED_MODE"
echo " OMPI_ALLOW_RUN_AS_ROOT: $OMPI_ALLOW_RUN_AS_ROOT"
echo " OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: $OMPI_ALLOW_RUN_AS_ROOT_CONFIRM"
echo " ANSYS_DPF_ACCEPT_LA: $ANSYS_DPF_ACCEPT_LA"

# Start MAPDL using the entrypoint logic directly
echo "Starting MAPDL with: $EXEC_PATH -grpc -port $PYMAPDL_PORT -$DISTRIBUTED_MODE"

# Create the log file
touch "${INSTANCE_NAME}.log"

# Start MAPDL in background
nohup $EXEC_PATH -grpc -port $PYMAPDL_PORT -$DISTRIBUTED_MODE -np 2 >> "${INSTANCE_NAME}.log" 2>&1 &
MAPDL_PID=$!

# Give MAPDL time to initialize
echo "Waiting for MAPDL to initialize..."

# Debug: Check immediately and periodically
for i in {1..10}; do
echo "Check $i: Testing process status..."

# Check process first
if ! kill -0 $MAPDL_PID 2>/dev/null; then
echo "ERROR: MAPDL process died after $i checks!"
echo "Process list:"
ps aux | grep mapdl || echo "No MAPDL processes found"
exit 1
fi

echo "MAPDL process still alive after $i."
done

echo "All checks passed - MAPDL process is running (PID: $MAPDL_PID)"
echo "MAPDL_PID=$MAPDL_PID"
12 changes: 9 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,29 @@ jobs:
uses: ./.github/workflows/geometry-mesh.yml
secrets: inherit
with:
doc-build: true
doc-build: false

geometry-mesh-fluent:
uses: ./.github/workflows/geometry-mesh-fluent.yml
secrets: inherit
with:
doc-build: true
doc-build: false

geometry-mechanical-dpf:
uses: ./.github/workflows/geometry-mechanical-dpf.yml
secrets: inherit
with:
doc-build: true
doc-build: false

fluent-mechanical:
uses: ./.github/workflows/fluent-mechanical.yml
secrets: inherit
with:
doc-build: false

mapdl-dpf:
uses: ./.github/workflows/mapdl-dpf.yml
secrets: inherit
with:
doc-build: true

Expand Down
Loading
Loading