JuPedSim / jpsreport

Analysis tool
https://www.jupedsim.org/jpsreport_introduction.html
Other
3 stars 9 forks source link

Output folder | alternative location and name #59

Closed chraibi closed 5 years ago

chraibi commented 5 years ago

In Gitlab by @gjaeger on Nov 4, 2018, 11:42 [origin]

The data are stored by default in the "Output" folder. I think it makes sense if we provide an alternative path location and folder name in the inifile.

chraibi commented 5 years ago

In Gitlab by @chraibi on Nov 9, 2018, 16:04

created branch 91-output

chraibi commented 5 years ago

In Gitlab by @chraibi on Nov 9, 2018, 18:33

Can someone make 4 different tests (with small trajectories) to check the new changes for all methods:

Please upload a zip file in this issue. Thanks!

chraibi commented 5 years ago

In Gitlab by @chraibi on Nov 9, 2018, 18:56

created branch 91-output-folder-alternative-location-and-name

chraibi commented 5 years ago

In Gitlab by @chraibi on Nov 9, 2018, 18:56

mentioned in merge request !13

chraibi commented 5 years ago

In Gitlab by @gjaeger on Nov 9, 2018, 20:09

It does not work.

My inifile is in path ../export, the trajectory file is in ../data and the geometry is in ../docu.

ini_UNI_CORR_500_08_exp.xml

<?xml version="1.0" encoding="UTF-8"?>
<JPSreport project="JPS-Project" version="0.8.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/jps_report.xsd">
  <geometry file = "../docu/geo_UNI_CORR_500_08.xml" />

  <logfile>log_UNI_CORR_500_08_exp.txt</logfile>

  <trajectories format="txt" unit="m">
    <file name="traj_UNI_CORR_500_08_exp.txt" />
    <path location="../data" />
  </trajectories>

  <output location="Output/"/>

  <scripts location="/Users/gjaeger/Documents/hubs/JuPedSim_dev/jpsreport/scripts"/>

  <measurement_areas unit="m">
    <area_B id="1" type="BoundingBox" zPos="None">
      <vertex x=" -10.00" y=" 6.00" />
      <vertex x="  10.00" y=" 6.00" />
      <vertex x="  10.00" y=" -1.00" />
      <vertex x=" -10.00" y=" -1.00" />
    </area_B>

    <area_B id="2" type="BoundingBox" zPos="None">
      <vertex x="  -8.00" y="  1.50" />
      <vertex x="  -8.00" y="  3.50" />
      <vertex x="  -6.00" y="  3.50" />
      <vertex x="  -6.00" y="  1.50" />
      <length_in_movement_direction distance="2.0" />
    </area_B>

    <area_L id="3" type="Line" zPos="None">
      <start x="-8.00" y=" 1.50" />
      <end   x="-8.00" y=" 3.50" />
    </area_L>

  </measurement_areas>

  <velocity frame_step="10" set_movement_direction="None" ignore_backward_movement="false"/>

  <method_A enabled="true">
    <mesurement_area id="3" frame_interval="100" plot_time_series="true"/>
  </method_A>

  <method_B enabled="true">
    <mesurement_area id="2"/>
  </method_B>

  <method_C enabled="true">
    <mesurement_area id="2" plot_time_series="true"/>
  </method_C>

  <method_D enabled="true">
    <measurement_area id="1" start_frame="None" stop_frame="2000" get_individual_FD="true" plot_time_series="true"/> -->
    <one_dimensional enabled="false"/>
    <cut_by_circle enabled="true" radius="1.0" edges="10"/>
    <output_voronoi_cells enabled="true" plot_graphs="false"/>
    <profiles enabled="false" grid_size_x="0.20" grid_size_y="0.20"/>
    </method_D>
</JPSreport>

If there is no folder Output, jpsreport could not open the directory.

log_UNI_CORR_500_08_exp.txt

----
JuPedSim - JPSreport

