Skip to content

Updating ubuntu section #1662

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

Merged
merged 17 commits into from
Dec 5, 2022
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
4 changes: 2 additions & 2 deletions doc/source/getting_started/docker.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ in a containerized environment such as Docker or Singularity:
- Run in a consistent environment regardless of the host OS.
- Portability and ease of install.
- Large-scale cluster deployment using Kubernetes
- Genuine app isolation through containerization.
- Genuine app isolation through containerization

Configure the Docker registry
=============================
Expand Down Expand Up @@ -43,7 +43,7 @@ with:
cat GH_TOKEN.txt | docker login ghcr.io -u $GH_USERNAME --password-stdin


Run the MAPDL image
Run an MAPDL image
===================

You can now launch MAPDL directly from Docker with a short script or
Expand Down
5 changes: 1 addition & 4 deletions doc/source/getting_started/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ available to you.
For more information on getting a licensed copy of Ansys, visit
`Ansys <ansys_>`_ .

You can also try the Student Version of Ansys products in
`Ansys Student Versions <ansys_student_version_>`_.
The Student Version is valid during a calendar year with limited capabilities,
such as on the number of nodes and elements.

.. toctree::
:hidden:
Expand Down Expand Up @@ -96,6 +92,7 @@ on Windows and with Ansys 13.0 on Linux.
and features. Certain features, such as APDL Math, are not supported
on earlier Ansys versions.

For more information, see :ref:`install_mapdl`.

Verify your installation
~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
63 changes: 36 additions & 27 deletions doc/source/getting_started/running_mapdl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ remote instance of MAPDL to communicate with it. This section covers
launching and interfacing with MAPDL from a local instance by
launching it from Python.


.. _install_mapdl:

Install MAPDL
-------------

Expand All @@ -21,6 +24,17 @@ installer options can change, see the following figure for reference.
:width: 400pt


If you want to avoid having to install MAPDL locally, you can use Docker.
This is especially convenient if you are using a non-supported platform such
as MacOS. For more information, see :ref:`pymapdl_docker`.

You can also download and try `Ansys Student Versions <ansys_student_version_>`_.
A Student Version is valid during a calendar year with limited capabilities. For
example, there is a limit on the number of nodes and elements.

If you experience problems installing MAPDL on Linux, see
:ref:`missing_dependencies_on_linux`.

Launch MAPDL
------------

Expand Down Expand Up @@ -81,32 +95,9 @@ port 50005 with:

/usr/ansys_inc/v211/ansys/bin/ansys211 -port 50005 -grpc

You can also configure the IP address.
However, because of an Ansys limitation to receive
strings from a command line, the IP address must be read from an external file
named ``mylocal.ip``. This file is read automatically from the directory where
MAPDL is running.

You can then set up the IP address.

In Windows PowerShell or Command Prompt, use:

.. code::

echo "127.0.0.1" > mylocal.ip
C:/Program Files/ANSYS Inc/v211/ansys/bin/winx64/ANSYS211.exe -grpc


In Linux, use:

.. code::

echo "127.0.0.1" > mylocal.ip
/usr/ansys_inc/v211/ansys/bin/ansys211 -grpc


Connect to a gRPC MAPDL session
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-------------------------------

A MAPDL gRPC server can be connected to from either the same host or an
external host. For example, you can connect to a MAPDL service
Expand All @@ -119,7 +110,7 @@ running **locally** with:


This assumes that your MAPDL service is running locally on the default IP address
(127.0.0.1) and on the default port (50052).
(``127.0.0.1``) and on the default port (``50052``).

If you want to connect to a **remote** instance of MAPDL and you know the IP
address of that instance, you can connect to it.
Expand All @@ -138,7 +129,25 @@ Alternatively you can use a hostname:

Note that you must have started MAPDL in gRPC mode on the computer with
the mentioned IP address/hostname for this to work.

If you have MAPDL installed on your local host, you
can use the ``launch_mapdl`` method to both start and connect to MAPDL.
can use the :func:`launch_mapdl() <ansys.mapdl.core.launch_mapdl>` method to both start and connect to MAPDL.

If you have any problem launching PyMAPDL, see :ref:`debugging_launch_mapdl`.

Connect to a dockerized MAPDL session
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If you work with Docker, for example you use the
`docker-compose.yml <pymapdl_docker_compose_base_>`_ file provided in the
directory `docker <pymapdl_docker_dir_>`_, then you must connect to the
MAPDL instance running on the Docker container as if it was a remote MAPDL
instance. However, because the ports are exposed to the host via the ``ports`` field
in the `docker-compose.yml <pymapdl_docker_compose_base_>`_ file, you can connect
to this MAPDL instance without specifying the IP address of the Docker container.

If you are using the local configuration specified in the
`docker-compose.local.yml <pymapdl_docker_compose_local_>`_ file,
after attaching your VSCode instance, you can work with MAPDL as if it were local.
This means that you can launch MAPDL instances using :func:`launch_mapdl() <ansys.mapdl.core.launch_mapdl>`.

If you have any problem launching PyMAPDL, see :ref:`debugging_launch_mapdl`
47 changes: 42 additions & 5 deletions doc/source/troubleshoot/troubleshoot.rst
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ either Windows or Linux.
printenv | grep ANSYSLMD_LICENSE_FILE


.. _missing_dependencies_on_linux:

Missing dependencies on Linux
=============================

Expand All @@ -173,6 +175,10 @@ you get errors like ``libXp.so.6: cannot open shared object file: No
such file or directory``, you are likely missing some necessary
dependencies.



.. _installing_mapdl_on_centos7:

CentOS 7
--------

Expand All @@ -183,18 +189,49 @@ On CentOS 7, you can install missing dependencies with:
yum install openssl openssh-clients mesa-libGL mesa-libGLU motif libgfortran



.. _installing_mapdl_on_ubuntu:

Ubuntu
------

On Ubuntu 20.04 with Ansys 2021 R1, install the following:
On Ubuntu 22.04, use this code to install the needed dependencies:

.. code::

sudo apt-get install libx11-6 libgl1 libxm4 libxt6 libxext6 libxi6 libx11-6 libsm6 libice6 libxxf86vm1 libglu1
apt-get update

# Install dependencies
apt-get install -y \
openssh-client \
libgl1 \
libglu1 \
libxm4 \
libxi6

The preceding code takes care of everything except for ``libxp6``, which you must install
using this code:

.. code:: bash

# This is a workaround
# Source: https://bugs.launchpad.net/ubuntu/+source/libxp/+bug/1517884
apt install -y software-properties-common
add-apt-repository -y ppa:zeehio/libxp
apt-get update
apt-get install -y libxp6


Ubuntu 20.04 and older
----------------------

If you are using Ubuntu 16.04, you can install ``libxp16`` with this code:

.. code:: bash

This takes care of everything except for ``libxp6``. If you are
using Ubuntu 16.04, you can install that simply with ``sudo apt
install libxp6``. However, on Ubuntu 18.04+, you must manually
sudo apt install libxp6.
However, if you are using Ubuntu 18.04 through 20.04, you must manually
download and install the package.

Because ``libxpl6`` pre-depends on ``multiarch-support``, which is
Expand Down