.. _installing_en: ============================ Guidance for Installation ============================ .. contents:: Contents Installation Guide for RMC ------------------------------- Similar to many scientific computing programs, RMC is a console program without a graphical user interface (GUI). The core of the program is a binary executable file that can be run or controlled in a command-line window or terminal in text mode. RMC executable file is generated by compiling the source code, and the compilation process can be referred to in the compilation documentation (not currently available for the personal edition). Currently, RMC is divided into a personal edition and an enterprise edition. For the enterprise edition, we will provide installation services according to the contract requirements. For the installation of the personal edition, please refer to the following documentation. Installation of Personal Edition ---------------------------------- Installation using Anaconda ================================= **Note:** #. This method is suitable for 64-bit **Windows**, **Linux**, and **MacOS** systems; #. This method has been tested on **Windows 10**, **Ubuntu 18.04 LTS**, **MacOS 10.15**, and **OpenSUSE 15.3**. If you encounter any issues on other systems, please feel free to provide feedback; #. The `Anaconda` version used in this method is based on `Python 3.7`, specifically `Anaconda3 5.3.1` or `miniconda3 3.7.3`. Installing Anaconda Environment ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The download links for `Anaconda/miniconda` are as follows: - `Anaconda3 5.3.1` - `Anaconda3 Windows `_ - `Anaconda3 Linux `_ - `Anaconda3 MacOS `_ - `miniconda3 3.7.3` - `miniconda3 Windows `_ , problems may come up when using `Miniconda`, it is recommended to use `Anaconda3` - `miniconda3 Linux `_ - `miniconda3 MacOS `_ After downloading, `Windows` users can double-click the installer and follow the instructions. For `Linux` or `MacOS` users, the installation can be done via the terminal using `bash`: .. code-block:: bash bash ./Anaconda3-5.3.1-Linux-x86_64.sh Then follow the prompts to complete the installation. If you encounter any issues with installing `Anaconda3`, you can search online for specific tutorials. Note: If you wish for more convenient usage in the future, you can add `Anaconda` to the `path` environment variable on `Windows` or to the `PATH` environment variable on `Linux/MacOS`. Creating Virtual Environments ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ One of the most important uses of `Anaconda` is to create virtual environments, which allows for isolation of environment configurations. **It is strongly recommended to create a virtual environment!** This can help avoid conflicts with other software and ensure that the dependencies required by RMC are properly managed. The following instructions will guide you through creating a virtual environment for RMC. Opening the `Anaconda` Terminal - `Anaconda Prompt` on `Windows` - `CMD` and `PowerShell` with `path` added - `Linux/MacOS` terminal with `PATH` added Switch to the folder where you want to store this virtual environment and execute the commands to create and activate the virtual environment. For example, if you want to create a virtual environment named `venv` in the current folder, you can run the following commands: .. code-block:: bash cd folder_you_like conda create -p ./venv python=3.7 # "/" may need to be changed to "\" on some Windows systems conda activate ./venv # "/" may need to be changed to "\" on some Windows systems Installing `RMC` ~~~~~~~~~~~~~~~~~~~~~~ Using the following command to install `RMC 3.5` .. code-block:: bash conda install -c thu_real rmc If the installation fails, it is usually a `channel` issue. It is recommended to add `conda-forge` and then try the above command again, as follows: .. code-block:: bash conda config --add channels conda-forge conda install -c thu_real rmc Using `RMC` ~~~~~~~~~~~~~ After completing the above installation, run the following command in the terminal without closing it: .. code-block:: bash RMC --version The version information can be printed out, indicating a successful installation. Subsequently, prepare the following files in the calculation directory to proceed with the computation: - Input card file (assuming the main input card file is named inp, currently RMC supports include functionality, so the input card may consist of multiple files) - Database index file xsdir, if other features are enabled, additional index files like xsdir_sab may be required - Burnup-related files DepthMainLib (required for burnup calculations) Calculation commands are as follows: .. code-block:: bash # Note that there is no need to add "./" before RMC RMC inp # Serial calculation RMC -s 2 inp # OpenMP parallel calculation, 2 threads in parallel mpirun -n 2 inp # Replace with the actual path to RMC, which is in the bin folder under the venv virtual environment, MPI parallel calculation, 2 processes in parallel mpirun -n 2 -s 2 inp # MPI parallel calculation, 2 processes * 2 threads in parallel To use RMC again in the future, simply open the `Anaconda` terminal (see above for details), activate the virtual environment created earlier, and then you can use RMC. For example, if the virtual environment is named `venv` and located in the current folder, you can run the following command: .. code-block:: bash conda activate # should be replaced with the path to the virtual environment, note that on Linux/MacOS, relative paths need to start with "./" The old installation method =============================== In the past installation guide, you can copy the RMC executable file to a suitable directory and run it directly , without installation. For the personal version, specific installation methods will be provided later. Note that, depending on the compilation system and configuration, the executable file has multiple versions, including: - Operating system: Windows / Linux / Mac OS - System bitness: 32-bit / 64-bit - Compilation options: Debug / Release - Parallelization: Serial version / MPI parallel version (including different MPI library versions, such as MPICH, OpenMPI, etc.) Suitable versions of the executable file should be selected based on the system and configuration, and the way to run the program is the same as the calculation commands mentioned above. Related files for the input of the code ------------------------------------------ RMC's input card writing, please refer to :ref:`usersguide_en` , other database related files are generally provided with the release version, and specific details can be referenced in :ref:`database_obtain_en` .