- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Does Intel Fortran student version has OpenMP and MPI?
I am new to parallel programming. I got this error when I run the following code.
------------------------------------------------------------------------------------------------------------------
1>Console1.obj : error LNK2019: unresolved external symbol _OMP_GET_THREAD_NUM referenced in function _MAIN__
1>Console1.obj : error LNK2019: unresolved external symbol _OMP_GET_NUM_THREADS referenced in function _MAIN__
1>Debug\Console1.exe : fatal error LNK1120: 2 unresolved externals
-----------------------------------------------------------------------------------------------------------------
PROGRAM HELLO
INTEGER NTHREADS, TID, OMP_GET_NUM_THREADS, OMP_GET_THREAD_NUM
! FORKA TEAM OF THREADS WITH EACH THREAD HAVING A PRIVATE TID VARIABLE
!$OMP PARALLEL PRIVATE(TID)
! OBTAIN AND PRINT THREAD ID
TID = OMP_GET_THREAD_NUM()
PRINT*, 'HELLO TO WORLD FROM THREAD = ', TID
! ONLY MASTER THREAD DOES THIS
IF(TID .EQ. 0) THEN
NTHREADS = OMP_GET_NUM_THREADS()
PRINT*, 'NUMBER OF THREADS = ', NTHREADS
END IF
! ALL THREADS JOIN MASTER THREAD AND DISBAND
!$OMP END PARALLEL
END PROGRAM HELLO
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you wish the option to make a non openmp build by omitting -Qopenmp, the standard method involves -fpp with #if _OPENMP conditional compilation.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page