Created
October 5, 2018 09:49
-
-
Save andersx/44c1515ecd54da258e4440b035cc9d13 to your computer and use it in GitHub Desktop.
example for C-style preprocessor flag for interoperability between ifort and gfortran (note file extension is .F90 and not .f90)
This file contains hidden or 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
| program tester | |
| #if defined _OPENMP | |
| use omp_lib, only: omp_get_wtime | |
| #endif | |
| implicit none | |
| double precision :: t1, t2 | |
| t1 = 0.0d0 | |
| t2 = 0.0d0 | |
| #if defined _OPENMP | |
| t1 = omp_get_wtime() | |
| #endif | |
| call sleep(1) | |
| #if defined _OPENMP | |
| t2 = omp_get_wtime() | |
| #endif | |
| write (*,*) "HEY", t2 - t1 | |
| end program tester |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment