File tree Expand file tree Collapse file tree 3 files changed +20
-2
lines changed
examples/scalar_law/PROGRAM1/fortran Expand file tree Collapse file tree 3 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -124,3 +124,13 @@ Only the 2nd timing after warming up is given.
124
124
7.177485 seconds (18 allocations: 3.053 MB)
125
125
7.248687 seconds (18 allocations: 3.053 MB)
126
126
```
127
+
128
+ Fortran timing for `100000` number of cells
129
+ ``` sh
130
+ real 0m4.781s
131
+ user 0m4.760s
132
+ sys 0m0.000s
133
+
134
+ ```
135
+
136
+ That is 7.2s for Julia script vs. 4.8s for Fortran.
Original file line number Diff line number Diff line change 3
3
# to see the results after running, type
4
4
# xmgrace output
5
5
FC =gfortran
6
+ FCFLAGS =-O4
7
+ FLFLAGS =-O4
8
+
9
+ % .o : % .f
10
+ $(FC ) $(FCFLAGS ) -c -o $@ $<
11
+
6
12
flinearad : linaddmain.o consdiff.o linearad.o riemprob.o upwind.o
7
- $(FC ) -o $@ linaddmain.o consdiff.o linearad.o riemprob.o \
13
+ $(FC ) $( FLFLAGS ) -o $@ linaddmain.o consdiff.o linearad.o riemprob.o \
8
14
upwind.o
15
+
9
16
clean :
10
17
rm -f * .o flinearad
Original file line number Diff line number Diff line change @@ -24,7 +24,8 @@ program linaddmain
24
24
c +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
25
25
integer ncells
26
26
! parameter (ncells= 100 )
27
- parameter (ncells= 10000 )
27
+ ! parameter (ncells= 10000 )
28
+ parameter (ncells= 100000 )
28
29
c +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
29
30
include " linearad.i"
30
31
include " const.i"
You can’t perform that action at this time.
0 commit comments