From acf55533e68b862fd2406edb9bab071c3b387321 Mon Sep 17 00:00:00 2001 From: Thanh Tran Date: Thu, 6 Oct 2016 10:59:24 +0200 Subject: [PATCH 1/3] Remove hard-coded QWT & Python Path in QMake Project file of traceAnalyzer --- DRAMSys/analyzer/traceAnalyzer.pro | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/DRAMSys/analyzer/traceAnalyzer.pro b/DRAMSys/analyzer/traceAnalyzer.pro index 177e2b4d..057ed8f8 100644 --- a/DRAMSys/analyzer/traceAnalyzer.pro +++ b/DRAMSys/analyzer/traceAnalyzer.pro @@ -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 From f0807f1e3371d9010d505ed3633fd4b53fb1e487 Mon Sep 17 00:00:00 2001 From: Thanh Tran Date: Thu, 6 Oct 2016 11:00:37 +0200 Subject: [PATCH 2/3] Update procedure of installation on Mac OSX --- README.md | 123 +++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 89 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index 539b4e51..e2507eb0 100644 --- a/README.md +++ b/README.md @@ -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,123 @@ $ ./traceAnalyzer ``` ### Building on OSX +- Install XCode + +- Install SystemC manually in /opt: + +``` bash +$ ./configure --prefix=/opt/systemc +$ make +$ sudo make install +``` + +- Install the required python 3 over macports: -- 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 ``` +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 via macports: + ``` bash -sudo port install qt5-creator qt5 +$ sudo port install qt5-creator qt5 +``` + +or you can install it 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//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++" - : "-std=c++11 -stdlib=libc++" "-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 +$ sudo brew install boost +``` + + +- Export correct Environment Variables in your terminal's profile, e.g: + +``` bash +# Setting for DRAMSys +# SystemC home and target architecture +export SYSTEMC_HOME=/opt/systemc +export SYSTEMC_TARGET_ARCH=macosx64 +# DRAMSys libraries and headers +export PYTHON_HOME=/Library/Frameworks/Python.framework/Versions/3.5/lib +export PYTHON_HEADERS=/Library/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 +``` + +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 From 4177e150b9a936ee06a0185ddd8902032837a1ef Mon Sep 17 00:00:00 2001 From: Thanh Tran Date: Mon, 10 Oct 2016 16:19:07 +0200 Subject: [PATCH 3/3] Change to install python3 and systemc via homebrew --- README.md | 53 ++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 40 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index e2507eb0..ebf04455 100644 --- a/README.md +++ b/README.md @@ -221,10 +221,31 @@ $ make $ sudo make install ``` -- Install the required python 3 over macports: +Or you can install via homebrew: ``` bash -sudo port install python34 +$ 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/) @@ -234,13 +255,7 @@ or you can install manually using official package provided in [link](https://ww /Library/Frameworks/Python.framework ``` -- Install the QtCreator via macports: - -``` bash -$ sudo port install qt5-creator qt5 -``` - -or you can install it using offical setup file from [link](https://www.qt.io/download-open-source/#section-2) +- 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: @@ -266,10 +281,13 @@ $ ./bootstrap.sh --prefix=/opt/boost --with-libraries=filesystem,system $ sudo ./b2 install ``` -Homebrew: Install boost lib (all, which consumes large storage) in /usr/local/Cellar +Homebrew: Install boost lib (all, which consumes large storage) in +``` +/usr/local/Cellar +``` ``` bash -$ sudo brew install boost +$ brew install boost ``` @@ -277,12 +295,21 @@ $ sudo brew install boost ``` bash # Setting for DRAMSys -# SystemC home and target architecture +# SystemC via official source export SYSTEMC_HOME=/opt/systemc export SYSTEMC_TARGET_ARCH=macosx64 -# DRAMSys libraries and headers +# 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