Automate fortran code with multiple input values for 5 variables, compile and run the program one by one from a shell script

Viewed 36

I have a Fortran code with numerous variables. I would like to change 5 of these variables and use a combination of several input values for these variables. Each of these 5 variables have 5 different input values. An example of these values is shown below:

x1 = 1, 3, 5, 7, 9
x2 = 1e5, 2e5, 3e5, 4e5, 5e5
x3 = 25, 27, 29, 35, 37
x4 = 30, 40, 50, 60, 70
x5 = 1e-15, 1.8e-15, 2e-15, 3.7e-15, 4.1e-15

I am wondering how to compile and run the Fortran code separately for each of the combinations from a txt file.

0 Answers
Related