Questions tagged [cpu-time]

103 questions
0
votes
1 answer

Python reduce import CPU impact

Context: I am creating a tkinter project that includes face recognition. Because import face_recognition, cv2takes a long time, to make it more convenient, this has been placed in a thread (I know tkinter doesn't like threads but they are very…
Minion Jim
  • 1,239
  • 13
  • 30
0
votes
1 answer

How do I get the memory usage and cpu time of a process executed using ProcessBuilder?

I am executing python/perl scripts on java using processBuilder. I want to know the memory usage and CPU time for the process executed. Java mx bean is limited to jvm. Hence ,I don't think it can be used for script executions. Please help.
0
votes
0 answers

Matlab runtime monotonically increases by independent runs

I am trying to solve a mixed integer linear program via YALMIP using Gurobi optimizer. I solve a problem which has a specific result I know. However, when I start Matlab in my computer for the first time it is being solved in 0.5 seconds. I clear…
0
votes
0 answers

Measure the time of a child process without blocking the parent

I want to measure the execution time of a child process. I can use times function https://linux.die.net/man/3/times. But it requires to block the parent process using wait(). On the other hand, I need to keep the parent process running in parallel…
Jina Lee
  • 119
  • 2
  • 10
0
votes
1 answer

Boost returning CPU time of 0

I'm trying to measure the CPU time for functions within my C++ program. I am doing this using the boost library. When I run my program however I get a result of 0 seconds. I'm new to boost so if someone could point me in the right direction? How…
luke_k
  • 15
  • 3
0
votes
1 answer

Formatted vs unformatted file writing

I have often observed that unformatted file writing (as shown below) is way faster than formatted file writing (also as shown below) in Fortran 90. Unformatted file writing OPEN ( Unit=86, File='out.dat', Form='unformatted', Action='Write') …
0
votes
0 answers

Why would non-parallelized Fortran measure too long of CPU time?

My program is showing a CPU running time longer than the time the program was actually running, with no parallelization written in the code. The code is written mostly in Fortran 90 (there's one or two later-Fortran things I added in) and compiled…
NeutronStar
  • 2,057
  • 7
  • 31
  • 49
0
votes
1 answer

CPUTIME and WALLTIME C++ code on Linux based cluster

I have a C++ code that i'm running a linux based cluster. I want to measure the CPU time and wall time. Here is how the bash file for submitting the job looks like: #!/bin/bash #$ -V #$ -cwd #$ -j y #$ -orte_onenode 2 #$ -o out #$ -N…
user147813
  • 67
  • 2
  • 8
0
votes
1 answer

Calculating CPU Time when using MPI

I'm working on a parallel matrix-matrix multiplier in MPI. I've got the calculation part working but I also want to calculate CPU time. I'm getting stuck because it looks like some processes are reporting start and end times of 0 and for a task…
RagingRoosevelt
  • 2,046
  • 19
  • 34
0
votes
1 answer

Why does my C++ program use more system time than run time?

I have a program that reads in a long list of words from a text file with command line redirection. No file streams. It takes the data in using getline(cin, string) and reads it into a vector. My program then processes the data. It also uses dynamic…
Ben C.
  • 31
  • 4
0
votes
1 answer

Can I specify order of evaluation, and how a matrix gets multuplied in python?

I'm taking a numerical linear algebra course and I've chosen to use python as my language of choice (want to be employable). Is there a way to evaluate (AB)C vs A(BC), where A,B,C are conformable matrices? I want to check cpu time and operation…
0
votes
1 answer

Why the C++ running time I get in profiler is not accurate?

I'm trying to profile a C++ application. I've tried gprof, HPCToolkit and ScoreP. My problem is that for different runs I obtain different running times, there's a difference of about 10% from one execution to another (like 2.5 and 2.7 seconds).…
rosilho
  • 145
  • 1
  • 2
  • 7
0
votes
1 answer

What flag do I need to pass to java to limit the running time and memory usage of a .class file?

For testing purposes, I want to know if there is a flag I can pass to java in order to limit the total execution time and memory usage of a .class file. Motivation: let's say that I automatically download someone else's code and I run it…
Pablo Rivas
  • 941
  • 9
  • 16
0
votes
3 answers

Using time command to know the real time and cpu time - how accurate?

I was just trying to get the cpu time and real time elapsed by running a code using time command on a Linux console. However, every time I run this command, I get different values. So, the repeatability in results is not there. The cpu time…
beginner
  • 411
  • 4
  • 14
0
votes
0 answers

Real time and cpu time measurement difference - firstly, using clock() and gtod(), secondly using time command on console?

I was just playing with some of the timer functions to estimate the real time and cpu time consumed by a code using clock() and gtod(). In other case, I simply type time ./object file name. However, I was surprised to see the big differences (in one…
beginner
  • 411
  • 4
  • 14