...
|
...
|
@@ -49,7 +49,7 @@ int main(int argc, char** argv){ |
|
|
char const *number_str;
|
|
|
char *default_output;
|
|
|
int number, ret;
|
|
|
long executing_time, previous_executing_time;
|
|
|
uint64_t executing_time, previous_executing_time;
|
|
|
size_t linecap=0;
|
|
|
ssize_t line_size;
|
|
|
blc_channel channel;
|
...
|
...
|
@@ -73,11 +73,11 @@ int main(int argc, char** argv){ |
|
|
number=strtod(number_str, NULL);
|
|
|
|
|
|
array_def_with_tsv_file_first_line(&channel, filename, time_str);
|
|
|
channel.create_or_open(channel_name, BLC_CHANNEL_READ);
|
|
|
channel.create_or_open(channel_name, BLC_CHANNEL_WRITE);
|
|
|
blc_loop_try_add_posting_semaphore(channel.sem_ack_data);
|
|
|
|
|
|
SYSTEM_ERROR_CHECK(file=fopen(filename, "r"), NULL, "Opening '%s'", filename);
|
|
|
if (time_str) SYSTEM_SUCCESS_CHECK(fscanf(file, "%ld\t", &previous_executing_time), 1, "Reading time in file '%s'", filename);
|
|
|
if (time_str) SYSTEM_SUCCESS_CHECK(fscanf(file, "%llu\t", &previous_executing_time), 1, "Reading time in file '%s'", filename);
|
|
|
|
|
|
channel.publish();
|
|
|
BLC_COMMAND_LOOP(period){
|
...
|
...
|
@@ -90,7 +90,7 @@ int main(int argc, char** argv){ |
|
|
else{
|
|
|
fscan_tsv_floats(file, channel.floats, channel.dims[0].length);
|
|
|
if (time_str) {
|
|
|
ret=fscanf(file, "%lld\t", &executing_time);
|
|
|
ret=fscanf(file, "%llu\t", &executing_time);
|
|
|
if (ret==0 && feof(file)){
|
|
|
if (number==-1) blc_command_ask_quit();
|
|
|
else EXIT_ON_ERROR("End of file and you request '%d' iterations. Only '%d' has been done.", number, blc_loop_iteration);
|
...
|
...
|
|