Questions tagged [multicore]

Multicore programming covers techniques for making programs run in parallel, by exploiting hardware with multiple processing cores.

Multicore programming covers techniques for making programs run in parallel, by exploiting hardware with multiple processing cores.

1203 questions
258
votes
10 answers

What does multicore assembly language look like?

Once upon a time, to write x86 assembler, for example, you would have instructions stating "load the EDX register with the value 5", "increment the EDX" register, etc. With modern CPUs that have 4 cores (or even more), at the machine code level does…
Paul Hollingsworth
  • 11,954
  • 12
  • 48
  • 66
180
votes
8 answers

Compiling with g++ using multiple cores

Quick question: what is the compiler flag to allow g++ to spawn multiple instances of itself in order to compile large projects quicker (for example 4 source files at a time for a multi-core CPU)?
bsofman
  • 1,935
  • 2
  • 12
  • 7
162
votes
1 answer

What's the status of multicore programming in Haskell?

What's the status of multicore programming in Haskell? What projects, tools, and libraries are available now? What experience reports have there been?
128
votes
8 answers

How do I measure separate CPU core usage for a process?

Is there any way to measure a specific process CPU usage by cores? I know top is good for measuring the whole system's CPU usage by cores and taskset can provide information about which CPU core is allowed for the process to run on. But how do I…
elang
  • 1,381
  • 2
  • 9
  • 4
107
votes
4 answers

Run an Application in GDB Until an Exception Occurs

I'm working on a multithreaded application, and I want to debug it using GDB. Problem is, one of my threads keeps dying with the message: pure virtual method called terminate called without an active exception Abort I know the cause of that…
Ankur Sethi
  • 3,338
  • 5
  • 21
  • 17
86
votes
9 answers

Node.js or Erlang

I really like these tools when it comes to the concurrency level it can handle. Erlang/OTP looks like much more stable solution but requires much more learning and a lot of diving into functional language paradigm. And it looks like Erlang/OTP makes…
user80805
  • 5,047
  • 5
  • 26
  • 30
81
votes
3 answers

multi-CPU, multi-core and hyper-thread

Could anyone recommend some documents to me to illustrate the differences between multi-CPU, multi-core, and hyper-thread? I am always confused about these differences, and about the pros/cons of each architecture in different scenarios. EDIT: here…
George2
  • 42,353
  • 103
  • 307
  • 447
69
votes
7 answers

Does python support multiprocessor/multicore programming?

What is the difference between multiprocessor programming and multicore programming? preferably show examples in python how to write a small program for multiprogramming & multicore programming
gath
  • 2,206
  • 5
  • 19
  • 11
66
votes
6 answers

R package that automatically uses several cores?

I have noticed that R only uses one core while executing one of my programs which requires lots of calculations. I would like to take advantage of my multi-core processor to make my program run faster. I have not yet investigated the question in…
Marco
  • 676
  • 1
  • 6
  • 3
66
votes
10 answers

Forcing multiple threads to use multiple CPUs when they are available

I'm writing a Java program which uses a lot of CPU because of the nature of what it does. However, lots of it can run in parallel, and I have made my program multi-threaded. When I run it, it only seems to use one CPU until it needs more then it…
Nosrama
  • 13,592
  • 12
  • 46
  • 56
65
votes
2 answers

How difficult is Haskell multi-threading?

I have heard that in Haskell, creating a multi-threaded application is as easy as taking a standard Haskell application and compiling it with the -threaded flag. Other cases, however, have described the use of a par command within the actual source…
Mantas Vidutis
  • 15,230
  • 20
  • 73
  • 91
62
votes
4 answers

Do the new C# 5.0 'async' and 'await' keywords use multiple cores?

Two new keywords added to the C# 5.0 language are async and await, both of which work hand in hand to run a C# method asynchronously without blocking the calling thread. My question is, do these methods actually take advantage of multiple cores and…
Icemanind
  • 43,745
  • 45
  • 159
  • 272
61
votes
22 answers

How are you taking advantage of Multicore?

As someone in the world of HPC who came from the world of enterprise web development, I'm always curious to see how developers back in the "real world" are taking advantage of parallel computing. This is much more relevant now that all chips are…
Todd Gamblin
  • 54,111
  • 13
  • 87
  • 94
59
votes
3 answers

Haskell lightweight threads overhead and use on multicores

I've been reading the "Real World Haskell" book, the chapter on concurrency and parallelism. My question is as follows: Since Haskell threads are really just multiple "virtual" threads inside one "real" OS-thread, does this mean that creating a lot…
user500944
58
votes
9 answers

How to control which core a process runs on?

I can understand how one can write a program that uses multiple processes or threads: fork() a new process and use IPC, or create multiple threads and use those sorts of communication mechanisms. I also understand context switching. That is, with…
poundifdef
  • 16,490
  • 19
  • 82
  • 126
1
2 3
80 81