Script started on Fri 20 Nov 2015 10:46:29 PM GMT ]2;dc-roso1@cosmos:~/test_cpp]1;cosmos[?1034hdc-roso1@cosmos:~/test_cpp> icpc -V Intel(R) C++ Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 15.0.5.223 Build 20150805 Copyright (C) 1985-2015 Intel Corporation. All rights reserved. ]2;dc-roso1@cosmos:~/test_cpp]1;cosmosdc-roso1@cosmos:~/test_cpp> cat test.cpp #include using std::cout; struct Test { int a[3]; }; void function (Test b) { #pragma omp parallel for default(none) shared(cout,b) for (int i=0; i<19; i++) { #pragma omp critical { cout << b.a[0] << " " << b.a[1] << " " << b.a[2] < icpc -openmp -o test test.cpp ]2;dc-roso1@cosmos:~/test_cpp]1;cosmosdc-roso1@cosmos:~/test_cpp> ./test 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 ]2;dc-roso1@cosmos:~/test_cpp]1;cosmosdc-roso1@cosmos:~/test_cpp> exit exit Script done on Fri 20 Nov 2015 10:46:50 PM GMT