Router version 5 parallel run

27 views
Skip to first unread message

Wei

unread,
Apr 22, 2014, 1:04:09 PM4/22/14
to trans...@googlegroups.com
Dear all,

I compiled the version 5 under Ubuntu 12.04 and tried to run a parallel Router program. But I met some problems when running it, as below. My machine has 4 CPUs and I used the command "mpirun -np 4 Router Router.ctl" to run the parallel Router program. I have run several mpi code examples (like helloworld) successfully Is there an instruction about how to run the parallel version? Thanks.

Wei

-------------------------------------------------------
Primary job  terminated normally, but 1 process returned
a non-zero exit code.. Per user-direction, the job has been aborted.
-------------------------------------------------------

    ********************************************
    |                                          |
    |         Router - Version 5.0.54          |
    |  Copyright 2012 by TRANSIMS Open-Source  |
    |         Tue Apr 22 11:54:49 2014         |
    |                                          |
    ********************************************


    Control File = Router.ctl


    Error: MPI Version Requires at least Two Processors

    Tue Apr 22 11:54:49 2014 -- Process Terminated Due to Errors (0:00:00)

    Press Enter to Continue

    ********************************************
    |                                          |
    |         Router - Version 5.0.54          |
    |  Copyright 2012 by TRANSIMS Open-Source  |
    |         Tue Apr 22 11:54:49 2014         |
    |                                          |
    ********************************************


    Control File = Router.ctl


    Error: MPI Version Requires at least Two Processors

    Tue Apr 22 11:54:49 2014 -- Process Terminated Due to Errors (0:00:00)

    Press Enter to Continue
    ********************************************
    |                                          |
    |         Router - Version 5.0.54          |
    |  Copyright 2012 by TRANSIMS Open-Source  |
    |         Tue Apr 22 11:54:49 2014         |
    |                                          |
    ********************************************


    Control File = Router.ctl


    Error: MPI Version Requires at least Two Processors

    Tue Apr 22 11:54:49 2014 -- Process Terminated Due to Errors (0:00:00)

    Press Enter to Continue


Here is my computer information.

Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                4
On-line CPU(s) list:   0-3
Thread(s) per core:    1
Core(s) per socket:    4
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 15
Stepping:              11
CPU MHz:               2660.107
BogoMIPS:              5319.93
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              4096K
NUMA node0 CPU(s):     0-3


Roden, David

unread,
Apr 22, 2014, 1:21:57 PM4/22/14
to trans...@googlegroups.com

MPI is used for running on multiple machines.  You will want to use the Boost thread configuration for running on multiple CPUs on the same machine.  This will be faster than MPI.

 

David B. Roden, P.E.

Senior Consulting Manager

AECOM

2101 Wilson Boulevard

Suite 800

Arlington, VA  22201

david...@aecom.com

703-340-3069

--
You received this message because you are subscribed to the Google Groups "TRANSIMS Users Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to transims_ug...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Wei

unread,
Apr 22, 2014, 2:09:24 PM4/22/14
to trans...@googlegroups.com
Hi David,

