OpenM++ runtime library (libopenm)
helper.h
Go to the documentation of this file.
1
5// Copyright (c) 2013-2015 OpenM++
6// This code is licensed under the MIT license (see LICENSE.txt for details)
7
8#ifndef OM_I_HELPER_H
9#define OM_I_HELPER_H
10
11#include <regex>
13
14using namespace std;
15
16// time intervals for interprocess communication and model status update
17//
18#define OM_SEND_SLEEP_TIME 29L /* msec, send completion test sleep interval */
19#define OM_RECV_SLEEP_TIME 31L /* msec, receive probe sleep interval */
20#define OM_RUN_POLL_TIME 17L /* msec, wait interval for modeling threads polling */
21#define OM_ACTIVE_SLEEP_TIME 37L /* msec, sleep interval if there any child process activity */
22#define OM_WAIT_SLEEP_TIME 971L /* msec, sleep interval if no progress in modeling threads */
23#define OM_LOG_PROGRESS_TIME 5003L /* msec, interval to log progress messages */
24#define OM_MICRODATA_SAVE_TIME 8123L /* msec, interval between microdata save in database */
25
26// add file and line number to debug log
27//
28#ifdef _DEBUG
29 #define OM_DBG_STR(line) #line
30 #define OM_DBG_TO_STR(s_line) OM_DBG_STR(s_line)
31 #define OM_FILE_LINE __FILE__ ":" OM_DBG_TO_STR( __LINE__ )
32#else
33// #define OM_FILE_LINE
34 #define OM_FILE_LINE ""
35#endif // _DEBUG
36
37//#define OM_LOG_MSG(msg) msg OM_FILE_LINE
38
39#endif // OM_I_HELPER_H
OpenM++ common helper utilities.