2

I would like to run parallel multiple run ncverilog.

Normally, we use ncverilog run script like this.

Run.scr-
ncveriog blar~blar~

But this is run at once. It means that if I want to run 100 scripts , I have to run new after previous script end. But I want to run at simultant 100 script.

How do I run the scripts at simultant?

bural
  • 45
  • 1
  • 7

1 Answers1

2

Use GNU Parallel

parallel ncverilog bla bla

Normally, that will run as many ncverilogs in parallel as you have CPU cores, but you can add -j 25, for example, if you specifically want 25 to run in parallel.

If you need to supply lots of different parameters, just make a loop or script that generates the parameters and feeds a list of jobs into GNU Parallel like this:

for i in {0..99}; do
   echo ncverilog $i <and some other parameters>
done | parallel -j 25

Example

Example

Documentation

Mark Setchell
  • 191,897
  • 31
  • 273
  • 432
  • Is this woking just one cpu computer? or should I need like special i7 cpu which supported hyperthreading? My computer system has pentium 2 dual core cpu very old. So far I use old. – bural Aug 20 '15 at 02:37
  • The first thing to do is check how many cores `GNU Parallel` thinks your computer has, so run this... `parallel --number-of-cores` – Mark Setchell Aug 20 '15 at 06:04
  • The second thing to do is check how much memory you have and how much memory your `ncverilog` program needs, so run these two... `awk '/MemTotal/ {print $2}' /proc/meminfo` and then run `/usr/bin/time -l ncverilog ` – Mark Setchell Aug 20 '15 at 06:08