Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
all: test benchmark check

example: runners_example leader_directed_ring_example leader_undirected_ring_example leader_directed_clique_example leader_undirected_mesh_example leader_directed_hypercube_example leader_undirected_graph_example orientation_example size_estimation_example graphs_mst_example graphs_mis_example graphs_ds_example consensus_example
example: runners_example leader_directed_ring_example leader_undirected_ring_example leader_directed_clique_example leader_undirected_mesh_example leader_directed_hypercube_example leader_undirected_graph_example orientation_example size_estimation_example graphs_mst_example graphs_mis_example graphs_ds_example consensus_example graphs_coloring_example

runners_example:
go run example/synchronized.go 5
Expand Down Expand Up @@ -71,6 +71,9 @@ graphs_ds_example:
go run example/graphs_ds_sync_lrg.go 10 0.70
go run example/graphs_ds_sync_kuhn_wattenhofer.go 101 0.05 4

graphs_coloring_example:
go run example/graphs_coloring_sync_gps.go 20 0.25

unit_test:
go test ./leader/undirected_graph/sync_yoyo -v
go test ./graphs/mst/sync_ghs -v
Expand Down
33 changes: 33 additions & 0 deletions example/graphs_coloring_sync_gps.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package main

import (
"fmt"
"os"
"strconv"
"github.com/krzysztof-turowski/distributed-framework/graphs/coloring/sync_gps"
)

const exitFailure = 1

func main() {
if len(os.Args) < 2 {
fmt.Fprintln(os.Stderr, "Please specify graph size")
os.Exit(exitFailure)
}
if len(os.Args) < 3 {
fmt.Fprintln(os.Stderr, "Please specify p")
os.Exit(exitFailure)
}

n, err := strconv.Atoi(os.Args[1])
if err != nil {
fmt.Fprintln(os.Stderr, "Invalid size specification")
os.Exit(exitFailure)
}
p, err := strconv.ParseFloat(os.Args[2], 64)
if err != nil {
fmt.Fprintln(os.Stderr, "Invalid p specification")
}
sync_gps.Run(n,p)

}
Loading