Maximizing Efficiency: Running MATLAB/Fortran Simulations on a Linux Cluster

  • Context: MATLAB 
  • Thread starter Thread starter FrogPad
  • Start date Start date
Click For Summary
SUMMARY

The discussion centers on optimizing numerical simulations using MATLAB and Fortran on a Linux cluster. The original poster faced lengthy simulation times on a personal laptop and considered using a Linux cluster with Fortran and MPI. However, due to a lack of experience with Fortran and the MATLAB distributed toolbox, they opted to run the simulation on multiple Windows computers by exporting the algorithm as an executable file. This approach, while less efficient than using a cluster, significantly reduced the overall runtime.

PREREQUISITES
  • F77 programming language knowledge
  • Understanding of MPI (Message Passing Interface)
  • Familiarity with MATLAB and its multiprocessor toolbox
  • Basic Linux command line skills
NEXT STEPS
  • Research "Fortran programming basics" to gain foundational knowledge
  • Explore "MPI for parallel processing" to understand distributed computing
  • Investigate "MATLAB distributed computing toolbox" for efficient simulation management
  • Learn about "Linux cluster setup and management" for future projects
USEFUL FOR

Students, researchers, and developers involved in numerical simulations, particularly those transitioning from single-threaded to parallel processing environments.

FrogPad
Messages
801
Reaction score
0
So for our senior design project we have some numerical simulation that takes awhile to run. It takes about 1.5(min) to crunch through each pass of an algorithm on my 4GB, 2x@GHz processor. We need to run through about 1000 - 2000 iterations.

So on my laptop, this is about 1-2 days. There is no way I'm going to let my laptop run for this long.

Our senior design mentor said we can use his Linux cluster to run the simulation, but he only has C and Fortran setup on it.

Instead of going through anymore details on here and possibly not getting a reply, I'm just going to ask if anyone has experience using a Linux cluster?

Thanks
 
Physics news on Phys.org
FrogPad said:
Instead of going through anymore details on here and possibly not getting a reply, I'm just going to ask if anyone has experience using a Linux cluster?

Thanks

Yes, a couple of years ago I used a Linux cluster (as far as I remember we used 5x4 CPUs, i.e 5 computers with 4 CPUs each) to do some Monte Carlo simulations. The program was written in F77 (not my choice...) and an implementation of MPI.
It worked very well.

However, if you are new to parallell processing and MPI it will probably take you a few days to get started. There is multiprocessor toolbox for Matlab which might be easier to use than fortram/MPI, but I have never used it.
 
f95toli said:
Yes, a couple of years ago I used a Linux cluster (as far as I remember we used 5x4 CPUs, i.e 5 computers with 4 CPUs each) to do some Monte Carlo simulations. The program was written in F77 (not my choice...) and an implementation of MPI.
It worked very well.

However, if you are new to parallell processing and MPI it will probably take you a few days to get started. There is multiprocessor toolbox for Matlab which might be easier to use than fortram/MPI, but I have never used it.

Thanks for the reply. After looking into the problem, we have decided to stay away from the cluster.

Neither the professor, myself, or my senior design partner has used the MATLAB distributed toolbox before, so it would take a great deal of time to setup.

Also, my partner and I have unfortunately never used Fortran, so learning Fortran and rewriting our code would also take some time to do.

We have just decided to export the algorithm to a executable file, and run it on multiple Window's computers. It is kind of a hack way of doing it, since we basically have to copy the executable manually over to each machine and run it by hand, but it will be a lot faster than getting up and running with the other two ways.

Damn... I wish we would have just started with Fortran in the first place. That would have been a great learning experience to pick up Fortran, and then get experience using a Linux cluster.

Again, thanks for the reply!
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 16 ·
Replies
16
Views
92K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K