Created
April 6, 2019 19:20
-
-
Save bollu/1f619357842aa5b6770c0abf5ddf3c2f to your computer and use it in GitHub Desktop.
find number of lines of code in openacc version versus normal version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
NUM_PRAGMA_LINES=$(grep '!$ACC' -R openacc | wc -l) | |
NUM_FORTRAN_LINES=$(cloc openacc/*.f90 -csv | tail -1 | rev | cut -d',' -f 1 | rev) | |
echo "num pragma lines: " $NUM_PRAGMA_LINES | |
echo "total lines in opanacc: " $NUM_FORTRAN_LINES | |
echo "ratio:" | |
python -c "print(100.0 * float($NUM_PRAGMA_LINES) / $NUM_FORTRAN_LINES)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment