Installing MOPAC on Ubuntu with GPU/CUDA support

  1. Requirements
    a. The NVIDIA CUDA ToolKit must be installed.
    b. Create a /opt/mopac folder to install everything:
    sudo mkdir /opt/mopac
    sudo chown -R goncalo /opt/mopac

    b. Download the CUDA 5.5 libraries from mopac site (this file) and unpack it to the /opt/mopac folder
    c. Set the environment variables in the .bashrc file at the home directory:
    alias mopac="/opt/mopac/MOPAC2016.exe"

this allows you to run MOPAC from any folder by issuing 'mopac ')

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/mopac:/opt/mopac/mopac_cuda_5.5_libs
#this line references the libiomp5.so, libcublas.so.5.5 and libcudart.so.5.5 libraries
export MKL_NUM_THREADS=X

where X is the number of physical cores on the machine.

Note:If desired, the number of threads used in your MOPAC2016 can be defined using export MKL_NUM_THREADS=XX, where XX is the number of threads you want to use. XX must be equal or smaller than the number of physical cores you have available in your system (MKL does not benefit from hyper-threading)
Note: the following lines appear to be not necessary if CUDA has been properly installed:
export CUDA_HOME=CUDA_TOOLKIT_INSTALLATION_PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:CUDA_HOME/lib64:$CUDA_HOME/lib
export PATH=$PATH:$CUDA_HOME/bin

Note: Usually /usr/local/cuda-5.5 is the default CUDA_TOOLKIT_INSTALLATION_PATH

  1. Installing MOPAC
    Download the CPU+GPU version from openmopac.net and unpack it to the /opt/mopac folder.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s