From b97bf9744276c8828361bf1ac479eb250c247aa4 Mon Sep 17 00:00:00 2001 From: German Date: Mon, 5 Sep 2022 17:56:50 +0200 Subject: [PATCH 1/6] Expanding info about docker usage. --- doc/source/getting_started/docker.rst | 181 +++++++++++++++++++++++++- 1 file changed, 179 insertions(+), 2 deletions(-) diff --git a/doc/source/getting_started/docker.rst b/doc/source/getting_started/docker.rst index b9f9cc147e8..73be6c11fd2 100644 --- a/doc/source/getting_started/docker.rst +++ b/doc/source/getting_started/docker.rst @@ -45,7 +45,7 @@ with: You can now launch MAPDL directly from docker with a short script or directly from the command line. Since this image contains no license -server, you will need to enter in your license server IP address the +server, you need to enter in your license server IP address the ``LICENSE_SERVER`` environment variable. With that, you can launch MAPDL with: @@ -77,7 +77,8 @@ Once you've launched MAPDL you should see: Server listening on : 0.0.0.0:50052 Connecting to the MAPDL Container from Python -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +--------------------------------------------- + You can now connect to the instance with: .. code:: python @@ -104,6 +105,10 @@ Verify your connection with: Additional Considerations ------------------------- + +Appending MAPDL options to the container process +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + In the command: .. code:: @@ -124,3 +129,175 @@ with the `-np` switch. For example: For additional command line arguments please see the ansys documentation at `ANSYS help `_. Also, be sure to have the appropriate license for additional HPC features. + +Using ``--restart`` policy with MAPDL products +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +By default, MAPDL creates a ``LOCK`` file at the working directory when starts +and deletes it if it exits normally. This file is used to avoid overwriting the +files such as database files (``db``) or result files (``rst``) when starting +MAPDL after an abnormal termination. + +Because of this behaviour, when using the docker flag ``--restart`` in ``docker run``, +you might enter in an infinite loop if you specify the docker image to reboot after an +abnormal termination (i.e. ``--restart always``). +Because of the presence of the ``LOCK``, MAPDL exits attempting to not overwrite +the files from the previous crash, while the docker process keeps attempting to +restart the MAPDL container (and the MAPDL process with it). + +In those cases, it is recommended to not use the ``--restart`` option. +In case you really need to use that option, you can avoid MAPDL checks and create +the lock file by starting the process with the environment variable ``ANSYS_LOCK`` +set to ``"OFF"``. +You can do that in your ``docker run`` command as: + +.. code:: bash + + docker run \ + --restart always \ + -e ANSYSLMD_LICENSE_FILE=1055@$LICENSE_SERVER \ + -e ANSYS_LOCK="OFF" \ + -p 50052:50052 \ + $IMAGE + + +Using ``ANS_DEBUG_CRASH`` environment variable for debugging +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +*This an internal procedure not intended for public use, please be cautious* + +You can run the MAPDL process with the environment variable ``ANS_DEBUG_CRASH=1``, +in that case, MAPDL creates a crash file named after the jobname (i.e. ``file.crash``). +This file contains information about the crash such as the memory object and files called. +An example of this file is noted below: + +.. code:: text + + Dumping the crash data for the current analysis. + /ansys_inc/v211/ansys/lib/linx64/libansys.so(+0x4432f8c) [0x7fa3b1fa5f8c] + /ansys_inc/v211/ansys/lib/linx64/libansys.so(+0xc63bbb6) [0x7fa3ba1aebb6] + /ansys_inc/v211/ansys/lib/linx64/libansys.so(sytrap7_+0x13) [0x7fa3b6c60483] + /ansys_inc/v211/tp/IntelCompiler/2019.3.199/linx64/lib/intel64/libifport.so.5(portlib_handler+0x2d) [0x7fa3d7e8c1bd] + /lib64/libc.so.6(+0x36400) [0x7fa39b29a400] + /ansys_inc/v211/commonfiles/MPI/Intel/2018.3.222/linx64/lib/release/libmpi.so.12(+0x12f287) [0x7fa399fa5287] + /ansys_inc/v211/commonfiles/MPI/Intel/2018.3.222/linx64/lib/release/libmpi.so.12(+0x12dea6) [0x7fa399fa3ea6] + /ansys_inc/v211/commonfiles/MPI/Intel/2018.3.222/linx64/lib/release/libmpi.so.12(+0x13fcbc) [0x7fa399fb5cbc] + /ansys_inc/v211/commonfiles/MPI/Intel/2018.3.222/linx64/lib/release/libmpi.so.12(+0x35e6a0) [0x7fa39a1d46a0] + /ansys_inc/v211/commonfiles/MPI/Intel/2018.3.222/linx64/lib/release/libmpi.so.12(PMPI_Send+0x40f) [0x7fa39a2c1acf] + /ansys_inc/v211/ansys/lib/linx64/libansys.so(cMPI_Send+0x98) [0x7fa3b314efd8] + /ansys_inc/v211/ansys/lib/linx64/libansys.so(cansMPI_Send+0x6) [0x7fa3b2b84926] + /ansys_inc/v211/ansys/lib/linx64/libansys.so(+0x8112003) [0x7fa3b5c85003] + /ansys_inc/v211/ansys/lib/linx64/libansys.so(+0xab4c4a0) [0x7fa3b86bf4a0] + /ansys_inc/v211/ansys/lib/linx64/libansys.so(+0x560133c) [0x7fa3b317433c] + /ansys_inc/v211/ansys/lib/linx64/libansys.so(fastbegin_+0x142) [0x7fa3b5d41592] + /ansys_inc/v211/ansys/lib/linx64/libansys.so(+0xbea4fdf) [0x7fa3b9a17fdf] + /ansys_inc/v211/ansys/lib/linx64/libansys.so(+0xc558a96) [0x7fa3ba0cba96] + /ansys_inc/v211/ansys/lib/linx64/libansys.so(slvrun_+0x792) [0x7fa3b9c2c9b2] + /ansys_inc/v211/ansys/lib/linx64/libansys.so(solvcl_+0x2086) [0x7fa3b9ce9b36] + /ansys_inc/v211/ansys/lib/linx64/libansys.so(slvdriver_+0x1d) [0x7fa3b9c0885d] + /ansys_inc/v211/ansys/lib/linx64/libansys.so(modcmd_+0x18b) [0x7fa3b7916fdb] + /ansys_inc/v211/ansys/bin/linx64/ansys.e() [0x410d15] + /ansys_inc/v211/ansys/bin/linx64/ansys.e(MAIN__+0xe8) [0x4102e8] + /ansys_inc/v211/ansys/bin/linx64/ansys.e(main+0x32) [0x4101e2] + /lib64/libc.so.6(__libc_start_main+0xf5) [0x7fa39b286555] + /ansys_inc/v211/ansys/bin/linx64/ansys.e() [0x4100f9] + +To include this feature in your docker image just add the ``ANS_DEBUG_CRASH`` +environment variable to your ``docker run`` command as: + +.. code:: bash + + docker run \ + --restart always \ + -e ANSYSLMD_LICENSE_FILE=1055@$LICENSE_SERVER \ + -e ANS_DEBUG_CRASH=1 \ + -p 50052:50052 \ + $IMAGE + +Getting useful files after abnormal termination +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +In some cases, MAPDL container might crash after the MAPDL process experience an +abnormal termination. +In those cases it is interesting to retrieve log files, output files, etc. +Docker provides you the required tools to do that. + +Firstly you need to get the docker container name. + +.. code:: pwsh + + PS docker ps + CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES + c14560bff70f ghcr.io/pyansys/pymapdl/mapdl:v22.2.0 "/ansys_inc/ansys/bi…" 9 seconds ago Up 8 seconds 0.0.0.0:50053->50052/tcp mapdl + +The container should be running to appear in ``docker ps``. +You can then use the ``name`` in the following command: + +.. code:: pwsh + + PS docker exec -it mapdl /bin/bash + +This command execute the command shell (``/bin/bash``) of the container and attach your current terminal to it (interactive ``-it``). + +.. code:: pwsh + PS C:\Users\user> docker exec -it mapdl /bin/bash + [root@c14560bff70f /]# + +Now you can commands inside the docker image an navigate inside it. + +.. code:: pwsh + + PS C:\Users\user> docker exec -it mapdl /bin/bash + [root@c14560bff70f /]# ls + anaconda-post.log cleanup-ansys-c14560bff70f-709.sh file0.err file1.err file1.page file2.out file3.log home media proc sbin tmp + ansys_inc dev file0.log file1.log file2.err file2.page file3.out lib mnt root srv usr + bin etc file0.page file1.out file2.log file3.err file3.page lib64 opt run sys var + +You can then take note of the files you want to retrieve. For example, the error and output files (``file*.err`` and ``file*.out``). + +Exit the container terminal using ``exit``: + +.. code:: pwsh + + [root@c14560bff70f /]# exit + exit + (base) PS C:\Users\user> + +You can copy the noted files using the following script: + +.. code:: pwsh + + docker cp mapdl:/file0.err . + docker cp mapdl:/file1.err . + docker cp mapdl:/file1.out . + +In case you want to retrieve multiple files, the most efficient approach is to get back inside the docker container: + +.. code:: pwsh + + PS C:\Users\user> docker exec -it mapdl /bin/bash + [root@c14560bff70f /]# + +Create a folder where you are going to copy all the desired files: + +.. code:: pwsh + + [root@c14560bff70f /]# mkdir -p /mapdl_logs + [root@c14560bff70f /]# cp -f /file*.out /mapdl_logs + [root@c14560bff70f /]# cp -f /file*.err /mapdl_logs + [root@c14560bff70f /]# ls mapdl_logs/ + file0.err file1.err file1.out file2.err file2.out file3.err file3.out + +Then you can copy all the folder content at once: + +.. code:: pwsh + + docker cp mapdl:/mapdl_logs/. . + + + + + + + + From de6ae2f52d096398f15efdd67be75713408e60b7 Mon Sep 17 00:00:00 2001 From: German Date: Mon, 5 Sep 2022 18:08:39 +0200 Subject: [PATCH 2/6] Small update. --- doc/source/getting_started/docker.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/source/getting_started/docker.rst b/doc/source/getting_started/docker.rst index 73be6c11fd2..8a9646d23cd 100644 --- a/doc/source/getting_started/docker.rst +++ b/doc/source/getting_started/docker.rst @@ -202,6 +202,10 @@ An example of this file is noted below: /lib64/libc.so.6(__libc_start_main+0xf5) [0x7fa39b286555] /ansys_inc/v211/ansys/bin/linx64/ansys.e() [0x4100f9] +You can submit this file to ANSYS customer support to help to improving MAPDL. +It is also recommended to attach with this file any other useful or related file, such as +input files (``inp``, ``dat``), models (``db``), error files (``err``), output files (``out``), etc. + To include this feature in your docker image just add the ``ANS_DEBUG_CRASH`` environment variable to your ``docker run`` command as: From b47647cdb0f0a39535fd1e80304a88f90a4ae535 Mon Sep 17 00:00:00 2001 From: German Date: Tue, 6 Sep 2022 14:00:27 +0200 Subject: [PATCH 3/6] Cleaning --- doc/source/getting_started/docker.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/source/getting_started/docker.rst b/doc/source/getting_started/docker.rst index 8a9646d23cd..cb0c2f1718f 100644 --- a/doc/source/getting_started/docker.rst +++ b/doc/source/getting_started/docker.rst @@ -244,6 +244,7 @@ You can then use the ``name`` in the following command: This command execute the command shell (``/bin/bash``) of the container and attach your current terminal to it (interactive ``-it``). .. code:: pwsh + PS C:\Users\user> docker exec -it mapdl /bin/bash [root@c14560bff70f /]# From 077f20d7ebc418dddc7b2c1b192b33ac8939184b Mon Sep 17 00:00:00 2001 From: German Date: Tue, 6 Sep 2022 14:06:14 +0200 Subject: [PATCH 4/6] Cleaning --- .ci/start_mapdl.sh | 1 - .github/workflows/nightly-doc-build.yml | 2 +- .github/workflows/nightly-mapdl-check.yml | 2 +- doc/source/getting_started/docker.rst | 57 ----------------------- 4 files changed, 2 insertions(+), 60 deletions(-) diff --git a/.ci/start_mapdl.sh b/.ci/start_mapdl.sh index 0a6e920bdd1..17521da70b8 100755 --- a/.ci/start_mapdl.sh +++ b/.ci/start_mapdl.sh @@ -9,7 +9,6 @@ docker run \ --health-timeout=0.5s \ --health-start-period=10s \ -e ANSYSLMD_LICENSE_FILE=1055@$LICENSE_SERVER \ - -e ANS_DEBUG_CRASH=1 \ -e ANSYS_LOCK="OFF" \ -p $PYMAPDL_PORT:50052 \ -p $PYMAPDL_DB_PORT:50055 \ diff --git a/.github/workflows/nightly-doc-build.yml b/.github/workflows/nightly-doc-build.yml index 2a4cbc3416f..39c30802dba 100644 --- a/.github/workflows/nightly-doc-build.yml +++ b/.github/workflows/nightly-doc-build.yml @@ -54,7 +54,7 @@ jobs: - name: Pull, launch, and validate MAPDL service run: | docker pull $MAPDL_IMAGE - docker run -e ANSYSLMD_LICENSE_FILE=1055@$LICENSE_SERVER -e ANS_DEBUG_CRASH=1 -e ANSYS_LOCK="OFF" --restart always --name mapdl -p $PYMAPDL_PORT:50052 $MAPDL_IMAGE -smp > log.txt & + docker run -e ANSYSLMD_LICENSE_FILE=1055@$LICENSE_SERVER -e ANSYS_LOCK="OFF" --restart always --name mapdl -p $PYMAPDL_PORT:50052 $MAPDL_IMAGE -smp > log.txt & grep -q 'Server listening on' <(timeout 60 tail -f log.txt) python -c "from ansys.mapdl.core import launch_mapdl; print(launch_mapdl())" env: diff --git a/.github/workflows/nightly-mapdl-check.yml b/.github/workflows/nightly-mapdl-check.yml index 05e2553fe6f..7cfa99a610b 100644 --- a/.github/workflows/nightly-mapdl-check.yml +++ b/.github/workflows/nightly-mapdl-check.yml @@ -52,7 +52,7 @@ jobs: - name: Pull image run: | - docker run -e ANSYSLMD_LICENSE_FILE=1055@$LICENSE_SERVER -e ANS_DEBUG_CRASH=1 -e ANSYS_LOCK="OFF" --restart always --name mapdl -p $PYMAPDL_PORT:50052 -p $PYMAPDL_DB_PORT:50055 $MAPDL_IMAGE -smp > log.txt & + docker run -e ANSYSLMD_LICENSE_FILE=1055@$LICENSE_SERVER -e ANSYS_LOCK="OFF" --restart always --name mapdl -p $PYMAPDL_PORT:50052 -p $PYMAPDL_DB_PORT:50055 $MAPDL_IMAGE -smp > log.txt & grep -q 'Server listening on' <(timeout 60 tail -f log.txt) python -c "from ansys.mapdl.core import launch_mapdl; print(launch_mapdl())" env: diff --git a/doc/source/getting_started/docker.rst b/doc/source/getting_started/docker.rst index cb0c2f1718f..5db0c723577 100644 --- a/doc/source/getting_started/docker.rst +++ b/doc/source/getting_started/docker.rst @@ -161,63 +161,6 @@ You can do that in your ``docker run`` command as: $IMAGE -Using ``ANS_DEBUG_CRASH`` environment variable for debugging -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -*This an internal procedure not intended for public use, please be cautious* - -You can run the MAPDL process with the environment variable ``ANS_DEBUG_CRASH=1``, -in that case, MAPDL creates a crash file named after the jobname (i.e. ``file.crash``). -This file contains information about the crash such as the memory object and files called. -An example of this file is noted below: - -.. code:: text - - Dumping the crash data for the current analysis. - /ansys_inc/v211/ansys/lib/linx64/libansys.so(+0x4432f8c) [0x7fa3b1fa5f8c] - /ansys_inc/v211/ansys/lib/linx64/libansys.so(+0xc63bbb6) [0x7fa3ba1aebb6] - /ansys_inc/v211/ansys/lib/linx64/libansys.so(sytrap7_+0x13) [0x7fa3b6c60483] - /ansys_inc/v211/tp/IntelCompiler/2019.3.199/linx64/lib/intel64/libifport.so.5(portlib_handler+0x2d) [0x7fa3d7e8c1bd] - /lib64/libc.so.6(+0x36400) [0x7fa39b29a400] - /ansys_inc/v211/commonfiles/MPI/Intel/2018.3.222/linx64/lib/release/libmpi.so.12(+0x12f287) [0x7fa399fa5287] - /ansys_inc/v211/commonfiles/MPI/Intel/2018.3.222/linx64/lib/release/libmpi.so.12(+0x12dea6) [0x7fa399fa3ea6] - /ansys_inc/v211/commonfiles/MPI/Intel/2018.3.222/linx64/lib/release/libmpi.so.12(+0x13fcbc) [0x7fa399fb5cbc] - /ansys_inc/v211/commonfiles/MPI/Intel/2018.3.222/linx64/lib/release/libmpi.so.12(+0x35e6a0) [0x7fa39a1d46a0] - /ansys_inc/v211/commonfiles/MPI/Intel/2018.3.222/linx64/lib/release/libmpi.so.12(PMPI_Send+0x40f) [0x7fa39a2c1acf] - /ansys_inc/v211/ansys/lib/linx64/libansys.so(cMPI_Send+0x98) [0x7fa3b314efd8] - /ansys_inc/v211/ansys/lib/linx64/libansys.so(cansMPI_Send+0x6) [0x7fa3b2b84926] - /ansys_inc/v211/ansys/lib/linx64/libansys.so(+0x8112003) [0x7fa3b5c85003] - /ansys_inc/v211/ansys/lib/linx64/libansys.so(+0xab4c4a0) [0x7fa3b86bf4a0] - /ansys_inc/v211/ansys/lib/linx64/libansys.so(+0x560133c) [0x7fa3b317433c] - /ansys_inc/v211/ansys/lib/linx64/libansys.so(fastbegin_+0x142) [0x7fa3b5d41592] - /ansys_inc/v211/ansys/lib/linx64/libansys.so(+0xbea4fdf) [0x7fa3b9a17fdf] - /ansys_inc/v211/ansys/lib/linx64/libansys.so(+0xc558a96) [0x7fa3ba0cba96] - /ansys_inc/v211/ansys/lib/linx64/libansys.so(slvrun_+0x792) [0x7fa3b9c2c9b2] - /ansys_inc/v211/ansys/lib/linx64/libansys.so(solvcl_+0x2086) [0x7fa3b9ce9b36] - /ansys_inc/v211/ansys/lib/linx64/libansys.so(slvdriver_+0x1d) [0x7fa3b9c0885d] - /ansys_inc/v211/ansys/lib/linx64/libansys.so(modcmd_+0x18b) [0x7fa3b7916fdb] - /ansys_inc/v211/ansys/bin/linx64/ansys.e() [0x410d15] - /ansys_inc/v211/ansys/bin/linx64/ansys.e(MAIN__+0xe8) [0x4102e8] - /ansys_inc/v211/ansys/bin/linx64/ansys.e(main+0x32) [0x4101e2] - /lib64/libc.so.6(__libc_start_main+0xf5) [0x7fa39b286555] - /ansys_inc/v211/ansys/bin/linx64/ansys.e() [0x4100f9] - -You can submit this file to ANSYS customer support to help to improving MAPDL. -It is also recommended to attach with this file any other useful or related file, such as -input files (``inp``, ``dat``), models (``db``), error files (``err``), output files (``out``), etc. - -To include this feature in your docker image just add the ``ANS_DEBUG_CRASH`` -environment variable to your ``docker run`` command as: - -.. code:: bash - - docker run \ - --restart always \ - -e ANSYSLMD_LICENSE_FILE=1055@$LICENSE_SERVER \ - -e ANS_DEBUG_CRASH=1 \ - -p 50052:50052 \ - $IMAGE - Getting useful files after abnormal termination ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From 330155e37ff2aaa06167820e4e882cf593a53db7 Mon Sep 17 00:00:00 2001 From: Alex Kaszynski Date: Tue, 6 Sep 2022 12:30:02 -0600 Subject: [PATCH 5/6] Apply suggestions from code review Co-authored-by: Kathy Pippert <84872299+PipKat@users.noreply.github.com> --- doc/source/getting_started/docker.rst | 60 ++++++++++++--------------- 1 file changed, 26 insertions(+), 34 deletions(-) diff --git a/doc/source/getting_started/docker.rst b/doc/source/getting_started/docker.rst index 5db0c723577..8f9cbc936cd 100644 --- a/doc/source/getting_started/docker.rst +++ b/doc/source/getting_started/docker.rst @@ -45,7 +45,7 @@ with: You can now launch MAPDL directly from docker with a short script or directly from the command line. Since this image contains no license -server, you need to enter in your license server IP address the +server, you must enter your license server IP address in the ``LICENSE_SERVER`` environment variable. With that, you can launch MAPDL with: @@ -106,7 +106,7 @@ Verify your connection with: Additional Considerations ------------------------- -Appending MAPDL options to the container process +Appending MAPDL Options to the Container ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In the command: @@ -133,23 +133,23 @@ be sure to have the appropriate license for additional HPC features. Using ``--restart`` policy with MAPDL products ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -By default, MAPDL creates a ``LOCK`` file at the working directory when starts -and deletes it if it exits normally. This file is used to avoid overwriting the -files such as database files (``db``) or result files (``rst``) when starting -MAPDL after an abnormal termination. +By default, MAPDL creates a ``LOCK`` file in the working directory when it starts +and deletes this file if it exits normally. The file is used to avoid overwriting files +such as database (DB) files or result (RST) files when starting MAPDL after an +abnormal termination. -Because of this behaviour, when using the docker flag ``--restart`` in ``docker run``, -you might enter in an infinite loop if you specify the docker image to reboot after an -abnormal termination (i.e. ``--restart always``). -Because of the presence of the ``LOCK``, MAPDL exits attempting to not overwrite -the files from the previous crash, while the docker process keeps attempting to +Because of this behavior, when using the Docker ``--restart`` flag in the ``docker run`` +command, you might enter into an infinite loop if you specify the Docker image to +reboot after an abnormal termination. For example, ``--restart always``. +Because of the presence of the ``LOCK`` file, MAPDL exits, attempting to not overwrite +the files from the previous crash, while the Docker process keeps attempting to restart the MAPDL container (and the MAPDL process with it). -In those cases, it is recommended to not use the ``--restart`` option. -In case you really need to use that option, you can avoid MAPDL checks and create -the lock file by starting the process with the environment variable ``ANSYS_LOCK`` -set to ``"OFF"``. -You can do that in your ``docker run`` command as: +In such cases, you should not use the ``--restart`` option. If you really need to use +this option, you can avoid MAPDL checks and create the ``LOCK`` file by starting +the process with the environment variable ``ANSYS_LOCK`` set to ``"OFF"``. + +You can do this in your ``docker run`` command: .. code:: bash @@ -161,15 +161,14 @@ You can do that in your ``docker run`` command as: $IMAGE -Getting useful files after abnormal termination +Getting Useful Files After Abnormal Termination ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -In some cases, MAPDL container might crash after the MAPDL process experience an -abnormal termination. -In those cases it is interesting to retrieve log files, output files, etc. -Docker provides you the required tools to do that. +In some cases, the MAPDL container might crash after the MAPDL process experiences an +abnormal termination. In these cases, you can retrieve log files and output files using +tools that Docker provides. -Firstly you need to get the docker container name. +First, get the Docker container name: .. code:: pwsh @@ -184,14 +183,14 @@ You can then use the ``name`` in the following command: PS docker exec -it mapdl /bin/bash -This command execute the command shell (``/bin/bash``) of the container and attach your current terminal to it (interactive ``-it``). +This command executes the command shell (``/bin/bash``) of the container and attaches your current terminal to it (interactive ``-it``). .. code:: pwsh PS C:\Users\user> docker exec -it mapdl /bin/bash [root@c14560bff70f /]# -Now you can commands inside the docker image an navigate inside it. +Now you can enter commands inside the Docker container and navigate inside it. .. code:: pwsh @@ -211,7 +210,7 @@ Exit the container terminal using ``exit``: exit (base) PS C:\Users\user> -You can copy the noted files using the following script: +You can copy the noted files using this script: .. code:: pwsh @@ -219,7 +218,7 @@ You can copy the noted files using the following script: docker cp mapdl:/file1.err . docker cp mapdl:/file1.out . -In case you want to retrieve multiple files, the most efficient approach is to get back inside the docker container: +If you want to retrieve multiple files, the most efficient approach is to get back inside the Docker container: .. code:: pwsh @@ -236,16 +235,9 @@ Create a folder where you are going to copy all the desired files: [root@c14560bff70f /]# ls mapdl_logs/ file0.err file1.err file1.out file2.err file2.out file3.err file3.out -Then you can copy all the folder content at once: +Then copy the entire folder content at once: .. code:: pwsh docker cp mapdl:/mapdl_logs/. . - - - - - - - From 5ee34dd62fcbb92bbb69ae1c7a25b7b9bbdd4105 Mon Sep 17 00:00:00 2001 From: Alex Kaszynski Date: Tue, 6 Sep 2022 19:00:07 -0600 Subject: [PATCH 6/6] Apply suggestions from code review Co-authored-by: Kathy Pippert <84872299+PipKat@users.noreply.github.com> --- doc/source/getting_started/docker.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/source/getting_started/docker.rst b/doc/source/getting_started/docker.rst index 8f9cbc936cd..5ba3358a456 100644 --- a/doc/source/getting_started/docker.rst +++ b/doc/source/getting_started/docker.rst @@ -126,7 +126,7 @@ with the `-np` switch. For example: IMAGE=ghcr.io/pyansys/pymapdl/mapdl:$VERSION docker run -e ANSYSLMD_LICENSE_FILE=$LICENSE_SERVER -p 50052:50052 $IMAGE -np 4 -For additional command line arguments please see the ansys +For additional command-line arguments, see the Ansys documentation at `ANSYS help `_. Also, be sure to have the appropriate license for additional HPC features. @@ -176,7 +176,8 @@ First, get the Docker container name: CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES c14560bff70f ghcr.io/pyansys/pymapdl/mapdl:v22.2.0 "/ansys_inc/ansys/bi…" 9 seconds ago Up 8 seconds 0.0.0.0:50053->50052/tcp mapdl -The container should be running to appear in ``docker ps``. +To appear in ``docker ps``, the container should be running. + You can then use the ``name`` in the following command: .. code:: pwsh