Merge pull request #114 from trancong/master

Fix hardcoded QWT/Python Path in project file and update README
This commit is contained in:
fzeder
2016-10-21 13:08:06 +02:00
committed by GitHub Enterprise
2 changed files with 124 additions and 42 deletions

View File

@@ -22,12 +22,12 @@ unix:!macx {
macx: {
CONFIG += c++11
QMAKE_CXXFLAGS += -std=c++0x -stdlib=libc++ -DMAC
QMAKE_LFLAGS += -F/opt/qwt-6.1.2/lib
LIBS += -F/opt/qwt-6.1.2/lib/ -framework qwt
INCLUDEPATH += /opt/qwt-6.1.2/lib/qwt.framework/Headers
DEPENDPATH += /opt/qwt-6.1.2
INCLUDEPATH += /usr/local/Cellar/python3/3.5.2_1/Frameworks/Python.framework/Versions/3.5/include/python3.5m
LIBS += -L/usr/local/Cellar/python3/3.5.2_1/Frameworks/Python.framework/Versions/3.5/lib -lpython3.5
QMAKE_LFLAGS += -F$$(LIBQWT_HOME)
LIBS += -F$$(LIBQWT_HOME) -framework qwt
INCLUDEPATH += $$(LIBQWT_HEADERS)
DEPENDPATH += $$replace(LIBQWT_HOME, lib, )
INCLUDEPATH += $$(PYTHON_HEADERS)
LIBS += -L$$(PYTHON_HOME) -lpython3.5
}
# QWT library and header files

154
README.md
View File

@@ -65,7 +65,7 @@ They are:
- SystemC 2.3.1 and TLM 2.0
The sources can be downloaded from http://accellera.org/downloads/standards/systemc.
The sources can be downloaded from [this](http://accellera.org/downloads/standards/systemc).
For installation instructions see the installation notes file contained in
the release package.
@@ -80,7 +80,7 @@ They are:
$ sudo make install
```
For further information refer to http://qwt.sourceforge.net/
For further information refer to [this](http://qwt.sourceforge.net/)
- python3.5
@@ -211,68 +211,150 @@ $ ./traceAnalyzer
```
### Building on OSX
- Install XCode
- Install SystemC manually in /opt:
- Install SystemC in /opt (as usual with ./configure --prefix=/opt/systemc; make; make install;).
- Install the required python over macports:
``` bash
sudo port install python34
$ ./configure --prefix=/opt/systemc
$ make
$ sudo make install
```
- Install the QtCreator via macports:
Or you can install via homebrew:
``` bash
sudo port install qt5-creator qt5
$ brew install systemc
```
in this case, systemc will be installed, e.g. in:
```
/usr/local/Cellar/systemc/2.3.1
```
and make a simlink of the lib directory:
```
ln -s lib/ lib-macosx64
```
- Install the required python 3 over homebrew:
``` bash
$ brew install python3
```
Python3 (via homebrew) will be installed in
```
/usr/local/Cellar/python3/3.5.2_2/Frameworks/Python.framework
```
or you can install manually using official package provided in [link](https://www.python.org/downloads/)
**Note:** Official Python Package will be installed in
```
/Library/Frameworks/Python.framework
```
- Install the QtCreator using offical setup file from [link](https://www.qt.io/download-open-source/#section-2)
**Note:** You have later setup PATH for Qt5 and its tool if you install QtCreator manually, e.g:
``` bash
# Setting PATH for Qt5 and its tools
PATH="/Users/<username>/Qt5.7.0/5.7/clang_64/bin:${PATH}"
export PATH
```
- Install the QWT manually to /opt/qwt, then do:
``` bash
cd /Library/Frameworks
sudo ln -s /opt/qwt-6.1.2/lib/qwt.framework/ .
```
- The boost library must be installed manually, since the macports version is not compatible with DRAMSys:
In your “user-config.jam”, put this:
``` bash
using clang : 11
: "/usr/bin/clang++"
: <cxxflags>"-std=c++11 -stdlib=libc++" <linkflags>"-stdlib=libc++""
;
$ cd /Library/Frameworks
$ sudo ln -s /opt/qwt-6.1.2/lib/qwt.framework/ .
```
- The boost library can be installed manually or through homebrew:
Manually: Install boost lib (filesystem & system) in /opt/boost
```
Then compile and install it:
``` bash
./b2 toolset=clang-11
sudo ./b2 install
```
DRAMSys and Analyzer only runs if the following is configured in the project settings:
$ ./bootstrap.sh --prefix=/opt/boost --with-libraries=filesystem,system
$ sudo ./b2 install
```
DYLD_LIBRARY_PATH=/opt/boost/lib
LIBQWT_HEADERS=/opt/local/include
LIBQWT_HOME=/opt/local/lib
PYTHON_HEADERS=/opt/local/include
PYTHON_HOME=/opt/local/lib
SYSTEMC_TARGET_ARCH=macosx64
```
For the trace analyzer the file /opt/local/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m/pyport.h has to be changed like this: https://trac.macports.org/attachment/ticket/44288/issue10910-workaround.txt
Homebrew: Install boost lib (all, which consumes large storage) in
```
/usr/local/Cellar
```
``` bash
$ brew install boost
```
- Export correct Environment Variables in your terminal's profile, e.g:
``` bash
# Setting for DRAMSys
# SystemC via official source
export SYSTEMC_HOME=/opt/systemc
export SYSTEMC_TARGET_ARCH=macosx64
# SystemC via Homebrew
#export SYSTEMC_HOME=/usr/local/Cellar/systemc/2.3.1
#export SYSTEMC_TARGET_ARCH=macosx64
# Python via official pkg
export PYTHON_HOME=/Library/Frameworks/Python.framework/Versions/3.5/lib
export PYTHON_HEADERS=/Library/Frameworks/Python.framework/Versions/3.5/Headers
# Python3 via Homebrew
#export PYTHON_HOME=/usr/local/Cellar/python3/3.5.2_2/Frameworks/Python.framework/Versions/3.5/lib
#export PYTHON_HEADERS=/usr/local/Cellar/python3/3.5.2_2/Frameworks/Python.framework/Versions/3.5/Headers
export LIBQWT_HOME=/opt/qwt-6.1.4/lib
export LIBQWT_HEADERS=/opt/qwt-6.1.4/lib/qwt.framework/Headers
export LIBBOOST_HOME=/opt/boost/lib
export LIBBOOST_HEADERS=/opt/boost/include
# Add Boost Lib into Dynamic Lib Path
DYLD_LIBRARY_PATH="/opt/boost/lib:${DYLD_LIBRARY_PATH}"
export DYLD_LIBRARY_PATH
```
- For the trace analyzer the file:
```
/opt/local/Library/Frameworks/Python.framework/Versions/3.5/include/python3.4m/pyport.h
```
has to be changed like [this](https://trac.macports.org/attachment/ticket/44288/issue10910-workaround.txt)
- Install package [xerces](http://xerces.apache.org/mirrors.cgi) if your system does not have.
- Type following command inside your dram.vp.system folder:
``` bash
$ mkdir build
$ qmake ../DRAMSys/dram.vp.system.pro
$ make -j<number_jobs>
```
Now you can try to run DramSys and traceAnalyzer App inside folder simulator and analyzer, respectively
### DRAMSys Thermal Simulation
The thermal simulation is performed by a **3D-ICE** [8] server accessed
through the network. Therefore users interested in thermal simulation during
their DRAMSys simulations need to make sure they have a 3D-ICE server up and
running before starting. For more information about 3D-ICE visit the official
website http://esl.epfl.ch/3D-ICE.
running before starting. For more information about 3D-ICE visit the [official website](http://esl.epfl.ch/3D-ICE).
#### Installing the lastest 3D-ICE version
Download the lastest version. Make sure you got version 2.2.6 or greater:
[Download](http://esl.epfl.ch/3d-ice/download.html) the lastest version. Make sure you got version 2.2.6 or greater:
``` bash
$ wget http://esl.epfl.ch/files/content/sites/esl/files/3dice/releases/3d-ice-latest.zip
$ tar -xvzf 3d-ice-latest.zip
```
Install SuperLU dependencies:
Install [SuperLU](http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_5.2.1.tar.gz) dependencies:
``` bash
$ sudo apt-get install build-essential git bison flex libblas-dev