From GridLAB-D Wiki
Jump to: navigation, search

NOTE: These instructions are out of date and mostly relevant for version 3.2 and earlier. Please see the instructions at for the most up-to-date compiling instructions.


Depending on your platform and options you desire, you may have to install the following

Version 2.63 or higher (required)
The appropriate version of Xerces-C is available from the third_party folder in the source tree. To install it run the install_xerces script found there. If you wish to download the latest version of Xerces-c you can use your package manager to install xerces-c-devel.
If you intend to use the Matlab link, you must have Matlab installed on your system and the matlab -e command must work from the shell prompt.
If you intend to use the MySQL module, you must have MySQL Connector C version 6.0 or higher installed in the /usr/local/mysql-connector-c folder so that include/mysql.h and the lib folder are found in that folder.
If you are building GridLAB-D Version 2.x, you must have CppUnit installed from the third_party folder. Use the install_cppunit script to install it.
Some platforms do not come with libcurses installed by default and you will have to install it yourself before building.

The autoconf process will verify and report whether all the necessary components are installed. Typically, GridLAB-D can be built if a component is missing (the exception is Xerces) but the affected modules or core capabilities will be disabled.

Build procedure

To build on Linux and Unix systems (include Mac OSX), the command sequence is as follows:

host% git clone workdir
host% cd workdir
host% git checkout branch/feature
host% autoreconf -isf
... a few messages ...
host% ./configure
... many messages followed by the installed component report ...
host% make
... huge number of messages ...
... *** will preceded final build error report ...
host% sudo make install
... lots of messages ...
host% gridlabd --version
... check the version ...
host% cd workdir
host% gridlabd --validate
... validation report ...

Platform Notes

Fedora 23

  1. There is a problem in the implementation of core/object.c:findin_tree that causes the -O2 GCC optimization to improperly optimize the function, causing validation to fail. If you encounter this problem, a simple solution is to edit configure after doing autoreconf and change the four instances of -O2 to -O3, do a make clean followed by make and make install. After doing this, gridlabd --validate should pass 100% of tests.

See also