icc and openmp

icc and openmp

Hello, I have a problem with using icc on a standard openmp function (omp_get_num_thread()). When I use it in parallel block, I have an error:

$ icc -openmp project.cpp -o project

slae2.cpp(207): error: identifier "omp_get_num_thread" is undefined
ompnumber = omp_get_num_thread();
^

Is this version of openmp don't support this function or it's other problem?

4 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.
Portrait de Vladimir Polin (Intel)

Have you included omp.h to your source file?

--Vladimir

Yes, and other omp functions work's

Portrait de Mike Pearce (Intel)

I believe the call is omp_get_num_threads() - threadS

Or were you actuallythinking of: omp_get_thread_num()?

Connectez-vous pour laisser un commentaire.