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

  • MATLAB
  • Thread starter FrogPad
  • Start date
In summary, using a Linux cluster would have been a great option, but we have decided to go with a different approach.
  • #1
FrogPad
810
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
  • #2
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.
 
  • #3
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!
 

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

1. What is MATLAB/fortran?

MATLAB/fortran is a combination of two programming languages, MATLAB and Fortran, that allows for efficient and powerful numerical computation. MATLAB is a high-level language commonly used for data analysis and visualization, while Fortran is a low-level language that is primarily used for scientific and engineering calculations.

2. What is a cluster?

A cluster is a group of computers that are connected and work together to perform a computational task. In the context of MATLAB/fortran, a cluster is used to distribute and parallelize the calculations, allowing for faster and more efficient processing of large datasets.

3. How does MATLAB/fortran work on a cluster?

MATLAB/fortran on a cluster works by dividing the computational task into smaller parts, which are then distributed among the different nodes (i.e. computers) in the cluster. Each node then performs its part of the calculation and sends the results back to the main node for final processing and analysis.

4. What are the benefits of using MATLAB/fortran on a cluster?

Using MATLAB/fortran on a cluster allows for faster and more efficient processing of large datasets, as the workload is distributed among multiple nodes. This also allows for parallel processing, meaning that multiple calculations can be done simultaneously, further increasing the speed and efficiency of the computation. Additionally, using a cluster can also handle larger datasets that may not be possible to process on a single computer.

5. How do I set up and use MATLAB/fortran on a cluster?

Setting up and using MATLAB/fortran on a cluster may vary depending on the specific cluster and system you are using. However, in most cases, you will need to have MATLAB and Fortran installed on each node of the cluster, and then use a parallel computing toolbox or library to distribute the calculations. It is recommended to consult the documentation or reach out to the cluster administrators for specific instructions on setting up and using MATLAB/fortran on a cluster.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • Programming and Computer Science
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • Computing and Technology
Replies
2
Views
2K
  • Computing and Technology
Replies
16
Views
85K
  • Programming and Computer Science
Replies
14
Views
3K
  • STEM Academic Advising
Replies
2
Views
2K
Back
Top