git.iko.soy/distributed-process
on master help sign in
I had a problem with JustPingC both in gcc 4.4.6 and ICC 12. Tweaked it.
e6701d9Ryan Newton
network-transport-tcp/benchmarks/JustPingC.c+2−2
@@ -79,7 +79,7 @@ int client(int pings) {
79 printf("starting client\n");
79 printf("starting client\n");
80
80
81 struct addrinfo hints, *res;
81 struct addrinfo hints, *res;
82− int error, client_socket;
82+ int error, client_socket, i;
83
83
84 memset(&hints, 0, sizeof(hints));
84 memset(&hints, 0, sizeof(hints));
85 hints.ai_family = PF_INET;
85 hints.ai_family = PF_INET;
@@ -102,7 +102,7 @@ int client(int pings) {
102 return -1;
102 return -1;
103 }
103 }
104
104
105− for(int i = 0; i < pings; i++) {
105+ for(i = 0; i < pings; i++) {
106 double timestamp_before = timestamp();
106 double timestamp_before = timestamp();
107
107
108 send(client_socket, "ping123", 8, 0);
108 send(client_socket, "ping123", 8, 0);
network-transport-tcp/benchmarks/Makefile+1−1
@@ -8,7 +8,7 @@ INCLUDES=-i${ROOT}/network-transport/src -i${ROOT}/network-transport-tcp/src
8# PROF_GHC=-prof -fprof-auto
8# PROF_GHC=-prof -fprof-auto
9# PROF_EXE=+RTS -pa -RTS
9# PROF_EXE=+RTS -pa -RTS
10
10
11−GCC=gcc -std=c99
11+GCC=gcc
12GHC=ghc -rtsopts -XRankNTypes -XScopedTypeVariables -XDeriveDataTypeable -XCPP -XGeneralizedNewtypeDeriving -optP-include -optPcabal_macros.h
12GHC=ghc -rtsopts -XRankNTypes -XScopedTypeVariables -XDeriveDataTypeable -XCPP -XGeneralizedNewtypeDeriving -optP-include -optPcabal_macros.h
13
13
14all: NewTransport.ps Indirection.ps Headers.ps
14all: NewTransport.ps Indirection.ps Headers.ps