multicore

Run an Application in GDB Until an Exception Occurs

南笙酒味 提交于 2019-12-17 07:01:13
问题 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 message, but I have no idea where in my thread it occurs. A backtrace would really be helpful. When I run my app in GDB, it pauses every time a thread is suspended or resumed. I want my app to continue running normally until one of the threads dies with

multi-CPU, multi-core and hyper-thread

帅比萌擦擦* 提交于 2019-12-17 06:23:12
问题 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 is my current understanding after learning online and learning from others' comments; could anyone review comment please? I think hyper-thread is the most inferior technology among them, but cheap. Its main idea is duplicate registers to save

multi-CPU, multi-core and hyper-thread

假装没事ソ 提交于 2019-12-17 06:23:03
问题 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 is my current understanding after learning online and learning from others' comments; could anyone review comment please? I think hyper-thread is the most inferior technology among them, but cheap. Its main idea is duplicate registers to save

Private Variables in Threads

旧时模样 提交于 2019-12-14 02:13:41
问题 I'm a starter at using pthreads with C in Linux. I need to create and use private thread variables . Let me explain exactly what I need with an example. In the following piece of code I create 4 threads, I would like each of them to create a private variable foo , so in total 4 foo variables, one for each thread. Each thread should only "see" it's own foo variable and not the others. For example, if thread 1 sets foo = 56 and then calls doStuff , doStuff should print 56 . If thread 2 sets foo

After calling DebugBreakProcess() - What does the event's dwThreadId represent?

女生的网名这么多〃 提交于 2019-12-13 20:16:18
问题 Let's say some process debugs another process (by calling DebugActiveProcess()). Then some other process/thread generates break-points exceptions at that debugged process (by calling DebugBreakProcess()). The debugger then receives this EXCEPTION_DEBUG_EVENT->EXCEPTION_BREAKPOINT event and in the DEBUG_EVENT structure the field dwThreadId will hold some ID. My root question is - What does this dwThreadId represents? (MSDN says it is "The identifier of the thread in which the debugging event

How to use the doSMP and the foreach packages correctly?

笑着哭i 提交于 2019-12-12 09:59:26
问题 I am trying to use the doSMP package that provides a parallel backend for the foreach package. Can you point out what I do wrong? Indeed, using foreach in that way increases significantly the computing time... #------register doSMP to be used with foreach------ library(doSMP) w <- startWorkers(4) registerDoSMP(w) #-------------------------------------------------- #------A simple function------ sim <- function(a, b) { return(10 * a + b) } avec <- 1:200 bvec <- 1:400 #-------------------------

many-core CPU's: Programming techniques to avoid disappointing scalability

别等时光非礼了梦想. 提交于 2019-12-12 09:38:10
问题 We've just bought a 32-core Opteron machine, and the speedups we get are a little disappointing: beyond about 24 threads we see no speedup at all (actually gets slower overall) and after about 6 threads it becomes significantly sub-linear. Our application is very thread-friendly: our job breaks down into about 170,000 little tasks which can each be executed separately, each taking 5-10 seconds. They all read from the same memory-mapped file of size about 4Gb. They make occasional writes to it

mclapply with big objects - “serialization is too large to store in a raw vector”

痴心易碎 提交于 2019-12-12 08:25:24
问题 I keep hitting an issue with the multicore package and big objects. The basic idea is that I'm using a Bioconductor function ( readBamGappedAlignments ) to read in large objects. I have a character vector of filenames, and I've been using mclapply to loop over the files and read them into a list. The function looks something like this: objects <- mclapply(files, function(x) { on.exit(message(sprintf("Completed: %s", x))) message(sprintf("Started: '%s'", x)) readBamGappedAlignments(x) }, mc

Which is more Efficient? More Cores or More CPUs

青春壹個敷衍的年華 提交于 2019-12-12 08:00:48
问题 I realize this is more of a hardware question, but this is also very relevant to software, especially when programming for mult-threaded multi-core/cpu environments. Which is better, and why? Whether it be regarding efficiency, speed, productivity, usability, etc. 1.) A computer/server with 4 quad-core CPUs? or 2.) A computer/server with 16 single-core CPUs? Please assume all other factors (speed, cache, bus speeds, bandwidth, etc.) are equal. Edit : I'm interested in the performance aspect

Multi-threading for multi-core processors

喜欢而已 提交于 2019-12-12 07:20:16
问题 I have Samsung Galaxy S3, which used its own Exynos 4 Quad processor. So I want to optimize my app, that it can use all 4 cores of processor. So I made some tests: Run task in one thread. Processing time - 8 seconds. Run task in four threads. Processing time - still 8 sec. new Thread() { public void run() { // do 1/4 of task } }.start(); new Thread() { public void run() { // do 1/4 of task } }.start(); new Thread() { public void run() { // do 1/4 of task } }.start(); new Thread() { public