multicore

How can I make my Perl script use multiple cores for child processes?

柔情痞子 提交于 2019-12-02 18:12:12
I'm working on a mathematical model that uses data generated from XFOIL, a popular aerospace tool used to find the lift and drag coefficients on airfoils. I have a Perl script that calls XFOIL repeatedly with different input parameters to generate the data I need. I need XFOIL to run 5,600 times, at around 100 seconds per run, soabout 6.5 days to complete. I have a quad-core machine, but my experience as a programmer is limited, and I really only know how to use basic Perl. I would like to run four instances of XFOIL at a time, all on their own core. Something like this: while ( 1 ) { for ( i

Best programming approach/methodology to assure thread safety

我是研究僧i 提交于 2019-12-02 17:20:58
When I was learning Java coming from a background of some 20 years of procedural programming with basic, Pascal, COBOL and C, I thought at the time that the hardest thing about it was wrapping my head around the OOP jargon and concepts. Now with about 8 years of solid Java under my belt, I have come to the conclusion that the single hardest thing about programming in Java and similar languages like C# is the multithreaded/concurrent aspects. Coding reliable and scalable multi-threaded applications is just plain hard! And with the trend for processors to grow "wider" rather than faster, it is

Why doesn't multithreading in C# reach 100% CPU?

岁酱吖の 提交于 2019-12-02 16:15:55
I'm working on a program that processes many requests, none of them reaching more than 50% of CPU ( currently I'm working on a dual core ). So I created a thread for each request, the whole process is faster. Processing 9 requests, a single thread lasts 02min08s, while with 3 threads working simultaneously the time decreased to 01min37s, but it keeps not using 100% CPU, only around 50%. How could I allow my program to use full processors capability? EDIT The application isn't IO or Memory bounded, they're at reasonable levels all the time. I think it has something to do with the 'dual core'

Node.js or Erlang

我们两清 提交于 2019-12-02 15:39:22
I really like these tools when it comes to the concurrency level it can handle. Erlang 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 makes it much better when it comes to multi cores CPUs(fix me if I'm wrong). But which should I choose? Which one is better in the short/long term perspective? My goal is to learn a tool which makes scaling my web projects under high load easier than traditional languages. I would give Erlang a try. Even though it will be a steeper learning curve, you will get

What is the difference between multicore programming in Erlang and other language?

让人想犯罪 __ 提交于 2019-12-02 14:32:36
I read Joe Armstrong's 'Programming Erlang' , and the 'n times faster in n core machine' theory. The efficient way to multicore programming in Erlang is to use lots of processes (threads). I'm a C++ programmer, so I am curious about the difference between making lots of threads in C++ and making lots of processes in Erlang. I understand dealing with threads in C/C++ is not that easy. Also I know locking/unlocking makes the system slow down. But it is not impossible , right? So.. why is Erlang a muticore friendly language? Is it just because it's easy to program? I'm making an online game

Multithreading and multicore differences

笑着哭i 提交于 2019-12-02 14:07:09
I have a couple of small questions. Firstly is there a difference between multithreading and multicore? Are they two completely different things or does multithreading use more than one core if it needs? Secondly Most cores have two threads but when profiling my app I noticed lots of different threads ranging from thread 128 to thread 3460. What dictates how many threads your computer has? Thanks Firstly is there a difference between multithreading and multicore? Yes. Multithreading and Multicore are different pieces of terminology that apply to different areas of computing. Multicore refers

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

时光总嘲笑我的痴心妄想 提交于 2019-12-02 13:54:53
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 measure a specific process' CPU usage by CPU cores? abdollar You can still do this in top . While top is running, press '1' on your keyboard, it will then show CPU usage per core. Limit the processes shown by having that specific process run under a specific user account and use Type 'u' to limit to that user You can use: mpstat -P ALL 1 It shows how

how to run each thread on other core?

巧了我就是萌 提交于 2019-12-02 06:54:28
问题 I have a udp server that receive data and computing it. I have two thread for each role. In my cpu is a 8 multi-core and I send data in varius speed. but at maximun I use ony %14 percent of my cpu two core 50%. if I send more data valume my buffer will fulled and don't use more cpu. why each core arise only 50% and not more? I think to divide this two role to multi-core. I want to be sure that each one on other core. how I can Explicitly to choose each thread run on other core? my program

Unable to delete previous doSMP queues

£可爱£侵袭症+ 提交于 2019-12-02 05:57:35
问题 I'm trying to use doSMP, and when I try w <- startWorkers(4) , I get the error 1: In startWorkers(workerCount = 4) : there is an existing doSMP session using doSMP1 (actually doSMP1,...doSMP8). Now, when I try to remove this using rmSessions('doSMP1') I get the error message attempting to delete qnames: doSMP1 unable to delete queues: doSMP1 Any suggestions on how to get this to work. On my 8-core machine, doSNOW stopped working from version 2.11, and I would like to be able to parallel

Using openMP for multicore processing vs multithreading

谁都会走 提交于 2019-12-02 02:35:02
问题 The question may sound basic but, I could not find any concrete answer to this. So now say we have a multicore processor like a corei5 680 (2 physical cores and with HT enabled 4 usable cores to the OS). My question is where does openMP exactly fit in the picture? 1 - When we say multithreading using openMP does it automatically make use of all the available cores (4 virtual cores in this case) and executes the thread depending on the CPU cycles available? 2 - Does openmp give the control on