Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - MarioMic

#1
Quote from: Volker Dirr on May 14, 2014, 10:00:30 PM
ah. ok. i see. it is an "improvement" of  the "Note 2" in "README" (see fet directory). let's see what Liviu think but i don't see disadvantages if that is added.
just to understand correct: you only need to add that line in src/src.pro and src/src-cl.pro. It doesn't work in fet.pro.

Excuse me, Volker Dirr, I forgot to reply to you.
Yes, the fet.pro modified has no effect because the statement about CFLAGS and CXXFLAGS was not propagated to the subprojects fet.pro and fet-cl.pro. I have to add the statement in the two subprojects files or, if there was an include(../common.conf) in these two files I could just change the file common.conf.

The alternative solution of the hidden file .qmake.cache has two drawbacks:

  • is an hidden file and it might not be noticed, it might be forgotten, overlooked;
  • if -nocache is specified when qmake is run, the hidden file is ignored and it will not be processed.
#2
If it can be useful, on my system in /usr/lib64/qt5/mkspecs/linux-g++ the file qmake.conf is:

#
# qmake configuration for linux-g++
#

MAKEFILE_GENERATOR      = UNIX
CONFIG                 += incremental gdb_dwarf_index
QMAKE_INCREMENTAL_STYLE = sublib

QMAKE_CFLAGS_RELEASE   += -O2

include(../common/linux.conf)
include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)
load(qt_config)


../common/linux.conf:
#
# qmake configuration for common linux
#

QMAKE_PLATFORM         += linux

QMAKE_CFLAGS_THREAD    += -D_REENTRANT
QMAKE_CXXFLAGS_THREAD  += $$QMAKE_CFLAGS_THREAD

QMAKE_INCDIR            =
QMAKE_LIBDIR            =
QMAKE_INCDIR_X11        =
QMAKE_LIBDIR_X11        =
QMAKE_INCDIR_OPENGL     =
QMAKE_LIBDIR_OPENGL     =
QMAKE_INCDIR_OPENGL_ES1 = $$QMAKE_INCDIR_OPENGL
QMAKE_LIBDIR_OPENGL_ES1 = $$QMAKE_LIBDIR_OPENGL
QMAKE_INCDIR_OPENGL_ES2 = $$QMAKE_INCDIR_OPENGL
QMAKE_LIBDIR_OPENGL_ES2 = $$QMAKE_LIBDIR_OPENGL
QMAKE_INCDIR_EGL        =
QMAKE_LIBDIR_EGL        =
QMAKE_INCDIR_OPENVG     =
QMAKE_LIBDIR_OPENVG     =

QMAKE_LIBS              =
QMAKE_LIBS_DYNLOAD      = -ldl
QMAKE_LIBS_X11          = -lXext -lX11 -lm
QMAKE_LIBS_NIS          = -lnsl
QMAKE_LIBS_EGL          = -lEGL
QMAKE_LIBS_OPENGL       = -lGL
QMAKE_LIBS_OPENGL_ES1   = -lGLESv1_CM
QMAKE_LIBS_OPENGL_ES2   = -lGLESv2
QMAKE_LIBS_OPENVG       = -lOpenVG
QMAKE_LIBS_THREAD       = -lpthread
QMAKE_LIBS_LIBUDEV      = -ludev

QMAKE_CFLAGS_WAYLAND    =
QMAKE_INCDIR_WAYLAND    =
QMAKE_LIBS_WAYLAND_CLIENT = -lwayland-client
QMAKE_LIBS_WAYLAND_SERVER = -lwayland-server
QMAKE_LIBDIR_WAYLAND    =
QMAKE_DEFINES_WAYLAND   =
QMAKE_WAYLAND_SCANNER   = wayland-scanner

QMAKE_CFLAGS_XCB        =
QMAKE_LIBS_XCB          =
QMAKE_DEFINES_XCB       =

QMAKE_AR                = ar cqs
QMAKE_OBJCOPY           = objcopy
QMAKE_NM                = nm -P
QMAKE_RANLIB            =

