Java – large network iteration – parallelism?
I am writing an algorithm to measure the robustness of large networks under independent attacks The network has about 2000 nodes and faces 10 ^ 8 attacks At first, I implemented my function in MATLAB, but too many iterations (10 ^ 8) did not succeed Each iteration attempts to reconnect the network by improving robustness
The problem with simple parallelism is that each time the network reconnects, the new iteration runs on the reconnected network
I don't know how to achieve a high degree of parallelism here in order to run my algorithm effectively There is no parallelism at present, and I believe it will take about 1477 days
Solution
Each iteration takes about 1.25 seconds (about 4 billion clock cycles) sounds like a long time. There must be some opportunities to optimize what you are doing and reduce it to milliseconds Optimizing code usually improves performance, not parallelization (because parallel code is limited by the number of free hardware you have and the overhead of coordinating multiple CPUs / systems)
How much hardware do you have? If your process is limited by CPU, if you have n CPUs, you can make the application up to N times faster
Suppose you have enough hardware. For example, you can use 2048 CPUs that can play for one day You can start the network with different random / possible configurations instead of assuming that you need completely faithful end-to-end testing Run 10 ^ 5 attacks on each network independently and check whether your end state matches the start state of another run That is, you can theoretically add these results together end - to - end
Depending on how much memory you need, you may find that tower servers are the most cost - effective
You can buy servers with Xeon Quad 2.5 GHz and 4 GB of memory for £ 354 The money is a lot of money
However, if you have access to existing resources, you may feel better For example, do you work for a company with 1000 desktops that cannot be used overnight
The above is the Java - large network iteration - parallelism collected by programming house for you? I hope this article can help you solve Java - large network iteration - parallelism? Program development problems encountered.
If you think the content of the programming home website is good, you are welcome to recommend the programming home website to programmers and friends.