Are there any rule guides on fixed format Fortran such as in .f77, .f, .for files? For example, http://www.physics.nau.edu/~bowman/PHY520/F77tutor/03_basics.html has a few snippets of rules for Fortran 77 such as
Col. 1 : Blank, or a "c" or "*" for comments
Col. 1-5 : Statement label...
I would like to delete all lines starting with the following
- \t (tab)
- \n (newline)
- /
- (single space)
- =
I've tried `sed -n '/^\(\t\|\n\|/\| \|=\)$/d' OUTPUT.txt > test.txt` and combos of that to no avail. What am I doing wrong?
I've always made my own makefiles and it hasn't been an issue because it's usually a small number of subroutines. However, I am working on modernizing and optimizing a Latin Hypercube sampling code in Fortran which has close to 80 functions/subroutines that I am splitting up into different files...
The current compiler options I am using are
icc -c -std=c99 -O3 -opt-streaming-stores auto -qopt-report=3 -opt-multi-version-aggressive -opt-assume-safe-padding -mkl
Do you have any examples of the compiler options you saw increase performance?
Turns out that double versus single precision in this case does not make much of a difference.
Double: Single:
Total run time: 12.210 (s) Total run time: 11.240 (s)
Number of Monte Carlo iterations: 1 Number of Monte Carlo...
Carno,
I've modified it to something along the lines of Ben Alpert's answer here http://stackoverflow.com/questions/459691/best-timing-method-in-c
It now works with both single and double precision.
wle,
Making the modifications you suggested ended up working. Thanks for the help! Now, I'd like to compare the runtimes, but my timing is just printing out zeros for the float case. My timer is
#include <time.h>
#include <sys/time.h>
#include <assert.h>
#include <sys/mman.h>
#include...
wle,
I'm running into an issue that I either missed or is new. Matching sort is crapping out after sorting the second row:
R rank data:
15.0000 3.0000 5.0000 13.0000 14.0000 9.0000 2.0000 8.0000 10.0000 6.0000 1.0000 7.0000 11.0000 12.0000...
Absolutely. This is more of a learning process than anything. Plus, it's fun to see something go 7000x faster than an alternate version!
I have removed the rank_* matrices (thought I needed them when I didn't).
I initially zero out all arrays in the main program (I have found myself bitten in...
Sorry for the late response, I was out of town for the 4th. My intent here is to first compare precision of the answer and second to investigate speed increases due to exactly what you guys are talking about with fitting more data into cache. I don't believe my Monte Carlo loop can be...