Current date   : Nov  9 2018 18:56:44
Version        : 0.8.3
Compiler       : Compiler not identified ()
Commit hash    : v0.8.3-47-g78b485c
Commit date    : Fri Nov 9 18:54:42 2018
Branch         : 91-output
----

INFO:   Geometry File is: <./../docu/geo_UNI_CORR_500_08.xml>
INFO:   Format of the trajectory file is: <.txt>
INFO:   Input trajectory file is    <traj_UNI_CORR_500_08_exp.txt>
../data
INFO:   Input directory for loading trajectory is:  <./../data>
INFO:   Input directory for loading scripts is: </Users/gjaeger/Documents/hubs/JuPedSim_dev/jpsreport/scripts>
ERROR:  could not open the directory <./Output/>
INFO:   Finishing...
Time elapsed:    0.00 [s] 

An other error:

It does not works with <output location="./Output/"/>.

You get: ERROR: could not open the directory <././Output/>

An other error:

For Method A, B and C: The output location is ignored.

My test environment uni_corr_500_08.zip

chraibi commented 5 years ago

In Gitlab by @gjaeger on Nov 10, 2018, 22:50

with commit fd242e8d31d7f9c1368ff698b9faba513ba8d59d

$ jpsreport_dev ini_UNI_CORR_500_08_exp.xml
----
JuPedSim - JPSreport

Current date   : Sat Nov 10 22:45:00 2018
Version        : 0.8.3
Compiler       : Compiler not identified ()
Commit hash    : v0.8.3-56-gfd242e8
Commit date    : Sat Nov 10 16:42:59 2018
Branch         : 91-output
Python         : /opt/local/bin/python3.6 (3.6.6)
----

INFO:   Parsing the ini file <ini_UNI_CORR_500_08_exp.xml>
INFO:   logfile <./log_UNI_CORR_500_08_exp.txt>
jpsreport(27792,0x7fff9fc6e380) malloc: *** error for object 0x7ffee4539132: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6
chraibi commented 5 years ago

In Gitlab by @chraibi on Nov 11, 2018, 07:57

@gjaeger thanks for testing. :+1:

Since this issue is strongly related to #80, I merged both branches.

Therefore, candidate branch for being merged in develop is 80-use-boost-directory-functionality.

Please have a try with the latest commit a2f75e24 (branch: 80-use-boost-directory-functionality)

Just:

Please upload the following files

PS: your inifile has some typos. But, please do not correct them yet. jpsreport is supposed to deal with them and give back a message.

Thanks!

I tested this branch with your files. See attached screenshot:

Screenshot_2018-11-11_at_07.56.56

chraibi commented 5 years ago

In Gitlab by @gjaeger on Nov 11, 2018, 08:32

PS: your inifile has some typos. But, please do not correct them yet. jpsreport is supposed to deal with them and give back a message.

Which typos?

Please upload the following files

my path from where I call my inifile and the result:

$ pwd
/Users/gjaeger/Documents/hubs/PhD/07_experiments/uni_corr_500_08/export
$
$ jpsreport_dev ini_UNI_CORR_500_08_exp.xml
----
JuPedSim - JPSreport

Current date   : Sun Nov 11 08:25:07 2018
Version        : 0.8.3
Compiler       : Compiler not identified ()
Commit hash    : v0.8.3-69-ga2f75e2
Commit date    : Sun Nov 11 07:19:54 2018
Branch         : 80-use-boost-directory-functionality
Python         : /opt/local/bin/python3.6 (3.6.6)
----

INFO:   Parsing the ini file <ini_UNI_CORR_500_08_exp.xml>
jpsreport(28315,0x7fff9fc6e380) malloc: *** error for object 0x51: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6

my logfile: log_UNI_CORR_500_08_exp.txt

chraibi commented 5 years ago

In Gitlab by @chraibi on Nov 11, 2018, 10:12

Hmm, always segfault error.

I would suggest to remove jpsreport_dev, delete the content of your build and restart a clean build

This would also update the git information of the executable.

Your log file shows branch 91-output. Maybe you sent an old version?

