Instructions for Compiling & Running DESpot Application ======================================================= This guide contains instructions on how to compile DESpot under Linux and Windows. It is best to use QT 5.9.7 to compile DESpot. DESpot has been well tested against QT 5.9.7. If at all possible, you should use this version. Once compiled, you can access DESpot's online help browser. From DESpot, see the "Help > Help contents" to bring up DESpots online help. This will prvoide detailed information on DESpot's capabilities, and how to use them. NOTE: some tar files (*.tgz) require: tar xvJf to extract the files, as they use a newer compression algorithm, as opposed to tar xvzf +++++++++++++++++++++++++++++++++++++++++++++++++++++++ Windows INSTRUCTIONS +++++++++++++++++++++++++++++++++++++++++++++++++++++++ VIEW windowsCompilingHowTo.txt or windowsCompilingHowTo.docx +++++++++++++++++++++++++++++++++++++++++++++++++++++++ LINUX INSTRUCTIONS +++++++++++++++++++++++++++++++++++++++++++++++++++++++ You should make sure the QT development packages are installed. For RedHat Enterprise Linux 7, the package is called qt5-qtbase-devel You should use your distribution's package manager to install the package (i.e. yum). on Centos7 this can be installed using: "sudo yum install qt5-qtbase-devel" You should also make sure you have the C++, g++, compiler installed. For Fedora Linux, the RPM is called: gcc-c++ Steps to compile DESpot using command line ------------------------------------------ 0. Download the latest tar file of DESpot, as well as the linux version of the BuDDy BDD libraries (buddy-2.4Lin.tgz). 1. untar the DESpot source code that you downloaded If the file was "DESpot 1.0.10.tgz" run the command: tar xvzf DESpot 1.0.10.tgz 2. untar the BuDDy source code: tar xvzf buddy-2.4Lin.tgz 3. Configure and compile the BuDDy libraries. In the buddy-2.4 directory, run as root: ./configure --libdir=/usr/lib --includedir=/usr/include then: make then: make install ---------------------------------------------------------- If you wish to enable Distributed Tools, skip ahead to 'Alternate Steps for Distributed Tools' below. Otherwise, continue with step 4. Note, unless you need a distributed version, it is recommended you avoid the additional complexity of compiling and running an MPI version, and instead compile the default version below. ---------------------------------------------------------- 4. From the DESpot source directory run: qmake-qt5 DESpot.pro Note that on some Linux distributions there may not be a qmake-qt4 command, but just a "qmake". 5. then type: make release This produces the DESpot binary in the release folder. If you have a multicore cpu (say n cores), you can speeds things up by using "make -jn release" to run n compile threads. Note: If you are getting strange error about MPI at this point, check CommonDefinitions.h to see if the line #define __ENABLE_DIST__ is uncommented. If it is, comment it out, save, and let Dr. Leduc know that the line has been checked in uncommented. 6. switch to the release directory: cd release 7. to start DESpot, type: ./DESpot You should be able to safely copy the DESpot binary to another directory, but not to your home directory as DESpot will create a "DESpot" subdirectory (for configuration) in your home directory. Alternate steps for Distributed Tools --------------------------------- ++NOTE++: Steps 0-3 from above, and steps 4-6 below will need to be performed on the master system as well as each slave node. ++NOTE 2++: The distributed processing requires that the DESpot projects you wish to check be located along the same path on each system (master and slave nodes). The slaves will load the project files and DES, so the master and slave nodes should have a shared network filesystem. This can be accomplished through a NFS, or equivalent setup. ++NOTE 3++: For the distributed processing, you must configure your systems such that you can ssh between them without being prompted for a password. 4. Install OpenMPI 1.5.4 or later. DESpot has been tested against version 1.5.4 so, if at all possible, use that version. Version 1.4 should still work, but DESpot has not been tested against it. Make sure the master and all slaves have the same version installed. 5. Add the path to your OpenMPI bin directory to your PATH variable. For example, if you installed OpenMPI to '/usr/lib/openmpi', you will want to add '/usr/lib/openmpi/bin' to your PATH, without the quotes. This addition must persist between logins, so you will need to add it in your .bashrc file, or equivalent. 6. Add the path to your OpenMPI lib directory to your LD_LIBRARY_PATH variable. For example, using the same install path as in 2., you will want to add '/usr/lib/openmpi/lib' to your LD_LIBRARY_PATH, without the quotes. This addition must persist between logins, so you will need to add it in your .bashrc file, or equivalent. ++NOTE 4++ Sometimes when openmpi libraries are installed, the library locations are not added to the ldconfig config files. If the system is failing to find the libraries, this may be the case. For Fedora, you can (as root user) add a file to the /etc/ld.so.conf.d directory (called say: openmpi.conf) containing the location of the openmpi libaries (for example: /usr/lib64/openmpi/lib/). You then must run (as root) the "/sbin/ldconfig" command. To build the Master application: -------------------------------- 7a. From the DESpot source directory run: qmake-qt4 mpi=1 DESpot.pro Note that on some Linux distributions there may not be a qmake-qt4 command, but just a "qmake". 8a. then type: make release This Produces the DESpot binary in the release folder. If you have a multicore cpu (say n cores), you can speeds things up by using "make -jn release" to run n compile threads. 9a. Ensure that your firewall is set to allow all communications between your local system and the remote nodes you wish to use. 10a. To start DESpot, switch to the DESpot release directory: cd release from the DESpot source directory 11a. And type ./DESpot 12a. Set up the hostfile within DESpot: Open or create a new project. Select 'Distributed Tools', then 'Configure Distributed Processing'. 13a. Add (or edit) your remote nodes using the large textbox. If you wish a node to have multiple slave applications spawned on it, just enter that node on multiple lines (one for each slave process you wish spawned). This is useful if your slave nodes have multiple cpus. These duplicate node entries should be listed after the other nodes in order to better optimize the distribution. ++NOTE++: If you only use only localhosts, you will get a multithreaded version of DESpot. ++NOTE++: Any time you add or edit this list of nodes you MUST restart DESpot for the changes to take effect. 14a. Click Ok and restart DESpot (if you edited the list of nodes). DESpot is now configured for Distributed Processing. You should be able to safely copy the DESpot binary to another directory, but not to your home directory as DESpot will create a "DESpot" subdirectory (for configuration) in your home directory. To build the Slave application ------------------------------ ++NOTE++: If your remote nodes run a different Linux distribution (including version number) than the master system, you must compile the slave application on that distribution. 7b. From the DESpot source directory run: qmake-qt4 slave=1 DESpot.pro Note that on some Linux distributions there may not be a qmake-qt4 command, but just a "qmake". 8b. then type: make release This Produces the DESpotMPISlave binary in the release folder. If you have a multicore cpu (say n cores), you can speed things up by using "make -jn release" to run n compile threads. 9b. Add the path to the slave application to your PATH variable. For example, if your DESpotMPISlave binary is located in '/user/home/DESpot/release', you'd need to add that location to your PATH, without the quotes. This addition must persist between logins, so you will need to add it in your .bashrc file, or equivalent. 10b. Ensure that your firewall (on the master and each slave) is set to allow all communications between each node you perform these steps on and the master system. ++NOTE++: your Makefiles are currently set to produce slave binaries. I recommend that now "qmake-qt4 mpi=1 DESpot.pro" to reset them to make the main DESpot binary. Otherwise, if you make a chancge and recompile only the slave binary gets relinked. ++NOTE++: You can also use the bash script "makeDESpotMPI" found in the DESpot source directory, but you will need to edit it to suit your situation. The script will run the qmake and make commands to compile the release version of the main and slave application, and then copy the save binary to $HOME/bin. You can also pass in the number of threads to use for compilation.