QMAKE_STRIP             =
QMAKE_STRIPFLAGS_LIB   +=
QMAKE_INSTALL_FILE      = install -m 644 -p
QMAKE_INSTALL_PROGRAM   = install -m 755 -p

include(unix.conf)


unix.conf:
#
# qmake configuration for common unix
#

QMAKE_PLATFORM         += unix posix

QMAKE_LEX               = flex
QMAKE_LEXFLAGS         +=
QMAKE_YACC              = yacc
QMAKE_YACCFLAGS        += -d
QMAKE_YACCFLAGS_MANGLE += -p $base -b $base
QMAKE_YACC_HEADER       = $base.tab.h
QMAKE_YACC_SOURCE       = $base.tab.c
QMAKE_PREFIX_SHLIB      = lib
QMAKE_PREFIX_STATICLIB  = lib
QMAKE_EXTENSION_STATICLIB = a

include(shell-unix.conf)


shell-unix.conf:
QMAKE_TAR               = tar -cf
QMAKE_GZIP              = gzip -9f

QMAKE_COPY              = cp -f
QMAKE_COPY_FILE         = $$QMAKE_COPY
QMAKE_COPY_DIR          = $$QMAKE_COPY -R
QMAKE_MOVE              = mv -f
QMAKE_DEL_FILE          = rm -f
QMAKE_DEL_DIR           = rmdir
QMAKE_CHK_EXISTS        = test -e %1 ||
QMAKE_CHK_DIR_EXISTS    = test -d    # legacy
QMAKE_MKDIR             = mkdir -p   # legacy
QMAKE_MKDIR_CMD         = test -d %1 || mkdir -p %1
QMAKE_STREAM_EDITOR     = sed


../common/gcc-base-unix.conf:
#
# Base qmake configuration for GCC on *nix-systems
#
# Before making changes to this file, please read the comment in
# gcc-base.conf, to make sure the change goes in the right place.
#
# To verify that your change has the desired effect on the final configuration
# you can use the manual test in tests/manual/mkspecs.
#

include(gcc-base.conf)

QMAKE_LFLAGS_SHLIB     += -shared
QMAKE_LFLAGS_PLUGIN    += $$QMAKE_LFLAGS_SHLIB
QMAKE_LFLAGS_SONAME    += -Wl,-soname,
QMAKE_LFLAGS_THREAD    +=
QMAKE_LFLAGS_RPATH      = -Wl,-rpath,
QMAKE_LFLAGS_RPATHLINK  = -Wl,-rpath-link,

# -Bsymbolic-functions (ld) support
QMAKE_LFLAGS_BSYMBOLIC_FUNC = -Wl,-Bsymbolic-functions
QMAKE_LFLAGS_DYNAMIC_LIST   = -Wl,--dynamic-list,


gcc-base.conf:
#
# This file is used as a basis for the following compilers:
#
# - The GNU C++ compiler (g++)
# - LLVM
# - Clang
#
# Platform-specific options shared by these compilers are put into:
#
# - gcc-base-mac.conf
# - gcc-base-unix.conf
#
# These base files are then combined with configurations for each compiler:
#
# - g++-base.conf
# - g++-macx.conf
# - g++-unix.conf
# - llvm.conf
# - clang.conf
#
# The combination happens in the top level mkspec, by including a platform-
# specific version of the base-file, for example gcc-base-mac.conf, and then
# a (possibly platform-specific) version of the actual compiler configuration,
# for example g++-macx.conf.
#
# If you are making changes to any of these files, please consider the
# possible effect it may have due to these include-rules, and whether it
# might make more sense to share the rule or make it more specific.
#
# To verify that your change has the desired effect on the final configuration
# you can use the manual test in tests/manual/mkspecs.
#

