Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
6709 Discussions

OpenMP not used in Microsoft Compiler build of Unified Image Codec sample

haerle
Beginner
354 Views
Hello,

I want to use multiple threads for the Jpeg2000 compression with the JP2Encoder class of the Unified Image Codec sample. This does not work as _OPENMP is not defined in my build.

Details: The JP2Encoder::SetNOfThreads(...) method calls a set_num_threads(...) function in ompthreads.h. In my build call to omp_set_num_threads(...) is skipped as _OPENMP is not defined.

I built the Unified Image Codec sample dlls within the System Definition Model Command Prompt of Visual Studio 2008. The makefile for the jpeg2000 codec says:

!IF "$(COMP)" == "cl8" || "$(COMP)" == "cl9"
/openmp
!ENDIF

So I guess that OpenMP should be enabled.

Can I somehow change this? Do I have to modify the makefile?

Thx in advance for your help,

Fabian
0 Kudos
3 Replies
Cen_Rao
Beginner
354 Views
I believe MS visual studio standard and express editions do not support openMP.


Quoting - haerle
Hello,

I want to use multiple threads for the Jpeg2000 compression with the JP2Encoder class of the Unified Image Codec sample. This does not work as _OPENMP is not defined in my build.

Details: The JP2Encoder::SetNOfThreads(...) method calls a set_num_threads(...) function in ompthreads.h. In my build call to omp_set_num_threads(...) is skipped as _OPENMP is not defined.

I built the Unified Image Codec sample dlls within the System Definition Model Command Prompt of Visual Studio 2008. The makefile for the jpeg2000 codec says:

!IF "$(COMP)" == "cl8" || "$(COMP)" == "cl9"
/openmp
!ENDIF

So I guess that OpenMP should be enabled.

Can I somehow change this? Do I have to modify the makefile?

Thx in advance for your help,

Fabian

0 Kudos
haerle
Beginner
354 Views
Quoting - Cen Rao
I believe MS visual studio standard and express editions do not support openMP.


Quoting - haerle
Hello,

I want to use multiple threads for the Jpeg2000 compression with the JP2Encoder class of the Unified Image Codec sample. This does not work as _OPENMP is not defined in my build.

Details: The JP2Encoder::SetNOfThreads(...) method calls a set_num_threads(...) function in ompthreads.h. In my build call to omp_set_num_threads(...) is skipped as _OPENMP is not defined.

I built the Unified Image Codec sample dlls within the System Definition Model Command Prompt of Visual Studio 2008. The makefile for the jpeg2000 codec says:

!IF "$(COMP)" == "cl8" || "$(COMP)" == "cl9"
/openmp
!ENDIF

So I guess that OpenMP should be enabled.

Can I somehow change this? Do I have to modify the makefile?

Thx in advance for your help,

Fabian


I am actually using Visual Studio 2008 Professional. And I have found out something strange. When I run the uic transcoder sample the "number of threads" parameters makes a difference.
0 Kudos
Ying_H_Intel
Employee
354 Views
Quoting - haerle

I am actually using Visual Studio 2008 Professional. And I have found out something strange. When I run the uic transcoder sample the "number of threads" parameters makes a difference.

Hi Haerle,

OpenMP should be enabled in Micorsoft Compiler build. Microsoft support OpenMP in MSVC 2005 (cl8) and MSVC2008(Cl9). So UIC add the support in latestrelease.

For your single build, you canmodify makefile, for example,define _OpenMPand make sureyour command like is

>cl.exe /c /O2 /MD /openmp /D MULTITHREADING_OMP /D UIC_DLL_EXPORTS /D UIC_W32DLL /D WIN32 /D _WIN32 /I ...
In jpeg2000 build log file: uic_jpeg2000.

Regards,
Ying
0 Kudos
Reply