Troubleshooting

Compilation steps

Executing 'make' in the directory where powerDEVS-code was downloaded can give some error. Here are some of them and how to solve them.

  • /bin/sh: qmake: command not found

use 'locate qmake' to check where QT was installed. Then run the following commands acordingly:

export PATH=/usr/lib64/qt4/bin/:$PATH (replace with the path in your machine)

and try compiling again.

  • configure_window.h:5:22: error: QTabWidget: No such file or directory (and similars...)

the source is developed to compile using QT4. This error can be because you are trying to compile with a newer version. To check the version of QT you can use: 'which qmake':

/usr/lib64/qt4/bin/qmake

Another way is to use qmake --version. This will show you something like this:

QMake version 2.01a
Using Qt version 4.8.7 in /usr/lib/x86_64-linux-gnu

If the Qt version is less than the one in the example (even if it is 4.X.X) it may not work. In this case, you could install a new version using this command: sudo apt-get install libqt4-dev qt4-dev-tools qt4-doc
(in CENTOS: sudo yum install opt-libqt4-devel. You will probably need to change the path of qmake in the Makefile to /usr/lib64/qt4/bin/qmake)

GNU Plot

In order to use gnuplot graphs, update the gnuplot.cpp file:

Line: 125

If(getOS = WINDOWS)

Strcpy(buff, “pause 3600”);



Network Library

- Install GSL
-
sudo yum install -y qt-creator

- use /engine/makefile.include as attached. Contains the following lines (in
boldthings I changed):
ifeq ($(UNAME), Linux)
..
CXXFLAGS = -Wall $(OPTFLAGS)
-DO_BINARY=0
..
GSLLIB = /usr/local/lib
GSLINC = /usr/local/include/gsl
LIBS = -lsimpd -lgsl-L$(GSLLIB)
..
INCLUDES = -I$(SRCENGINE) -I$(ATOMICS) -I$(BUILD) -L$(BUILDLIB)
-I$(GSLINC) -lgslcblas

- add PDNL models to Atomic folder (sinks, hybrid and examples folder).


- If you get this compilation error: "
open with O_CREAT in second argument needs 3 arguments"

- It might be related to a bug in gcc version.

- Change lines 18 and 20 of file hybrids/logtoscilabtool.cpp adding the 3rd argunemt with value 0666 as follows:
if (getOs()==WINDOWS)
FOutHandler = open(FName, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0666 );
else
FOutHandler = open(FName, O_WRONLY | O_CREAT | O_TRUNC, 0666);





GCC

In SCL6 you might need to update GCC version.

Or you can also set the devtoolset g++ for your system:
  • source /opt/rh/devtoolset-2/enable
    (Or to permamently enable it, add the line to your .bashrc)
  • Check that “g++ -v” returns version 4.8

Moving Powerdevs out home directory

If you need to have your installation of PowerDEVS outside the HOME folder, you need to:

  1. Update the /powerdevs/bin/loadBackDoor.sce file as follows:

[a,err]=file('open', pwd() + '/../bin/BackDoor/loader.sce',"old");
if err==240 then
exec(pwd() + '/../bin/BackDoor/builder.sce','errcatch');
exec(pwd() + '/../bin/BackDoor/builder.sce');
end
exec(pwd() + '/../bin/BackDoor/loader.sce');

-- LucioEmilioSanti - 2018-08-10

Edit | Attach | Watch | Print version | History: r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r1 - 2018-08-10 - LucioEmilioSanti
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright &© 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback