3. Standalone
3.1. Compilation Process
To compile and use your own standalone version of RESCU, follow the steps outlined below. This installation process allows you to include optimized libraries, such as OpenMPI and ScaLAPACK, for enhanced performance.
Important
In this section MATLAB and its Compiler toolbox are required. Install the optional packages (e.g. LibXC, SMI) that you intend to use.
Obtain the RESCU Code
Download the RESCU code in ZIP format from the Nanoacademic Portal
Extract and Compile
Extract the ZIP file to a local directory, for example,
$HOME/rescu
.Navigate to the
src
directory inside the extracted RESCU folder. In the MATLAB command window, type:makeRESCU -agreeToLicense y
While still in the
src
directory, use thecompileRESCU
function in MATLAB’s command window to compile RESCU.matlab -r "compileRESCU('$HOME/rescu/src','$HOME/rescu/bin')"
Note
The
compileRESCU
function takes two arguments: the first specifies the path to the src directory (e.g.,$HOME/rescu/src
), while the second specifies the path to the bin directory where the compiled file will be stored (e.g.,$HOME/rescu/bin
).Add the License File
Download the
license.lic
file from the Nanoacademic Portal.On Linux, save it in:
$HOME/.nanoacademic/RESCU
On Windows, place it in:
C:\Users\<YourUsername>
Warning
If the license is placed in a different location, the user have to specify the RESCU_LICENSE_PATH variable.
Matlab Compiler Runtime (MCR)
Please download MATLAB Compiler Runtime.
Linux: version 2020a
Windows: version 2019b
Once downloaded, follow the installation instructions included in the package. By default, the location of the MATLAB Compiler Runtime should be
/usr/local/MATLAB/MATLAB_Runtime/v98
, include the additional paths at the environment variable$LD_LIBRARY_PATH
, as follows:MCRROOT=/usr/local/MATLAB/MATLAB_Runtime/v98 export LD_LIBRARY_PATH=$MCRROOT/runtime/glnxa64:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=$MCRROOT/bin/glnxa64:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=$MCRROOT/sys/os/glnxa64:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=$MCRROOT/extern/bin/glnxa64:$LD_LIBRARY_PATH
Note
On a Windows machine the MCR is usually installed at
C:\Program Files\MATLAB\MATLAB Runtime\v97
and the MATLAB Runtime installer for Windows automatically sets the library path during installation. If not, please, consult the Help Center to properly to set the PATH environment variable permanently.Verifying Installation
Navigate to the folder where the RESCU binary is located, open a terminal (or Command Prompt on Windows), and run the program. If the installation is successful, you will see the following message:
********************************************************************** Some on-line help information ********************************************************************** For information about the command line flags, type "rescu --flag" For information about all input parameters (including command-line flags), type "rescu --parameter" To check the meaning of a given parameter, or search for a parameter whose name contains a given string, e.g., 'control', type "rescu --parameter ? atom" For information about all available atomic orbital basis, type "rescu --basis"
Adding rescu binary to System PATH for Easy Access
Please, follow this process to ensure that the rescu binary can be executed from anywhere in your system.
Linux: add the binary directory path (
$HOME/rescu/bin
) to the PATH variable. Open the shell configuration file (e.g.~/.bashrc
) in a text editor and add the lineexport PATH="$HOME/rescu/bin:$PATH"
; save the file, then apply the changes by runningsource ~/.bashrc
. Finally, verify by typingrescu
to check if the command is recognized.Windows: navigate to “Edit environment variables of your account” from the Start menu and click “Environment Variables.” Under “System Variables,” find and edit the
Path
variable. Add the full directory path to rescu/bin (e.g.,C:\Users\<YourUsername>\rescu\bin
) by clicking “Edit.” Save the changes, restart your Command Prompt and typerescu
to verify if the command is recognized
3.2. Test Examples
Navigate to the
examples
directory inside the extracted folder of RESCU and run the code with one of the avaiable input files, for example:rescu -i si_lcao_scf.inputThe results from the test calculation should appears in the prompt if your package is adequately configured.
3.3. TroubleShooting
Here are some common errors that you may encounter while running the calculation:
20 - expired license
60 - Activation limit reached (installed the license on too many computers)
146 - license not found
48 - Network issues
If you encounter any of these issues, please make sure that the license path specified in the scripts corresponds to a valid license. Expiration dates or Activation limit can cause these errors. Network connectivity may also be a reason for failure.