Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29285 Discussions

using OpenMP with Visual Fortran Compiler

maria
Beginner
708 Views
Hi there,

I havebeen using Intel Visual Fortran Compiler 10.1 Professional Edition for Windows. The operation system is Windows XP.Recently, I started learning OpenMP. When I compile a simple program, I went to project properties andselected 'generate parallel code (/Qopenmp)' from 'process OpenMP directives' in Project/Properties/Fortran/Language.

I got error message 'unresolved external symbol _OMP_GET_NUM_THREADS referenced in function _MAIN' and 'unresolved external symbol _OMP_GET_THREADS_NUM referenced in function _MAIN'. What went wrong?

What is the correct procedure to compile the program with OpenMP. I have very limited experiences in programming. Detailed instruction is greatly appreciated.Attached is the simple example I used.

Thank you very much, maria
0 Kudos
3 Replies
jimdempseyatthecove
Honored Contributor III
708 Views

Check Link properties, General section, enable Link Library Dependencies

Jim
0 Kudos
Steven_L_Intel1
Employee
708 Views
Your program builds fine for me when /Qopenmp is enabled - no other settings are necessary.

Please attach the buildlog.htm from the Debug or Release folder, after doing a Rebuild of the solution, so we can see what is being used.
0 Kudos
maria
Beginner
708 Views
Your program builds fine for me when /Qopenmp is enabled - no other settings are necessary.

Please attach the buildlog.htm from the Debug or Release folder, after doing a Rebuild of the solution, so we can see what is being used.

Steve, the problem is solved. After several tries, I found that /Qopenmp is enabled in Active(debug) Configuration but not in Debug and Release Configuration. When I reset /Qopenmp for Debug and Release configuration, the program builds fine now.

Thanks a lot.
0 Kudos
Reply