Thanks for your help. I recompiled the Boost version. Now I am using the boost thread to run the program. But I met some other problems. Here is the Router_2.prn file. It seems no trips were generated. I used the command "Router Router.ctl 2".
For the key "NUMBER_OF_THREADS", do I need to set it as 2 in every control file if I want to use the boost program? What's the difference between "NUM_OF_THREADS" and "NUM_OF_PARTITIONS" for simulation purpose.


    ********************************************
    |                                          |
    |         Router - Version 5.0.54          |
    |  Copyright 2012 by TRANSIMS Open-Source  |
    |         Tue Apr 22 14:02:03 2014         |

    |                                          |
    ********************************************

    Control File = Router.ctl
    Report File  = Router_2.prn (Create)

    Route the highway for 1.Router

    Project Directory = ../
    Default File Format = TAB_DELIMITED
    Time of Day Format = HOUR_CLOCK
    Random Number Seed = 1398189723
    Number of Threads = 2

    Input System Network Files:
    Node File = ../network/node.txt
    Link File = ../network/link.txt
    Pocket File = ../network/pocket.txt
    Connection File = ../network/connection.txt
    Parking File = ../network/parking.txt
    Location File = ../network/location.txt

    Input System Demand Files:
    Selection File = ../demand/select.txt
    Vehicle Type File = ../inputs/vehicle_type.txt
    Vehicle File = ../demand/vehicle.txt
    Trip File = ../demand/trip.txt

    Output System Demand Files:
    New Link Delay File = ../results/1.trip.linkdelay
    New Problem File = ../results/1.trip.problems
    New Plan File = ../demand/1.trip.plans.2



    Data Service Controls:

    Number of Time Periods = 96

    Flow-Time Service Controls:
    Update Flow Rates = TRUE

    Update Travel Times = TRUE
    Link Delay Update Rate = -1

    Equation Parameters 1 = BPR, A=0.15, B=4.00, C=0.75
    Equation Parameters 2 = BPR, A=0.10, B=4.50, C=0.75

    Path Building Parameters:
    Walk Path Details = TRUE
    Ignore Time Constraints = TRUE

    Walk Speed = 1.00 mps


    Route the highway for 1.Router
    Tue Apr 22 14:02:03 2014  Router  page 2



    Select Service Controls:

    Router Control Keys:



    Number of Node File Records = 18

    Number of Link File Records = 20
    Number of Directional Links = 28

    Number of Pocket File Records = 4

    Number of Vehicle Type File Records = 15

    Number of Connection File Records = 40

    Number of Parking File Records = 42

    Number of Location File Records = 42

    Number of Selection File Records = 8400

    Number of Vehicle File Records = 8400

    Number of File Partition Processors = 1
    Number of Path Builders per Process = 2


    New Link Delay File Records = 0

    Number of Travel Time Updates = 1

    Number of Trip File Records    = 1
    Number of Trip File Households = 1
    Number of Trip File Persons    = 1
    Number of Trip File Tours      = 1
    Number of Trip File Trips      = 1

    Number of New Plan File Records    = 0
    Number of New Plan File Households = 0
    Number of New Plan File Persons    = 0
    Number of New Plan File Tours      = 0
    Number of New Plan File Trips      = 0

    Tue Apr 22 14:02:03 2014 -- Process Complete (0:00:00)


Also, I found my select.txt file, generated by RandomSelect is different from the case on docs. Here is the prn file.


    ********************************************
    |                                          |
    |       RandomSelect - Version 5.0.1       |

    |  Copyright 2012 by TRANSIMS Open-Source  |
    |         Tue Apr 22 13:46:55 2014         |
    |                                          |
    ********************************************

    Control File = RandomSelect.ctl
    Report File  = RandomSelect.prn (Create)

    RandomSelect trip plans for Router

    Project Directory = ../
    Default File Format = TAB_DELIMITED
    Model Start Time = 7:00
    Model End Time = 10:00
    Random Number Seed = 234

    Input System Demand Files:
    Household File = ../demand/household.txt

    Output System Demand Files:
    New Selection File = ../demand/select.txt

    Data Service Controls:

    Select Service Controls:

    RandomSelect Control Keys:
    Number of Partitions = 2


    Number of Household File Records = 16800

    New Selection File Records = 8400

    Partition Distribution
        0       4242 ( 50.5%)
        1       4158 ( 49.5%)
    Total       8400

    Tue Apr 22 13:46:55 2014 -- Process Complete (0:00:00)

The output is like below. They are all 0s for tour and trip. Is this the problem for Router? Thanks.

HHOLD    PERSON    TOUR    TRIP    PARTITION
1    1    0    0    0
2    1    0    0    0
3    1    0    0    0
4    1    0    0    1
5    1    0    0    1
6    1    0    0    1
7    1    0    0    0
8    1    0    0    1
9    1    0    0    1
10    1    0    0    0

Roden, David

unread,
Apr 22, 2014, 3:09:52 PM4/22/14
to trans...@googlegroups.com

Partitions split the plans into multiple output files.  Your selection file defines to partitions 0 and 1.  The “2” after the control name refers to a file partition that does not exist. 

 

The alternative is to write all plans into a single output file, but use multiple threads to generate plans simultaneously.  In this case you would just run Router Router.ctl and set the number of threads in the control file to 4 or more.  This execution could still write two plan files if you want partitioned output.  The plan file name in the control file should be plan.* to create a separate file for each partition.

Reply all
Reply to author
Forward
0 new messages