diff --git a/src/core/config/CMakeLists.txt b/src/core/config/CMakeLists.txt index 1a4c3635c7174718cd6ce4599d83b8404e850953..eb981de3887e662bb254de0f120b9c7f0440095f 100644 --- a/src/core/config/CMakeLists.txt +++ b/src/core/config/CMakeLists.txt @@ -19,11 +19,13 @@ OPTION(CONFIG_SUPPRESS_INTERRUPTS "Target backend: Suppress interrupts" OF OPTION(CONFIG_FIRE_INTERRUPTS "Target backend: Fire interrupts" OFF) OPTION(CONFIG_DISABLE_KEYB_INTERRUPTS "Target backend: Suppress keyboard interrupts" OFF) OPTION(SERVER_PERFORMANCE_MEASURE "Performance measurement in job-server" OFF) -SET(SERVER_PERF_LOG_PATH "perf.log" CACHE STRING "A file name for storing the server's performance log (CSV)") -SET(SERVER_PERF_STEPPING_SEC "1" CACHE STRING "Stepping of performance measurements in seconds") -SET(CLIENT_RAND_BACKOFF_TSTART "3" CACHE STRING "Lower limit of client's backoff phase in seconds") -SET(CLIENT_RAND_BACKOFF_TEND "8" CACHE STRING "Upper limit of client's backoff phase in seconds") -SET(CLIENT_RETRY_COUNT "3" CACHE STRING "Client's number of reconnect retries") +SET(SERVER_COMM_HOSTNAME "localhost" CACHE STRING "Job-server hostname or IP") +SET(SERVER_COMM_TCP_PORT "1111" CACHE STRING "Job-server TCP port") +SET(SERVER_PERF_LOG_PATH "perf.log" CACHE STRING "A file name for storing the server's performance log (CSV)") +SET(SERVER_PERF_STEPPING_SEC "1" CACHE STRING "Stepping of performance measurements in seconds") +SET(CLIENT_RAND_BACKOFF_TSTART "3" CACHE STRING "Lower limit of client's backoff phase in seconds") +SET(CLIENT_RAND_BACKOFF_TEND "8" CACHE STRING "Upper limit of client's backoff phase in seconds") +SET(CLIENT_RETRY_COUNT "3" CACHE STRING "Client's number of reconnect retries") configure_file(${CMAKE_CURRENT_SOURCE_DIR}/FailConfig.hpp.in ${CMAKE_CURRENT_BINARY_DIR}/FailConfig.hpp) diff --git a/src/core/config/FailConfig.hpp.in b/src/core/config/FailConfig.hpp.in index 2897f22fc128afd4e9f94817feaf9a499fdcb85f..d18643e72f978a71a8ba5b5860900bb057d31292 100644 --- a/src/core/config/FailConfig.hpp.in +++ b/src/core/config/FailConfig.hpp.in @@ -27,6 +27,8 @@ #cmakedefine CONFIG_FIRE_INTERRUPTS #cmakedefine CONFIG_DISABLE_KEYB_INTERRUPTS #cmakedefine SERVER_PERFORMANCE_MEASURE +#cmakedefine SERVER_COMM_HOSTNAME "@SERVER_COMM_HOSTNAME@" +#cmakedefine SERVER_COMM_TCP_PORT @SERVER_COMM_TCP_PORT@ #cmakedefine SERVER_PERF_LOG_PATH "@SERVER_PERF_LOG_PATH@" #cmakedefine SERVER_PERF_STEPPING_SEC @SERVER_PERF_STEPPING_SEC@ #cmakedefine CLIENT_RAND_BACKOFF_TSTART @CLIENT_RAND_BACKOFF_TSTART@ diff --git a/src/core/cpn/JobServer.cc b/src/core/cpn/JobServer.cc index 44fb334c936876bd1217283d9af00c447282953d..5648fb1bc20048299b0744b0a94eb53372ac45ac 100644 --- a/src/core/cpn/JobServer.cc +++ b/src/core/cpn/JobServer.cc @@ -130,7 +130,7 @@ void JobServer::run() return; } - /* IPv4, Port: 1111, accept all IP adresses */ + /* IPv4, bind to all interfaces */ struct sockaddr_in saddr; saddr.sin_family = AF_INET; saddr.sin_port = htons(m_port); diff --git a/src/core/cpn/JobServer.hpp b/src/core/cpn/JobServer.hpp index 66ecee3943f2f1d1fc812a1e83466068edcaedd6..93069862f43cab86d6a0d3cd001d6bbb0c0c2379 100644 --- a/src/core/cpn/JobServer.hpp +++ b/src/core/cpn/JobServer.hpp @@ -72,7 +72,7 @@ private: void sendWork(int sockfd); public: - JobServer(int port = 1111) : m_port(port), m_finish(false), m_noMoreExps(false), + JobServer(int port = SERVER_COMM_TCP_PORT) : m_port(port), m_finish(false), m_noMoreExps(false), m_maxThreads(128), m_threadtimeout(0) { #ifndef __puma diff --git a/src/core/efw/JobClient.hpp b/src/core/efw/JobClient.hpp index c66bbfad53b4d3bb2ddfcb00997f2f8bb0a92f16..c477793d036f5ac2d98ea7e50e0dbd0e666ef8cc 100644 --- a/src/core/efw/JobClient.hpp +++ b/src/core/efw/JobClient.hpp @@ -31,7 +31,7 @@ private: FailControlMessage_Command tryToGetExperimentData(ExperimentData& exp); public: - JobClient(const std::string& server = "localhost", int port = 1111); + JobClient(const std::string& server = SERVER_COMM_HOSTNAME, int port = SERVER_COMM_TCP_PORT); /** * Receive experiment data set from (remote) JobServer * The caller (experiment developer) is responsible for diff --git a/src/experiments/checksum-oostubs/experiment.hpp b/src/experiments/checksum-oostubs/experiment.hpp index a0ab7a9845f963211d3475c67a3c3a70a1d5bbf7..c17037497cfbbf4bc63db9e7e2dc195b622e8015 100644 --- a/src/experiments/checksum-oostubs/experiment.hpp +++ b/src/experiments/checksum-oostubs/experiment.hpp @@ -7,7 +7,6 @@ class ChecksumOOStuBSExperiment : public fail::ExperimentFlow { fail::JobClient m_jc; public: - ChecksumOOStuBSExperiment() : m_jc("ios.cs.tu-dortmund.de") {} bool run(); }; diff --git a/src/experiments/cool-checksum/experiment.hpp b/src/experiments/cool-checksum/experiment.hpp index 36d121a23c6f81cb06e4cbfe72d905a02833076d..a502ef49c1ce53b8b89d32f4e815a1770e0c3fe8 100644 --- a/src/experiments/cool-checksum/experiment.hpp +++ b/src/experiments/cool-checksum/experiment.hpp @@ -7,7 +7,6 @@ class CoolChecksumExperiment : public fail::ExperimentFlow { fail::JobClient m_jc; public: - CoolChecksumExperiment() : m_jc("ios.cs.tu-dortmund.de") {} bool run(); }; diff --git a/src/experiments/ecos_kernel_test/experiment.hpp b/src/experiments/ecos_kernel_test/experiment.hpp index ed52ab7a49ae551e50ebbd965fb04801910ebc50..2e2c93c4fc54eed160332534fbec9578f49d3ea6 100644 --- a/src/experiments/ecos_kernel_test/experiment.hpp +++ b/src/experiments/ecos_kernel_test/experiment.hpp @@ -8,7 +8,7 @@ class EcosKernelTestExperiment : public fail::ExperimentFlow { fail::JobClient m_jc; fail::Logger log; public: - EcosKernelTestExperiment() : m_jc("ios.cs.tu-dortmund.de"), log("eCos Kernel Test", false) {} + EcosKernelTestExperiment() : log("eCos Kernel Test", false) {} bool run(); bool retrieveGuestAddresses(); // step 0 diff --git a/src/experiments/vezs-example/experiment.hpp b/src/experiments/vezs-example/experiment.hpp index 701770465e040632ce609309b4945deabaa170a2..09404a2932743a3c8dc06babcbbcb250d933e6e0 100644 --- a/src/experiments/vezs-example/experiment.hpp +++ b/src/experiments/vezs-example/experiment.hpp @@ -7,7 +7,6 @@ class VEZSExperiment : public fail::ExperimentFlow { fail::JobClient m_jc; public: - VEZSExperiment() : m_jc("ios.cs.tu-dortmund.de") {} bool run(); }; diff --git a/src/experiments/weather-monitor/experiment.hpp b/src/experiments/weather-monitor/experiment.hpp index 13b88ad8a8874ecaf2d9990e6bb9eb39a889dc32..2b7036e0d9d0c9ebfd3c20bb8615e1c67960c7fb 100644 --- a/src/experiments/weather-monitor/experiment.hpp +++ b/src/experiments/weather-monitor/experiment.hpp @@ -7,7 +7,6 @@ class WeatherMonitorExperiment : public fail::ExperimentFlow { fail::JobClient m_jc; public: - WeatherMonitorExperiment() : m_jc("ios.cs.tu-dortmund.de") {} bool run(); };