icc vs g++

General OpenMP discussion

icc vs g++

Postby daviddoria » Mon Aug 25, 2008 7:24 am

I made a little simple test program:

Code: Select all
#include <omp.h>
#include <iostream>

using namespace std;

void Parallel();

int main (int argc, char *argv[])
   return 0;
void Parallel()
  cout << "Parallel: " << endl;
   #pragma omp parallel for
   for (int i=0; i < 10; i++)
      cout << i << endl;
   cout << endl;


when I compile it on a machine with icc, i get this
Code: Select all
[doriad@sgi6110 OpenMP]$ icc test.cpp -o test -openmp
test.cpp(8) : (col. 1) remark: OpenMP DEFINED LOOP WAS PARALLELIZED.

which means all is well. However, on a machine with g++, I do
Code: Select all
g++ openmp.cpp -o test -fopenmp

*note i changed from -openmp to -fopenmp

and I get no output. Is g++ also supposed to output " loop was parallelized"? Or is there some way to turn that output on so I know it worked?


Posts: 21
Joined: Fri May 23, 2008 11:03 am

Re: icc vs g++

Postby mwolfe » Mon Aug 25, 2008 3:23 pm

I don't see any gcc options to produce parallelization messages.
Posts: 54
Joined: Mon Aug 25, 2008 3:19 pm

Return to Using OpenMP

Who is online

Users browsing this forum: No registered users and 7 guests