QMAKE_CFLAGS               += -pipe
QMAKE_CFLAGS_DEPS          += -M
QMAKE_CFLAGS_WARN_ON       += -Wall -W
QMAKE_CFLAGS_WARN_OFF      += -w
QMAKE_CFLAGS_RELEASE       += -O2
QMAKE_CFLAGS_DEBUG         += -g
QMAKE_CFLAGS_SHLIB         += -fPIC
QMAKE_CFLAGS_STATIC_LIB    += -fPIC
QMAKE_CFLAGS_APP           += -fPIE
QMAKE_CFLAGS_YACC          += -Wno-unused -Wno-parentheses
QMAKE_CFLAGS_HIDESYMS      += -fvisibility=hidden
QMAKE_CFLAGS_EXCEPTIONS_OFF += -fno-exceptions

QMAKE_CXXFLAGS            += $$QMAKE_CFLAGS
QMAKE_CXXFLAGS_DEPS       += $$QMAKE_CFLAGS_DEPS
QMAKE_CXXFLAGS_WARN_ON    += $$QMAKE_CFLAGS_WARN_ON
QMAKE_CXXFLAGS_WARN_OFF   += $$QMAKE_CFLAGS_WARN_OFF
QMAKE_CXXFLAGS_RELEASE    += $$QMAKE_CFLAGS_RELEASE
QMAKE_CXXFLAGS_DEBUG      += $$QMAKE_CFLAGS_DEBUG
QMAKE_CXXFLAGS_SHLIB      += $$QMAKE_CFLAGS_SHLIB
QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB
QMAKE_CXXFLAGS_APP        += $$QMAKE_CFLAGS_APP
QMAKE_CXXFLAGS_YACC       += $$QMAKE_CFLAGS_YACC
QMAKE_CXXFLAGS_HIDESYMS   += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden
QMAKE_CXXFLAGS_EXCEPTIONS_OFF += $$QMAKE_CFLAGS_EXCEPTIONS_OFF

QMAKE_LFLAGS           +=
QMAKE_LFLAGS_DEBUG     +=
QMAKE_LFLAGS_APP       +=
QMAKE_LFLAGS_RELEASE   +=
QMAKE_LFLAGS_EXCEPTIONS_OFF +=

QMAKE_CFLAGS_SSE2      += -msse2
QMAKE_CFLAGS_SSE3      += -msse3
QMAKE_CFLAGS_SSSE3     += -mssse3
QMAKE_CFLAGS_SSE4_1    += -msse4.1
QMAKE_CFLAGS_SSE4_2    += -msse4.2
QMAKE_CFLAGS_AVX       += -mavx
QMAKE_CFLAGS_AVX2      += -mavx2
QMAKE_CFLAGS_IWMMXT    += -mcpu=iwmmxt
QMAKE_CFLAGS_NEON      += -mfpu=neon


../common/g++-unix.conf:
#
# Qmake configuration for the GNU C++ compiler on *nix-systems
#
# Before making changes to this file, please read the comment in
# gcc-base.conf, to make sure the change goes in the right place.
#
# To verify that your change has the desired effect on the final configuration
# you can use the manual test in tests/manual/mkspecs.
#

include(g++-base.conf)

QMAKE_LFLAGS_RELEASE   += -Wl,-O1 -Wl,-z,relro
QMAKE_LFLAGS_NOUNDEF   += -Wl,--no-undefined


../common/g++-unix.conf:
#
# Qmake configuration for the GNU C++ compiler
#
# Before making changes to this file, please read the comment in
# gcc-base.conf, to make sure the change goes in the right place.
#
# To verify that your change has the desired effect on the final configuration
# you can use the manual test in tests/manual/mkspecs.
#

QMAKE_COMPILER          = gcc

QMAKE_CC                = gcc

QMAKE_LINK_C            = $$QMAKE_CC
QMAKE_LINK_C_SHLIB      = $$QMAKE_CC

QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -g

QMAKE_CXX               = g++

QMAKE_LINK              = $$QMAKE_CXX
QMAKE_LINK_SHLIB        = $$QMAKE_CXX

QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO

QMAKE_PCH_OUTPUT_EXT    = .gch

QMAKE_CFLAGS_PRECOMPILE       = -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
QMAKE_CFLAGS_USE_PRECOMPILE   = -include ${QMAKE_PCH_OUTPUT_BASE}
QMAKE_CXXFLAGS_PRECOMPILE     = -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE

QMAKE_CXXFLAGS_CXX11    = -std=c++0x
QMAKE_LFLAGS_CXX11      =
#3
I made the test and it does not work on my x86_64...
the compilation on my system is made with -I/usr/lib64/qt5/mkspecs/linux-g++-64, where is the file qmake.conf:
#
# qmake configuration for linux-g++
#
# Written for GNU/Linux platforms that have both lib and lib64 directories,
# like the AMD Opteron.
#

MAKEFILE_GENERATOR      = UNIX
CONFIG                 += incremental gdb_dwarf_index
QMAKE_INCREMENTAL_STYLE = sublib

QMAKE_CFLAGS            = -m64
QMAKE_LFLAGS            = -m64

QMAKE_CFLAGS_RELEASE   += -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2  -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic

include(../common/linux.conf)
include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)


QMAKE_LIBDIR_X11        = /usr/X11R6/lib64
QMAKE_LIBDIR_OPENGL     = /usr/X11R6/lib64

load(qt_config)


Anyway, in my case:


  • NO: addition of the lines
        "linux-g++: QMAKE_CXXFLAGS_RELEASE -= -g"
        and
        "linux-g++: QMAKE_CFLAGS_RELEASE -= -g"
        (without quotes) in the files src/src.pro and src/src-cl.pro

  • YES: addition of the lines
        "linux-g++-64: QMAKE_CXXFLAGS_RELEASE -= -g"
        and
        "linux-g++-64: QMAKE_CFLAGS_RELEASE -= -g"
        (or the more generic linux-g++*) in the files src/src.pro and src/src-cl.pro

  • NO: addition of the lines
        "linux-g++-64: QMAKE_CFLAGS_RELEASE -= -g"
        (without quotes) in the files src/src.pro and src/src-cl.pro

  • YES: addition of the lines
        "linux-g++-64: QMAKE_CXXFLAGS_RELEASE -= -g"
        (without quotes) in the files src/src.pro and src/src-cl.pro
#4
Hello Liviu,
I tried to compile fet on Fedora 20 x86_64 forgetting to change the line with QMAKE_CFLAGS_RELEASE in the system file /usr/lib64/qt5/mkspecs/linux-g++-64/qmake.conf and I got the two executables in the following sizes:
- fet-cl: 25.9MB (expected: 3.4MB);
- fet: 220.1MB (expected: 11.5MB).

To avoid changing the system files I have tried alternative solutions by adding the line linux*-g++*:QMAKE_CXXFLAGS_RELEASE -= -g in the file fet.pro (to override the system settings) without success.