Because of the typos in the inifile (see screenshot) this is the error you should get:

ERROR: Method A selected with no measurement area!

mesurement --> measurement

Screenshot_2018-11-10_at_13.04.20

chraibi commented 5 years ago

In Gitlab by @gjaeger on Nov 11, 2018, 10:42

I deleted the folder build and restarted a clean build:

$ mkdir build && cd build
$ cmake ..
-- JPSREPORT_VERSION: 0.8.3
-- The CXX compiler identification is GNU 6.4.0
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Check for working CXX compiler: /opt/local/bin/c++
-- Check for working CXX compiler: /opt/local/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: /opt/local/bin/git (found version "2.18.0") 
-- CMAKE_SOURCE_DIR: /Users/gjaeger/Documents/hubs/JuPedSim_dev/jpsreport
-- CMAKE_CURRENT_SOURCE_DIR: /Users/gjaeger/Documents/hubs/JuPedSim_dev/jpsreport
-- CMAKE_BUILD_TYPE: Release
-- CMAKE_RUNTIME_OUTPUT_DIRECTORY: /Users/gjaeger/Documents/hubs/JuPedSim_dev/jpsreport/bin
-- EXECUTABLE_OUTPUT_PATH: /Users/gjaeger/Documents/hubs/JuPedSim_dev/jpsreport/bin
-- CMAKE_VERBOSE_MAKEFILE: FALSE
-- BUILD_TESTING: OFF
-- PROCESSOR_COUNT 1
-- Found OpenMP_CXX: -fopenmp (found version "4.5") 
-- Found OpenMP: TRUE (found version "4.5")  
-- Using g++ 6.4.0
-- Set compiler flags (g++)
-- Debug flags: -g -Wall -Wno-unused-local-typedefs
-- Release flags: -O3 -DNDEBUG -Wall -Wno-unused-local-typedefs-static
-- Boost version: 1.66.0
-- Found the following Boost libraries:
--   system
--   filesystem
-- BOOST FOUND: 1_66
-- Boost_LIBRARY_DIRS: /opt/local/lib
-- Boost_INCLUDE_DIR: /opt/local/include
-- Boost_LIB_VERSION: 1_66
-- Boost_libraries: /opt/local/lib/libboost_system-mt.dylib/opt/local/lib/libboost_filesystem-mt.dylib
-- Found PythonInterp: /opt/local/bin/python3.6 (found version "3.6.6") 
-- Found Python: /opt/local/bin/python3.6  (version: 3.6.6)
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/gjaeger/Documents/hubs/JuPedSim_dev/jpsreport/build

Then I get:

$ jpsreport_dev ini_UNI_CORR_500_08_exp.xml
----
JuPedSim - JPSreport

Current date   : Sun Nov 11 10:39:26 2018
Version        : 0.8.3
Compiler       : Compiler not identified ()
Commit hash    : v0.8.3-69-ga2f75e2
Commit date    : Sun Nov 11 07:19:54 2018
Branch         : 80-use-boost-directory-functionality
Python         : /opt/local/bin/python3.6 (3.6.6)
----

INFO:   Parsing the ini file <ini_UNI_CORR_500_08_exp.xml>
jpsreport(28799,0x7fff9fc6e380) malloc: *** error for object 0x51: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6

The log file is not written. So I uploaded the old file, sorry.

chraibi commented 5 years ago

In Gitlab by @gjaeger on Nov 11, 2018, 10:44

Because of the typos in the inifile (see screenshot) this is the error you should get:

ERROR: Method A selected with no measurement area!

mesurement --> measurement

Thanks. I changed it.

chraibi commented 5 years ago

In Gitlab by @gjaeger on Nov 12, 2018, 13:09

solved with commit ae72040423f2a50639447b6c049848e52fc2183d in branch 80-use-boost-directory-functionality.

I propose to accept and merge the change (including C ++ 17).

chraibi commented 5 years ago

In Gitlab by @chraibi on Nov 15, 2018, 09:42

closed