tsp (#20) - tsp server closed the connection unexpectedly (#237) - Message List

tsp server closed the connection unexpectedly

Hi, I have a problem with TSP. When I run a select like this:

SELECT * FROM tsp('select distinct source as source_id, x(startpoint(the_geom)) as x, y(startpoint(the_geom)) as y from ways where source in (345,366,364,347,348)', '345,366,364,347,348', 343);

The postgresql server closes the connection. It launchs this message: server closed the connection unexpectedly

This probably means the server terminated abnormally before or while processing the request.

My street network table is derived from osm2pgrouting utility. I use an osm file from Alicante city (Spain) very completed ( http://www.openstreetmap.org/?lat=38.3526&lon=-0.4891&zoom=14&layers=B000FTF), with right directions and turns. The ways table has 5390 rows.

These are my steps: 1. create a database with postgis and pgrouting functionality 2. run osm2pgrouting 3. assign vertex with: SELECT assign_vertex_id('ways', 0.00001, 'the_geom', 'gid'); 4. run queries with Shortest Path Dijkstra, Shortest Path A*, Shortest Path Shooting Star, Driving Distance calculation without problems.

This are my box: - Ubuntu 8.10 - pgRouting 1.03 compiled from source with DD and TSP - Postgresql 8.3.6

My steps for compiling pgrouting:

1. Install the required libraries: libboost-graph1.35-dev libboost-graph1.35.0

2. Compile Gaul from source:

wget  http://downloads.sourceforge.net/gaul/gaul-devel-0.1849-0.tar.gz?modtime=1114163427&big_mirror=0 tar -xzf gaul-devel-0.1849-0.tar.gz cd gaul-devel-0.1849-0/ ./configure --disable-slang make sudo make install

3. Compile CGAL Download CGAL 3.3.1 source Compile instruction: sudo ./install_cgal --prefix=/usr/local --with-boost=n --BOOST_INCL_DIR /usr/local/include/boost-1_36 --BOOST_LIB_DIR /usr/local/lib --without-autofind -ni /usr/bin/g++

4. Copy libCGAL.so from /usr/local/lib to /usr/lib:

sudo cp /usr/local/lib/libCGAL.so /usr/lib/

5. Compile pgrouting cmake -DWITH_TSP=ON -DWITH_DD=ON make sudo make install

NOTE: Too much warnings on console.

  • Message #836

    Without being able to look into all details now, you wrote

    This are my box: - Ubuntu 8.10 - pgRouting 1.03 compiled from source with DD and TSP - Postgresql 8.3.6


    Could you compile pgRouting and didn't have this problem?
    http://pgrouting.postlbs.org/ticket/131
    http://pgrouting.postlbs.org/discussion/21/208#-1

    • Message #837

      Yes, I have many warnings like this:

      jose@j3m:~/compilar/pgrouting$ cmake -DWITH_TSP=ON -DWITH_DD=ON
      Boost headers were found here: /usr/include
      Output directory for libraries is set to /usr/lib/postgresql/8.3/lib
      Installation directory for libraries is set to /usr/lib/postgresql/8.3/lib and for SQL files is set to /usr/share/postlbs
      Installation directory for libraries is set to /usr/lib/postgresql/8.3/lib
      -- Configuring done
      -- Generating done
      -- Build files have been written to: /home/jose/compilar/pgrouting
      jose@j3m:~/compilar/pgrouting$ make
      [  8%] Building C object extra/tsp/src/CMakeFiles/routing_tsp.dir/tsp.o
      [ 16%] Building CXX object extra/tsp/src/CMakeFiles/routing_tsp.dir/tsp_solver.o
      Linking CXX shared library ../../../lib/librouting_tsp.so
      [ 16%] Built target routing_tsp
      [ 25%] Building C object extra/driving_distance/src/CMakeFiles/routing_dd.dir/alpha.o
      [ 33%] Building CXX object extra/driving_distance/src/CMakeFiles/routing_dd.dir/alpha_drivedist.o
      [ 41%] Building CXX object extra/driving_distance/src/CMakeFiles/routing_dd.dir/boost_drivedist.o
      En el archivo incluído de /usr/include/c++/4.3/ext/hash_set:64,
                       from /usr/include/boost/graph/adjacency_list.hpp:22,
                       from /home/jose/compilar/pgrouting/extra/driving_distance/src/boost_drivedist.cpp:25:
      /usr/include/c++/4.3/backward/backward_warning.h:33:2: aviso: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated.
      [ 50%] Building C object extra/driving_distance/src/CMakeFiles/routing_dd.dir/drivedist.o
      Linking CXX shared library ../../../lib/librouting_dd.so
      [ 50%] Built target routing_dd
      [ 58%] Building C object core/src/CMakeFiles/routing.dir/dijkstra.o
      [ 66%] Building C object core/src/CMakeFiles/routing.dir/astar.o
      [ 75%] Building C object core/src/CMakeFiles/routing.dir/shooting_star.o
      [ 83%] Building CXX object core/src/CMakeFiles/routing.dir/boost_wrapper.o
      En el archivo incluído de /usr/include/c++/4.3/ext/hash_set:64,
                       from /usr/include/boost/graph/adjacency_list.hpp:22,
                       from /home/jose/compilar/pgrouting/core/src/boost_wrapper.cpp:25:
      /usr/include/c++/4.3/backward/backward_warning.h:33:2: aviso: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated.
      [ 91%] Building CXX object core/src/CMakeFiles/routing.dir/astar_boost_wrapper.o
      En el archivo incluído de /usr/include/c++/4.3/ext/hash_set:64,
                       from /usr/include/boost/graph/adjacency_list.hpp:22,
                       from /home/jose/compilar/pgrouting/core/src/astar_boost_wrapper.cpp:25:
      /usr/include/c++/4.3/backward/backward_warning.h:33:2: aviso: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated.
      [100%] Building CXX object core/src/CMakeFiles/routing.dir/shooting_star_boost_wrapper.o
      En el archivo incluído de /usr/include/c++/4.3/ext/hash_set:64,
                       from /usr/include/boost/graph/adjacency_list.hpp:22,
                       from /home/jose/compilar/pgrouting/core/src/shooting_star_boost_wrapper.cpp:25:
      /usr/include/c++/4.3/backward/backward_warning.h:33:2: aviso: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated.
      Linking CXX shared library ../../lib/librouting.so
      [100%] Built target routing
      

      Other question: I have installed Ubuntu 9.04 beta (on VirtualBox?) and after compile pgrouting (with libboost 1.38) the same problem continued with the TSP.

      • Message #838

        1. It looks like you are using Boost 1.35, which is for gcc 4.4 already. If you upgrade to 4.4 version you won't get warnings anymore.

        2. That's my fault that TSP crashes without a warning. I think it is fixed already in the trunk. Anyway, your start node is 343, which is not in the list of nodes to visit. You just need to add it there.

        • Message #840

          1. You are all right. Boost version is 1.35. I compiled boost 1.38, cmake 2.6.3, CGAL 3.3.1 and there are not warnings now.

          2. Sorry, It's true. I forgot to add the start node

          • Message #1555

            Hello j3m!

            Did you solve the crash problem?

            I have the same problem here.

            Thanks in advance,

            Carlos