Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6143165
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:29:14+00:00 2026-05-23T18:29:14+00:00

I searched everywhere before posting, but couldn’t find an answer.. I need to calculate

  • 0

I searched everywhere before posting, but couldn’t find an answer..

I need to calculate some statistics (Avg, St. Dev., etc.. ) for the execution time of an algorithm, so i have got this c++ program (bb.exe) that launches the algorithm and outputs the comp time.

Whenever i launch this program from the shell, it takes its time, but works fine.

Since the execution is not really fast, i wrote a c program (CalculateStat) that uses the system() call

system("bb.exe > output.txt");

to execute many times the previous algorithm and then calculates the needed statistics, so i can just launch “./CalculateStat” and come back a few hours later to see the results.

CalculateStat outputs ( in Standard Output ) every line printed by bb.exe.

The problem is that when CalculateStat launches bb.exe, it happens that bb.exe freezes with no reason (freezes about 2 times every 6 computations), so i have to kill it (ctrl+c) to let CalculateStat go on.

At first, i tought it could be a problem from the “system” call, so i wrote a perl script that did pretty much the same things, but i got the same problem.

Anyone has a suggestion?

EDIT–
I tought the problem might be the concurrent access to the output file, so i removed from “CalculateStat” the part reading the file, leaving only the consecutive calls.. But it still freezes

EDIT 2–
Wow.. It just got too weird, so i just kept trying to call the original bb.exe from the terminal, and it froze there too.. Now i know the problem was just the bb freezing randomly, (it never froze during tests, it started freezing on statistics calc.. )

Anyway, there’s no point in this question now.. Sorry everyone 🙁

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T18:29:15+00:00Added an answer on May 23, 2026 at 6:29 pm

    The problem was actually the Blackbox.. It was freezing when weird parameters were applied, and i solved it by using some checks on the main program. Thanks to everyone!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have searched everywhere but I couldn't find my answer, is there a way
I searched google but couldn't find an answer to this rather simple question. I
I've searched everywhere, but I can't seem to find any help... I have some
Searched everywhere but couldn't find anything. My question is: is it possible to programmatically
Ive searched everywhere for this but cant find the answer. I have used the
I've searched everywhere for this, but I can't seem to find a solution. Perhaps
I searched everywhere from google to this site but seems no answer for it.
I've searched everywhere but I can't seem to find a solution. I have been
I searched everywhere to find the .gemrc file specification but I haven't succeed. Does
I’ve searched everywhere and I can’t find an answer... is <label> an outdated HTML

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.