Later, after several searches on google (a useful reference: http://qt-project.org/forums/viewthread/10020), I realized that the added variable in fet.pro was not propagated in the subprojects, and I found two alternative working solutions:

  • the addition of the line "linux*-g++*:QMAKE_CXXFLAGS_RELEASE -= -g" in the files src/src.pro and src/src-cl.pro;
  • the addition of the hidden file .qmake.cache, containing the line "linux*-g++*:QMAKE_CXXFLAGS_RELEASE -= -g" (and eventually all the useful common stuff), in the directory of the main project.
What do you think?
#5
Hello Liviu,
I have compiled and tested the latest version at http://lalescu.ro/liviu/fet/download/test/fet-5.20.2-snapshot-10-oct-2013-12_52.tar.bz2 and it works as expected:
Quote from: MarioMic on October 09, 2013, 10:47:19 PM
Watching with system monitor the running process, fet-cl first write two files, $OUTPUT_PATH/logs/file_open.log and $OUTPUT_PATH/logs/initial_order.txt, and during the computation uses only the files: $OUTPUT_PATH/logs/result.txt, $OUTPUT_PATH/logs/max_placed_activities.txt, /dev/pts/0, /dev/pts/0, /dev/pts/0, anon_inode:[eventfd] and two pipes (and at the end writes the result content in the timetable folder).
The gui version fet first write one file, $OUTPUT_PATH/logs/file_open.log, and during the multiple timetables computation uses only /dev/null, some local sockets, some pipes, some anon_inode:[eventfd], /dev/dri/card0 and at the end writes the result content and result.txt in the timetable folder.
The fet-cl option --verbose=true works in the right way with debug messages only on the terminal output... no data on /var/log/messages...
Good job! Thanks.
#6
Quote from: Liviu Lalescu on October 10, 2013, 11:01:22 AM
I decided to keep an option: "--verbose=true" to the command line version, in case someone wants verbosity. Please test the new snapshot and report results.

Yes, I think it's ok.
This evening I'll try the latest version and let you know.
#7
I use the gui version rather than the command line, but I think it would be helpful to have a default fet-cl output to the terminal that shows the progress of the operations, similar to the output of the gui version for the placed activities to have an idea of how far away is the result and, perhaps, an option -d or --debug to get debug output, but I think it's just a minor improvement, non urgent (I don't know how demanding it is to add command options to fet-cl).
I don't know how useful this output, but certainly it is an information for the progress of the operations, and so, in the meantime, I would keep the debug output to the terminal.
#8
Suggestions / Re: Max level of conflict.
October 09, 2013, 11:37:29 PM
Ok, but the problem is that sometimes there is no possible perfect timetable and I have to decide which constraint violation is the least bad, ... without knowing at first the consequences I have to generate multiple timetables for various scenarios... probably I must use in a better way the constraints ... I'm learning.
#9
The latest two snapshot versions show me the update info: "Another version: 5.20.1, is available on ..."
Are those versions built on the latest code? Is this only an info message based on the unofficial version number?
#10
I compiled the latest version http://lalescu.ro/liviu/fet/download/test/fet-5.20.2-snapshot-9-oct-2013-16_49.tar.bz2 and fet-cl has no output at all (no terminal output and no log data on /var/log/messages, but also no progress info); the file use is the same.
No changes for the gui version fet.
#12
It seems ok.
#13
Hello Liviu, I wish I could help you but unfortunately I'm not a programmer.
Anyway I have compiled the new test version at http://lalescu.ro/liviu/fet/download/test/fet-5.20.2-snapshot-9-oct-2013-16_49.tar.bz2 and running fet-cl and fet there are no output in /var/log/messages. Running fet-cl I have only the output in the terminal and no log messages on disk.
Watching with system monitor the running process, fet-cl first write two files, $OUTPUT_PATH/logs/file_open.log and $OUTPUT_PATH/logs/initial_order.txt, and during the computation uses only the files: $OUTPUT_PATH/logs/result.txt, $OUTPUT_PATH/logs/max_placed_activities.txt, /dev/pts/0, /dev/pts/0, /dev/pts/0, anon_inode:[eventfd] and two pipes (and at the end writes the result content in the timetable folder).
The gui version fet first write one file, $OUTPUT_PATH/logs/file_open.log, and during the multiple timetables computation uses only /dev/null, some local sockets, some pipes, some anon_inode:[eventfd], /dev/dri/card0 and at the end writes the result content and result.txt in the timetable folder.
#14
Suggestions / Re: Max level of conflict.
October 08, 2013, 07:43:24 PM
Excuse me, I missed...

Certainly an algorithm that during the calculation of a solution does not proceed further if it exceeds a configurable threshold of conflicts and goes to compute the next solution would save disk space and also time consuming.
#15
Suggestions / Re: Max level of conflict.
October 08, 2013, 07:35:13 PM
Certainly an algorithm that during the calculation of a solution does not proceed further if it exceeds a configurable threshold of conflicts would save disk space and also time consuming.