how to run multiple scala programs on multiple cores with sbt?

Viewed 26

I have written a scala program with several input args, and then I use a bash to set up the program with different parameters, such as

sbt "runMain Experiment --profix data --binFile bin/000000.bin --bucketNum 8" &
sbt "runMain Experiment --profix data --binFile bin/000000.bin --bucketNum 16" &
sbt "runMain Experiment --profix data --binFile bin/000000.bin --bucketNum 32" &
sbt "runMain Experiment --profix data --binFile bin/000000.bin --bucketNum 64" &
sbt "runMain Experiment --profix data --binFile bin/000000.bin --bucketNum 128" &

The above five programs start to run. However, I found that they share a single CPU core. The server has 28 CPU cores, so the other 27 core is idle. How can I run multiple scala programs on multiple cores?

As shown in the figure, there are three programs, and each of them uses 1/3 of the CPU enter image description here

0 Answers
Related