From de64f85fc0c5afc21d46db8a16bf06c5e5418f32 Mon Sep 17 00:00:00 2001 From: Lourens Veen Date: Tue, 23 Sep 2025 15:17:27 +0200 Subject: [PATCH 1/3] Remove obsolete CUDA installation page (#1174) --- doc/reference/cuda-setup.rst | 118 ----------------------------------- doc/reference/index.rst | 1 - 2 files changed, 119 deletions(-) delete mode 100644 doc/reference/cuda-setup.rst diff --git a/doc/reference/cuda-setup.rst b/doc/reference/cuda-setup.rst deleted file mode 100644 index cf0eea33ca..0000000000 --- a/doc/reference/cuda-setup.rst +++ /dev/null @@ -1,118 +0,0 @@ -.. _cuda-setup-label: - -========================== -Setting up GPGPU with CUDA -========================== - -Introduction -~~~~~~~~~~~~ - -Here we provide help for setting up general-purpose computing on graphics processing units (GPGPU) -using CUDA. Performing (part of) the calculations on a graphics card can result -in a significant speed-up. Several codes in AMUSE support or require GPGPU: -phi-GRAPE (using Sapporo), ph4 (using Sapporo), Octgrav, Bonsai, HiGPUs. - - -Self-help script -~~~~~~~~~~~~~~~~ - -In the AMUSE root directory a self-help script can be found. If building or testing any of the -codes mentioned above fails and you wonder why, it will hopefully provide you with helpful suggestions. -From a command line run the bash script `cuda_self_help`: - -.. code-block:: sh - - > ./amuse-x.0/cuda_self_help - - -Step-by-step -~~~~~~~~~~~~ - -* :ref:`CUDA-capable` -* :ref:`CUDA_SDK` -* :ref:`env-vars` -* :ref:`configure-with-cuda` -* :ref:`test` - - -.. _CUDA-capable: - -Check that your computer has a CUDA-capable Nvidia graphics card ------------------------------------------------------------------ - -First determine the model of your GPU. - -On Linux: - -.. code-block:: sh - - > nvidia-settings -q gpus - - -On Mac: - - 1. Click on “Apple Menu” - 2. Click on “About this Mac” - 3. Click on “More Info” - 4. Select “Graphics/Displays” under Contents list - -Check whether your GPU model is listed among -`Nvidia's CUDA-enabled GPUs `_. - - -.. _CUDA_SDK: - -Check that you have installed the CUDA Toolkit (TK) and software development kit (SDK) --------------------------------------------------------------------------------------- - -If not, download and install it from `CUDA Development Tools `_. - - -.. _env-vars: - -Set the CUDA_TK and CUDA_SDK environment variables --------------------------------------------------- - -After installing the CUDA TK and SDK, make sure the environment variables CUDA_TK and CUDA_SDK are set correctly. -For shell (bash) you need to do: - -.. code-block:: sh - - export CUDA_TK=/path/to/cuda_tk - export CUDA_SDK=/path/to/cuda_sdk - -'/path/to/cuda_tk' should hold directories named 'include', 'lib', and 'lib64' (where libcudart.so is located) - -'/path/to/cuda_sdk' should hold a directory named 'common/inc' (where various header files are located) - -We recommend you add these lines to your '.bashrc' file so that -the variables are set correctly for all sessions. If you have a -C shell you need to do a *setenv* and edit the '.cshrc file. - - -.. _configure-with-cuda: - -Configure AMUSE with CUDA enabled ---------------------------------- - -AMUSE needs to be configured with the option ``--enable-cuda``. See :ref:`configuration-gpu-label`. - - -.. _test: - -Testing -------- - -Now try building for example Octgrav and run the nosetests (from AMUSE root directory), -but first re-initialize mpd (or it will remember its original environment): - - -.. code-block:: sh - - mpdallexit - mpd & - make octgrav.code - nosetests ./test/codes_tests/test_octgrav.py - -If this fails, please contact us through the `'amusecode' google group `_, -or on IRC at the #amuse channel on irc.freenode.net. diff --git a/doc/reference/index.rst b/doc/reference/index.rst index 166700d483..2df4312c0d 100644 --- a/doc/reference/index.rst +++ b/doc/reference/index.rst @@ -26,7 +26,6 @@ Reference documentation legacy_support message-protocol distributed - cuda-setup cartesius slurm style_guide From c0ff70b39073110de20b0e75c1dd4321c4b2520b Mon Sep 17 00:00:00 2001 From: Lourens Veen Date: Tue, 23 Sep 2025 15:20:57 +0200 Subject: [PATCH 2/3] Update version in installation docs --- doc/install/installing.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/install/installing.rst b/doc/install/installing.rst index 919f4bf19d..17fe43c3c1 100644 --- a/doc/install/installing.rst +++ b/doc/install/installing.rst @@ -162,7 +162,7 @@ command in your terminal to download it as above, for example: .. code-block:: bash - curl -L -O "https://github.com/amusecode/amuse/archive/refs/tags/v2025.5.0.tar.gz" + curl -L -O "https://github.com/amusecode/amuse/archive/refs/tags/v2025.9.0.tar.gz" This ``.tar.gz`` file needs to be unpacked first (you may need to change the version if @@ -170,14 +170,14 @@ you downloaded a newer one): .. code-block:: bash - tar xf v2025.5.0.tar.gz + tar xf v2025.9.0.tar.gz Then we can enter the directory with the AMUSE source code: .. code-block:: bash - cd amuse-2025.5.0 + cd amuse-2025.9.0 And then you can start the installer: @@ -225,7 +225,7 @@ Select a version to build (use either one of these, or whichever version is rele .. code-block:: bash git switch main # current development version - git checkout checkout v2025.5.0 # tagged release + git checkout checkout v2025.9.0 # tagged release And now you can start the installer as before: From 97c675fc01b2949149d084753bb3abc2fecc1ff8 Mon Sep 17 00:00:00 2001 From: Lourens Veen Date: Tue, 23 Sep 2025 15:56:21 +0200 Subject: [PATCH 3/3] Improve Anaconda and Miniconda installation compatibility --- doc/install/installing.rst | 119 ++++++++++++++++++++++--------------- support/setup/help.sh | 2 +- 2 files changed, 72 insertions(+), 49 deletions(-) diff --git a/doc/install/installing.rst b/doc/install/installing.rst index 17fe43c3c1..2251337f8a 100644 --- a/doc/install/installing.rst +++ b/doc/install/installing.rst @@ -135,20 +135,6 @@ You can then run the installer using Finally, close your terminal window and open a new one to make the ``conda`` command properly available. -Alternatively, if you have already installed Anaconda or Miniconda, make sure that you create your environment -with the "channel" set to "conda-forge", e.g. for a Python 3.13 environment: - -.. code-block:: bash - - conda create --name amuse_p313 python=3.13 --channel conda-forge --override-channels - - -which you activate in the usual way: - -.. code-block:: bash - - conda activate amuse_p313 - .. _installing_amuse: @@ -200,40 +186,6 @@ Slack `_ or by `making an issue on GitHub `_. -Installing from a Git repository -```````````````````````````````` - -If you plan to modify AMUSE or one of the codes in it, then you may want to install from -a local git clone instead of from a tar file. This will take more disk space and more -download time, so it shouldn't be the first option, but if you want to do it then you -can. You'll need to gave `git` installed: - -.. code-block:: bash - - git clone https://github.com/amusecode/amuse.git - - -Then you can enter the source directory using: - -.. code-block:: bash - - cd amuse - - -Select a version to build (use either one of these, or whichever version is relevant): - -.. code-block:: bash - - git switch main # current development version - git checkout checkout v2025.9.0 # tagged release - -And now you can start the installer as before: - -.. code-block:: bash - - ./setup - - Additional packages ``````````````````` @@ -288,6 +240,41 @@ You should now have a working AMUSE setup. To start using it, see :ref:`getting_started_with_amuse` or the :ref:`interactive_tutorial` +Debugging conda package installation +```````````````````````````````````` + +If you encounter problems with installing packages using ``conda``, or AMUSE doesn't +compile correctly, then you should check that you are using the ``conda-forge`` channel +rather than something else. + +Conda can use different sources of packages, which it calls channels. Different channels +contain software packaged by different people, and packages from different channels are +often incompatible. If you type + +.. code-block:: bash + + conda list + + +then you should see a list of packages that are installed in the active environment, and +which channel they came from. Ideally, all of them have ``conda-forge`` as the channel. + +If not, then you can reinstall the package from ``conda-forge`` and see if that improves +the situation. + +To reinstall a package from ``conda-forge``, use + +.. code-block:: bash + + conda install -c conda-forge + + +If you want to combine AMUSE with another package that isn't available from conda-forge, +then you may have to install that from another channel, and hope that things work. Or +ask the maintainers of that package to add it to conda-forge and be a bit more +compatible with the rest of the world. + + Alternative installation options ================================ @@ -296,6 +283,42 @@ almost everyone wanting to use AMUSE to do astrophysics. Nevertheless, there may cases where you need a different setup, for example because you cannot use Conda. In that case, you'll want one of these alternative installations. +.. _installing_from_git: + +Installing from a Git repository +-------------------------------- + +If you plan to modify AMUSE or one of the codes in it, then you may want to install from +a local git clone instead of from a tar file. This will take more disk space and more +download time, so it shouldn't be the first option, but if you want to do it then you +can. You'll need to gave `git` installed: + +.. code-block:: bash + + git clone https://github.com/amusecode/amuse.git + + +Then you can enter the source directory using: + +.. code-block:: bash + + cd amuse + + +Select a version to build (use either one of these, or whichever version is relevant): + +.. code-block:: bash + + git switch main # current development version + git checkout checkout v2025.9.0 # tagged release + +And now you can start the installer as before: + +.. code-block:: bash + + ./setup + + .. _using_a_virtualenv: Using a virtualenv diff --git a/support/setup/help.sh b/support/setup/help.sh index 07ee0e11b3..8e9f04ae6b 100644 --- a/support/setup/help.sh +++ b/support/setup/help.sh @@ -107,7 +107,7 @@ or a Python virtualenv. If you have an environment into which you'd like to install AMUSE, you should activate it now. To create a new Conda environment, use - conda create -n Amuse-env + conda create --channel conda-forge --override-channels -n Amuse-env Then you activate it using