Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.
Announcements
The Intel sign-in experience has changed to support enhanced security controls. If you sign in, click here for more information.

MinGW and TBB installation

nath02
Beginner
1,682 Views

Hi everybody !

I really need some help, here's my problem : I have to work on a project in c++ and I have to parallelise it.

I have un computer with 8 CPU's (Windows 7)and I have to work with Eclipse and MinGW.

BUT how can I install TBB with MinGW ? I mean, I read a lot of articles and documentations on Windows installation but, that's usually talking about Visual Studio and I must not use that.

How could I do tobuild TBB? Do you have any solution ? I'm completly lost and quite tired. I have already lost a lot of time on this installation and I'm quite annoyed...

If someone had succeeded in that kind of installation, could you explain to me in details how you did so ?

Really, thanks in advance, I really need your help.

Thanks again.

Here's my compilator configuration :gcc 3.4.5

0 Kudos
59 Replies
Alexey-Kukanov
Employee
317 Views

I just downloaded tbb22_20090809oss_src.tgz from the site, unpacked it (with WinZip), changed to the directory and run the command that Vladimir suggested (with the most recent 20090914 version of mingw32-make). Everything went fine, the binaries got built in a minute.

Try adding --dry-run option to the make command. It should then print every command it would normally execute. Do you get any output from that, or does it still hang?

nath02
Beginner
317 Views

I added what you suggested to me, but it's still the same result : nothing happens.

I'm quite nervous about this situation. I have to send a project before the end on the month and I really need this library. Joys of informatics.

nath02
Beginner
317 Views

So, since it still doesn't work on my 8 cpus computer, I tried to install it on my dualcore computer (Windows XP, mingw32-male 3.81, gcc) and the compilation begins with : mingw32-make compiler=gcc.

Unfortunately, it fails with this error :

C:/Intel/tbb22_20090809oss/build/windows_ia32_gcc_mingw_debug/../../src/tbbmalloc/proxy.cpp:209:reference indefinie vers scalable_msize

collect2: ld returned 1 exit status

mingw32-make[1]: *** [tbbmalloc_proxy_debug.dll] Error 1

mingw32-make[1] : Leaving directory 'C:/Intel/tbb22_20090809oss/builf/windows_ia32_gcc_mingw_debug'

mingw32-make: *** [tbbmalloc] Error 2

Even if it works on this computer (dualcore) I really need to install it on my "big" one.

Thank you again for your help and your advices

Alexey-Kukanov
Employee
317 Views

Judging by the absense of --dry-run output, I would say something is wrong with the make utility, or maybe makefiles are corrupt. Try another GNU make utility, e.g. the one from GNUWin32 project: http://gnuwin32.sourceforge.net/packages/make.htm.

The link error seems suprising. I will re-check; but also I would recommend you to switch to the most recent commercial-aligned package of TBB. These packages arestill open-source, just built from the same sources as commercial releases of TBB. See http://www.threadingbuildingblocks.org/download.php -> Commercial Aligned Release.

nath02
Beginner
317 Views

It still doesn't work, even with the commercial aligned package. It compiles but I have this error:

g++ -c -MMD -O2 -DUSE_WINTHREAD -D__MSVCRT_VERSION__=0x0700 -msse -mthreads -m32 -D__TBB_BUILD=1 -Wall -Wno-uninitialized -Wno-parenthese
s -I../../src -I../../src/rml/include -I../../include ../../src/old/spin_rw_mutex_v2.cpp
cmd /C "g++ -E -x c ../../src/tbb/lin32-tbb-export.def -I../../src -I../../src/rml/include -I../../include -O2 -DUSE_WINTHREAD -D__MSVCRT_V
ERSION__=0x0700 -msse -mthreads -m32 -D__TBB_BUILD=1 -Wall -Wno-uninitialized -Wno-parentheses >tbb.def 2>nul || exit 0"
g++ -o tbb.dll concurrent_hash_map.o concurrent_queue.o concurrent_vector.o dynamic_link.o itt_notify.o cache_aligned_allocator.o pipeline
.o queuing_mutex.o queuing_rw_mutex.o spin_rw_mutex.o spin_mutex.o critical_section.o task.o tbb_misc.o mutex.o recursive_mutex.o tbb_thread
.o itt_notify_proxy.o private_server.o rml_tbb.o concurrent_vector_v2.o concurrent_queue_v2.o spin_rw_mutex_v2.o -lpsapi -shared -m32 -W
l,--version-script,tbb.def
mingw32-make[1]: Leaving directory `C:/Intel/tbb22_013oss/build/windows_ia32_gcc_mingw_release'
mingw32-make -C ".\\build\\windows_ia32_gcc_mingw_debug" -r -f ../../build/Makefile.tbbmalloc cfg=debug malloc tbb_root=../..
mingw32-make[1]: Entering directory `C:/Intel/tbb22_013oss/build/windows_ia32_gcc_mingw_debug'
g++ -c -MMD -g -O0 -DTBB_USE_DEBUG -DUSE_WINTHREAD -D__MSVCRT_VERSION__=0x0700 -msse -mthreads -m32 -Wall -Wno-uninitialized -I../../sr
c -I../../src/rml/include -I../../include -I../../src/tbbmalloc -I../../src/tbbmalloc ../../src/tbbmalloc/proxy.cpp
../../src/tbbmalloc/proxy.cpp:426:1: pasting "msvcr70" and "." does not give a valid preprocessing token
../../src/tbbmalloc/proxy.cpp:426:1: pasting "msvcr70" and "." does not give a valid preprocessing token
../../src/tbbmalloc/proxy.cpp:426:1: pasting "msvcr70" and "." does not give a valid preprocessing token
../../src/tbbmalloc/proxy.cpp:426:1: pasting "msvcr70" and "." does not give a valid preprocessing token
../../src/tbbmalloc/proxy.cpp:426:1: pasting "msvcr70" and "." does not give a valid preprocessing token
../../src/tbbmalloc/proxy.cpp:427:1: pasting "msvcr71" and "." does not give a valid preprocessing token
../../src/tbbmalloc/proxy.cpp:427:1: pasting "msvcr71" and "." does not give a valid preprocessing token
../../src/tbbmalloc/proxy.cpp:427:1: pasting "msvcr71" and "." does not give a valid preprocessing token
../../src/tbbmalloc/proxy.cpp:427:1: pasting "msvcr71" and "." does not give a valid preprocessing token
../../src/tbbmalloc/proxy.cpp:427:1: pasting "msvcr71" and "." does not give a valid preprocessing token
../../src/tbbmalloc/proxy.cpp:428:1: pasting "msvcr80" and "." does not give a valid preprocessing token
../../src/tbbmalloc/proxy.cpp:428:1: pasting "msvcr80" and "." does not give a valid preprocessing token
../../src/tbbmalloc/proxy.cpp:428:1: pasting "msvcr80" and "." does not give a valid preprocessing token
../../src/tbbmalloc/proxy.cpp:428:1: pasting "msvcr80" and "." does not give a valid preprocessing token
../../src/tbbmalloc/proxy.cpp:428:1: pasting "msvcr80" and "." does not give a valid preprocessing token
../../src/tbbmalloc/proxy.cpp:429:1: pasting "msvcr90" and "." does not give a valid preprocessing token
../../src/tbbmalloc/proxy.cpp:429:1: pasting "msvcr90" and "." does not give a valid preprocessing token
../../src/tbbmalloc/proxy.cpp:429:1: pasting "msvcr90" and "." does not give a valid preprocessing token
../../src/tbbmalloc/proxy.cpp:429:1: pasting "msvcr90" and "." does not give a valid preprocessing token
../../src/tbbmalloc/proxy.cpp:429:1: pasting "msvcr90" and "." does not give a valid preprocessing token
../../src/tbbmalloc/proxy.cpp:430:1: pasting "msvcr100" and "." does not give a valid preprocessing token
../../src/tbbmalloc/proxy.cpp:430:1: pasting "msvcr100" and "." does not give a valid preprocessing token
../../src/tbbmalloc/proxy.cpp:430:1: pasting "msvcr100" and "." does not give a valid preprocessing token
../../src/tbbmalloc/proxy.cpp:430:1: pasting "msvcr100" and "." does not give a valid preprocessing token
../../src/tbbmalloc/proxy.cpp:430:1: pasting "msvcr100" and "." does not give a valid preprocessing token
mingw32-make[1]: *** [proxy.o] Error 1
mingw32-make[1]: Leaving directory `C:/Intel/tbb22_013oss/build/windows_ia32_gcc_mingw_debug'
mingw32-make: *** [tbbmalloc] Error 2

Please can you help me again ? I need to install it before 4 days, I'm really disappointed :-(

Is it possible that this problem comes from my compiler ?

Thank you....

[edit] : On my 8 cpus computer it doesn't do anything... Do I have to change some environment variables ?

Alexey-Kukanov
Employee
317 Views

Well, the TBB itself seems to build successfully. What failed is building an additional library that is useful to substitute "standard" memory allocation routines with the call to TBB memory allocator. It does not prevent you from using TBB.

To avoid the compilation problem, specify explicitly that you just want to build TBB, nothing else. For that, add 'tbb" target to the command line:

mingw32-make compiler=gcc arch=ia32 runtime=mingw tbb

It will create tbb.dll in build\windows_ia32_gcc_mingw_release; for debug version (tbb_debug.dll), look into windows_ia32_gcc_mingw_debug.

nath02
Beginner
317 Views

Thank you for your answer, really, thanks a lot.Now I have this :

C:\Intel\tbb22_013oss>mingw32-make compiler=gcc arch=ia32 tbb

cd ".\\build\\windows_ia32_gcc_mingw_release" && cmd /C "..\..\build\generate_tbbvars.bat" windows_ia32_gcc_mingw_release

cd ".\\build\\windows_ia32_gcc_mingw_debug" && cmd /C "..\..\build\generate_tbbvars.bat" windows_ia32_gcc_mingw_debug

mingw32-make -C ".\\build\\windows_ia32_gcc_mingw_debug" -r -f ../../build/Makefile.tbb cfg=debug tbb_root=../..

mingw32-make[1]: Entering directory `C:/Intel/tbb22_013oss/build/windows_ia32_gcc_mingw_debug'

../../build/Makefile.tbb:39: CONFIG: cfg=debug arch=ia32 compiler=gcc os=windows runtime=mingw

mingw32-make[1]: Nothing to be done for `default_tbb'.

mingw32-make[1]: Leaving directory `C:/Intel/tbb22_013oss/build/windows_ia32_gcc_mingw_debug'

mingw32-make -C ".\\build\\windows_ia32_gcc_mingw_release" -r -f ../../build/Makefile.tbb cfg=release tbb_root=../..

mingw32-make[1]: Entering directory `C:/Intel/tbb22_013oss/build/windows_ia32_gcc_mingw_release'

../../build/Makefile.tbb:39: CONFIG: cfg=release arch=ia32 compiler=gcc os=windows runtime=mingw

mingw32-make[1]: Nothing to be done for `default_tbb'.

mingw32-make[1]: Leaving directory `C:/Intel/tbb22_013oss/build/windows_ia32_gcc_mingw_release'

Does it mean that the library is compiled ? Because, when I try to run one of the examples given, I have some errors as :

sub_string_finder.cpp:33:30: error: tbb/parallel_for.h: No such file or directory

Furthermore, I tried to compile with that command ligne on my windows 7 computer and it doesn't work. It's quite unsettling isn't it ?

Alexey-Kukanov
Employee
317 Views

Yes "nothing to be done" means the library is compiled.

Now you havebuilt the library. To compile an example, you need to set up the environment. As far as I know, for MinGW you need to set up CPATH to contain the directory with TBB headers ([your_TBB_dir]/include), LIBRARY_PATH to contain directories with DLLs (the ones I mentioned before, or some others if you copied DLLs to any place). In order to run the example, system loader should also be able to find DLLs so these directories should also be in PATH (or the DLLs should be copied to a directory that is already in PATH).

To quickly see that examples are running, there is a simpler way: run make again, but this time specify examples as the target.

nath02
Beginner
317 Views

Oh thank you ! I have these errors of compilation by now, but I guess it comes from my environment variables. Actually, I have to create these variables :CPATH and LIBRARY_PATH ? Because they don't exist on my system.

Here is a part of my bug :

C:\Intel\tbb22_013oss\examples>mingw32-make

mingw32-make -C concurrent_hash_map/count_strings -f Makefile.windows all CXX="cl /nologo" CXXFLAGS=""

mingw32-make[1]: Entering directory `C:/Intel/tbb22_013oss/examples/concurrent_hash_map/count_strings'

cl /nologo *.cpp /MD /O2 /D NDEBUG /TP /EHsc /W3 /nologo /D _CONSOLE /D _MBCS /D WIN32 /link tbb.lib /INCREMENTAL:NO /NOLOGO /DEBUG /FIXE

D:NO /OUT:Count_Strings.exe

process_begin: CreateProcess(NULL, cl /nologo *.cpp /MD /O2 /D NDEBUG /TP /EHsc /W3 /nologo /D _CONSOLE /D _MBCS /D WIN32 /link tbb.lib /INC

REMENTAL:NO /NOLOGO /DEBUG /FIXED:NO /OUT:Count_Strings.exe, ...) failed.

make (e=2): Le fichier spcifi est introuvable.

mingw32-make[1]: *** [release] Error 2

mingw32-make[1]: Leaving directory `C:/Intel/tbb22_013oss/examples/concurrent_hash_map/count_strings'

mingw32-make: [concurrent_hash_map/count_strings/all] Error 2 (ignored)

mingw32-make -C parallel_do/parallel_preorder -f Makefile.windows all CXX="cl /nologo" CXXFLAGS=""

mingw32-make[1]: Entering directory `C:/Intel/tbb22_013oss/examples/parallel_do/parallel_preorder'

cl /nologo *.cpp /MD /O2 /D NDEBUG /TP /EHsc /W3 /nologo /D _CONSOLE /D _MBCS /D WIN32 /D _CRT_SECURE_NO_DEPRECATE /link tbb.lib /INCREME

NTAL:NO /NOLOGO /DEBUG /FIXED:NO /OUT:Parallel_Preorder.exe

process_begin: CreateProcess(NULL, cl /nologo *.cpp /MD /O2 /D NDEBUG /TP /EHsc /W3 /nologo /D _CONSOLE /D _MBCS /D WIN32 /D _CRT_SECURE_NO_

DEPRECATE /link tbb.lib /INCREMENTAL:NO /NOLOGO /DEBUG /FIXED:NO /OUT:Parallel_Preorder.exe, ...) failed.

make (e=2): Le fichier spcifi est introuvable.

mingw32-make[1]: *** [release] Error 2

mingw32-make[1]: Leaving directory `C:/Intel/tbb22_013oss/examples/parallel_do/parallel_preorder'

mingw32-make: [parallel_do/parallel_preorder/all] Error 2 (ignored)

mingw32-make -C parallel_for/game_of_life.NET -f Makefile.windows all CXX="cl /nologo" CXXFLAGS=""

mingw32-make[1]: Entering directory `C:/Intel/tbb22_013oss/examples/parallel_for/game_of_life.NET'

cl /nologo ./src/Evolution.cpp ./src/Game_of_life.cpp ./src/Update_state.cpp /MD /O2 /D NDEBUG /TP /EHsc /W3 /nologo /D _CONSOLE /D _MBCS /

D WIN32 /D _CRT_SECURE_NO_DEPRECATE /link tbb.lib /INCREMENTAL:NO /NOLOGO /DEBUG /FIXED:NO /OUT:game_of_life.exe

process_begin: CreateProcess(NULL, cl /nologo ./src/Evolution.cpp ./src/Game_of_life.cpp ./src/Update_state.cpp /MD /O2 /D NDEBUG /TP /EHsc

/W3 /nologo /D _CONSOLE /D _MBCS /D WIN32 /D _CRT_SECURE_NO_DEPRECATE /link tbb.lib /INCREMENTAL:NO /NOLOGO /DEBUG /FIXED:NO /OUT:game_of_li

fe.exe, ...) failed.

make (e=2): Le fichier spcifi est introuvable.

mingw32-make[1]: *** [release] Error 2

mingw32-make[1]: Leaving directory `C:/Intel/tbb22_013oss/examples/parallel_for/game_of_life.NET'

mingw32-make: [parallel_for/game_of_life.NET/all] Error 2 (ignored)

mingw32-make -C parallel_for/polygon_overlay -f Makefile.windows all CXX="cl /nologo" CXXFLAGS=""

mingw32-make[1]: Entering directory `C:/Intel/tbb22_013oss/examples/parallel_for/polygon_overlay'

mingw32-make[2]: Entering directory `C:/Intel/tbb22_013oss/examples/parallel_for/polygon_overlay'

Building Pover.exe with UI=gdi XARCH=unknown\unknownx86

rc /r vc7.1/pover

process_begin: CreateProcess(NULL, rc /r vc7.1/pover, ...) failed.

make (e=2): Le fichier spcifi est introuvable.

mingw32-make[2]: *** [vc7.1/pover.res] Error 2

mingw32-make[2]: Leaving directory `C:/Intel/tbb22_013oss/examples/parallel_for/polygon_overlay'

mingw32-make[1]: *** [release] Error 2

mingw32-make[1]: Leaving directory `C:/Intel/tbb22_013oss/examples/parallel_for/polygon_overlay'

mingw32-make: [parallel_for/polygon_overlay/all] Error 2 (ignored)

Thank you, really !

Alexey-Kukanov
Employee
317 Views
These errors are because you did not specify compiler=gcc (and also arch and runtime, if automatic detection fails). You should always specify compiler=gcc when building any part of TBB with MinGW (because by default MSVC is expected on Windows).
nath02
Beginner
317 Views

Oh thank you, it works ! I haven't tried yet on my program but, it should be ok (I hope so !).

Just a last question, why doesn't it work on my windows 7 computer ? I would say that "the configuration" it's the same (I mean, same compiler, MinGW, mingw32-make). As I said in a previous post, when I run the compilation with : mingw32-make compiler=gcc arch=ia64 runtime=mingw it seems to be on "stand-by", nothing happens and I must do a ctrl-C to abort.

Should I install something else, specifically to windows 7 in addition to what I've already installed ?

Thank you

Alexey-Kukanov
Employee
317 Views

Well, I don't know what could be wrong with running mingw32-make on Windows 7. I tried it on my workstation, all went just fine. I don't remember if you tried another make utility - if yes, was it any different?

But anyway you should not be blocked by that, as you don't have to recompile TBB on exactly the same machine where you plan to run your app. Just copy the binaries to that machine, set up the environment properly, and you should be fine.

Vladimir_P_Intel2
317 Views

you can try the following command

mingw32-make -d compiler=gcc arch=ia32 runtime=mingw

to see debug output in the place where script hangs.

BTW, we do not support ia64 platform on windows (I see "arch=ia64" in your message).

--Vladimir.

nath02
Beginner
317 Views

Thank you. Here is the beginning of the execution (lot of text so I won't paste everything) :

C:\Program Files (x86)\Intel\tbb22_013oss>mingw32-make -d compiler=gcc arch=ia32 runtime=mingw

GNU Make 3.81

Copyright (C) 2006 Free Software Foundation, Inc.

This is free software; see the source for copying conditions.

There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A

PARTICULAR PURPOSE.

This program built for i386-pc-mingw32

find_and_set_shell path search set default_shell = C:/msys/1.0/bin/sh.exe

Reading makefiles...

Reading makefile `makefile'...

Reading makefile `build/common.inc' (search path) (no ~ expansion)...

Reading makefile `build/windows.inc' (search path) (no ~ expansion)...

Updating makefiles....

Considering target file `build/windows.inc'.

Looking for an implicit rule for `build/windows.inc'.

Trying pattern rule with stem `windows.inc'.

Trying implicit prerequisite `build/windows.inc.o'.

Trying pattern rule with stem `windows.inc'.

Trying implicit prerequisite `build/windows.inc.c'.

Trying pattern rule with stem `windows.inc'.

Trying implicit prerequisite `build/windows.inc.cc'.

Trying pattern rule with stem `windows.inc'.

Trying implicit prerequisite `build/windows.inc.cpp'.

Trying pattern rule with stem `windows.inc'.

Trying implicit prerequisite `build/windows.inc.p'.

Trying pattern rule with stem `windows.inc'.

Trying implicit prerequisite `build/windows.inc.f'.

Trying pattern rule with stem `windows.inc'.

Trying implicit prerequisite `build/windows.inc.r'.

Trying pattern rule with stem `windows.inc'.

Trying implicit prerequisite `build/windows.inc.s'.

Trying pattern rule with stem `windows.inc'.

Trying implicit prerequisite `build/windows.inc.mod'.

Trying pattern rule with stem `windows.inc'.

Trying implicit prerequisite `build/windows.inc.sh'.

Trying pattern rule with stem `windows.inc'.

Trying implicit prerequisite `build/windows.inc,v'.

...

And the end :

Looking for a rule with intermediate file `makefile.c'.
Avoiding implicit rule recursion.
Avoiding implicit rule recursion.
Trying pattern rule with stem `makefile'.
Trying implicit prerequisite `makefile.y'.
Trying pattern rule with stem `makefile'.
Trying implicit prerequisite `makefile.l'.
Trying pattern rule with stem `makefile'.
Trying implicit prerequisite `makefile.w'.
Trying pattern rule with stem `makefile'.
Trying implicit prerequisite `makefile.w'.
Trying pattern rule with stem `makefile.c'.
Trying implicit prerequisite `makefile.c,v'.
Trying pattern rule with stem `makefile.c'.
Trying implicit prerequisite `RCS/makefile.c,v'.
Trying pattern rule with stem `makefile.c'.
Trying implicit prerequisite `RCS/makefile.c'.
Trying pattern rule with stem `makefile.c'.
Trying implicit prerequisite `s.makefile.c'.
Trying pattern rule with stem `makefile.c'.
Trying implicit prerequisite `SCCS/s.makefile.c'.
Trying pattern rule with stem `makefile'.
Trying implicit prerequisite `makefile.y'.
Looking for a rule with intermediate file `makefile.y'.
Avoiding implicit rule recursion.
Avoiding implicit rule recursion.
Avoiding implicit rule recursion.
Trying pattern rule with stem `makefile.y'.
Trying implicit prerequisite `makefile.y,v'.
Trying pattern rule with stem `makefile.y'.
Trying implicit prerequisite `RCS/makefile.y,v'.
Trying pattern rule with stem `makefile.y'.
Trying implicit prerequisite `RCS/makefile.y'.
Trying pattern rule with stem `makefile.y'.
Trying implicit prerequisite `s.makefile.y'.
Trying pattern rule with stem `makefile.y'.
Trying implicit prerequisite `SCCS/s.makefile.y'.
Trying pattern rule with stem `makefile'.
Trying implicit prerequisite `makefile.l'.
Looking for a rule with intermediate file `makefile.l'.
Avoiding implicit rule recursion.
Avoiding implicit rule recursion.
Avoiding implicit rule recursion.
Trying pattern rule with stem `makefile.l'.
Trying implicit prerequisite `makefile.l,v'.
Trying pattern rule with stem `makefile.l'.
Trying implicit prerequisite `RCS/makefile.l,v'.
Trying pattern rule with stem `makefile.l'.
Trying implicit prerequisite `RCS/makefile.l'.
Trying pattern rule with stem `makefile.l'.
Trying implicit prerequisite `s.makefile.l'.
Trying pattern rule with stem `makefile.l'.
Trying implicit prerequisite `SCCS/s.makefile.l'.
Trying pattern rule with stem `makefile'.
Trying implicit prerequisite `makefile.w'.
Looking for a rule with intermediate file `makefile.w'.
Avoiding implicit rule recursion.
Avoiding implicit rule recursion.
Avoiding implicit rule recursion.
Trying pattern rule with stem `makefile.w'.
Trying implicit prerequisite `makefile.w,v'.
Trying pattern rule with stem `makefile.w'.
Trying implicit prerequisite `RCS/makefile.w,v'.
Trying pattern rule with stem `makefile.w'.
Trying implicit prerequisite `RCS/makefile.w'.
Trying pattern rule with stem `makefile.w'.
Trying implicit prerequisite `s.makefile.w'.
Trying pattern rule with stem `makefile.w'.
Trying implicit prerequisite `SCCS/s.makefile.w'.
Trying pattern rule with stem `makefile'.
Rejecting impossible implicit prerequisite `makefile.w'.
Trying pattern rule with stem `makefile'.
Trying implicit prerequisite `makefile.cc'.
Looking for a rule with intermediate file `makefile.cc'.
Avoiding implicit rule recursion.
Avoiding implicit rule recursion.
Trying pattern rule with stem `makefile.cc'.
Trying implicit prerequisite `makefile.cc,v'.
Trying pattern rule with stem `makefile.cc'.
Trying implicit prerequisite `RCS/makefile.cc,v'.
Trying pattern rule with stem `makefile.cc'.
Trying implicit prerequisite `RCS/makefile.cc'.
Trying pattern rule with stem `makefile.cc'.
Trying implicit prerequisite `s.makefile.cc'.
Trying pattern rule with stem `makefile.cc'.
Trying implicit prerequisite `SCCS/s.makefile.cc'.
Trying pattern rule with stem `makefile'.
Trying implicit prerequisite `makefile.cpp'.
Looking for a rule with intermediate file `makefile.cpp'.
Avoiding implicit rule recursion.
Avoiding implicit rule recursion.
Trying pattern rule with stem `makefile.cpp'.
Trying implicit prerequisite `makefile.cpp,v'.
Trying pattern rule with stem `makefile.cpp'.
Trying implicit prerequisite `RCS/makefile.cpp,v'.
Trying pattern rule with stem `makefile.cpp'.
Trying implicit prerequisite `RCS/makefile.cpp'.
Trying pattern rule with stem `makefile.cpp'.
Trying implicit prerequisite `s.makefile.cpp'.
Trying pattern rule with stem `makefile.cpp'.
Trying implicit prerequisite `SCCS/s.makefile.cpp'.
Trying pattern rule with stem `makefile'.
Trying implicit prerequisite `makefile.p'.
Looking for a rule with intermediate file `makefile.p'.
Avoiding implicit rule recursion.
Avoiding implicit rule recursion.
Trying pattern rule with stem `makefile'.
Trying implicit prerequisite `makefile.web'.
Trying pattern rule with stem `makefile.p'.
Trying implicit prerequisite `makefile.p,v'.
Trying pattern rule with stem `makefile.p'.
Trying implicit prerequisite `RCS/makefile.p,v'.
Trying pattern rule with stem `makefile.p'.
Trying implicit prerequisite `RCS/makefile.p'.
Trying pattern rule with stem `makefile.p'.
Trying implicit prerequisite `s.makefile.p'.
Trying pattern rule with stem `makefile.p'.
Trying implicit prerequisite `SCCS/s.makefile.p'.
Trying pattern rule with stem `makefile'.
Trying implicit prerequisite `makefile.web'.
Looking for a rule with intermediate file `makefile.web'.
Avoiding implicit rule recursion.
Avoiding implicit rule recursion.
Avoiding implicit rule recursion.
Trying pattern rule with stem `makefile.web'.
Trying implicit prerequisite `makefile.web,v'.
Trying pattern rule with stem `makefile.web'.
Trying implicit prerequisite `RCS/makefile.web,v'.
Trying pattern rule with stem `makefile.web'.
Trying implicit prerequisite `RCS/makefile.web'.
Trying pattern rule with stem `makefile.web'.
Trying implicit prerequisite `s.makefile.web'.
Trying pattern rule with stem `makefile.web'.
Trying implicit prerequisite `SCCS/s.makefile.web'.
Trying pattern rule with stem `makefile'.
Trying implicit prerequisite `makefile.f'.
Looking for a rule with intermediate file `makefile.f'.
Avoiding implicit rule recursion.
Avoiding implicit rule recursion.
Trying pattern rule with stem `makefile'.
Trying implicit prerequisite `makefile.r'.
Trying pattern rule with stem `makefile.f'.
Trying implicit prerequisite `makefile.f,v'.
Trying pattern rule with stem `makefile.f'.
Trying implicit prerequisite `RCS/makefile.f,v'.
Trying pattern rule with stem `makefile.f'.
Trying implicit prerequisite `RCS/makefile.f'.
Trying pattern rule with stem `makefile.f'.
Trying implicit prerequisite `s.makefile.f'.
Trying pattern rule with stem `makefile.f'.
Trying implicit prerequisite `SCCS/s.makefile.f'.
Trying pattern rule with stem `makefile'.
Trying implicit prerequisite `makefile.r'.
Looking for a rule with intermediate file `makefile.r'.
Avoiding implicit rule recursion.
Avoiding implicit rule recursion.
Avoiding implicit rule recursion.
Trying pattern rule with stem `makefile'.
Rejecting impossible implicit prerequisite `makefile.l'.
Trying pattern rule with stem `makefile.r'.
Trying implicit prerequisite `makefile.r,v'.
Trying pattern rule with stem `makefile.r'.
Trying implicit prerequisite `RCS/makefile.r,v'.
Trying pattern rule with stem `makefile.r'.
Trying implicit prerequisite `RCS/makefile.r'.
Trying pattern rule with stem `makefile.r'.
Trying implicit prerequisite `s.makefile.r'.
Trying pattern rule with stem `makefile.r'.
Trying implicit prerequisite `SCCS/s.makefile.r'.
Trying pattern rule with stem `makefile'.
Rejecting impossible implicit prerequisite `makefile.r'.
Trying pattern rule with stem `makefile'.
Trying implicit prerequisite `makefile.s'.
Looking for a rule with intermediate file `makefile.s'.
Avoiding implicit rule recursion.
Avoiding implicit rule recursion.
Trying pattern rule with stem `makefile.s'.
Trying implicit prerequisite `makefile.s,v'.
Trying pattern rule with stem `makefile.s'.
Trying implicit prerequisite `RCS/makefile.s,v'.
Trying pattern rule with stem `makefile.s'.
Trying implicit prerequisite `RCS/makefile.s'.
Trying pattern rule with stem `makefile.s'.
Trying implicit prerequisite `s.makefile.s'.
Trying pattern rule with stem `makefile.s'.
Trying implicit prerequisite `SCCS/s.makefile.s'.
Trying pattern rule with stem `makefile'.
Trying implicit prerequisite `makefile.mod'.
Looking for a rule with intermediate file `makefile.mod'.
Avoiding implicit rule recursion.
Avoiding implicit rule recursion.
Trying pattern rule with stem `makefile.mod'.
Trying implicit prerequisite `makefile.mod,v'.
Trying pattern rule with stem `makefile.mod'.
Trying implicit prerequisite `RCS/makefile.mod,v'.
Trying pattern rule with stem `makefile.mod'.
Trying implicit prerequisite `RCS/makefile.mod'.
Trying pattern rule with stem `makefile.mod'.
Trying implicit prerequisite `s.makefile.mod'.
Trying pattern rule with stem `makefile.mod'.
Trying implicit prerequisite `SCCS/s.makefile.mod'.
Trying pattern rule with stem `makefile'.
Rejecting impossible implicit prerequisite `makefile.c'.
Trying pattern rule with stem `makefile'.
Rejecting impossible implicit prerequisite `makefile.cc'.
Trying pattern rule with stem `makefile'.
Rejecting impossible implicit prerequisite `makefile.cpp'.
Trying pattern rule with stem `makefile'.
Rejecting impossible implicit prerequisite `makefile.p'.
Trying pattern rule with stem `makefile'.
Rejecting impossible implicit prerequisite `makefile.f'.
Trying pattern rule with stem `makefile'.
Rejecting impossible implicit prerequisite `makefile.r'.
Trying pattern rule with stem `makefile'.
Rejecting impossible implicit prerequisite `makefile.s'.
Trying pattern rule with stem `makefile'.
Rejecting impossible implicit prerequisite `makefile.mod'.
Trying pattern rule with stem `makefile'.
Trying implicit prerequisite `makefile.sh'.
Looking for a rule with intermediate file `makefile.sh'.
Avoiding implicit rule recursion.
Trying pattern rule with stem `makefile.sh'.
Trying implicit prerequisite `makefile.sh,v'.
Trying pattern rule with stem `makefile.sh'.
Trying implicit prerequisite `RCS/makefile.sh,v'.
Trying pattern rule with stem `makefile.sh'.
Trying implicit prerequisite `RCS/makefile.sh'.
Trying pattern rule with stem `makefile.sh'.
Trying implicit prerequisite `s.makefile.sh'.
Trying pattern rule with stem `makefile.sh'.
Trying implicit prerequisite `SCCS/s.makefile.sh'.
No implicit rule found for `makefile'.
Finished prerequisites of target file `makefile'.
No need to remake target `makefile'.
Updating goal targets....
Considering target file `default'.
File `default' does not exist.
Considering target file `tbb'.
File `tbb' does not exist.
Considering target file `mkdir'.
File `mkdir' does not exist.
Finished prerequisites of target file `mkdir'.
Must remake target `mkdir'.
CreateProcess(C:\msys\1.0\bin\sh.exe,C:/msys/1.0/bin/sh.exe -c "cmd /c mkdir ".\\build\\windows_ia32_gcc_mingw_release" >nul 2>nul",...)

Thank you again for your help.

Vladimir_P_Intel2
317 Views

Hi,

it looks something is wrong with msys environment on the machine you can try to run following command to check

C:/msys/1.0/bin/sh.exe -c "cmd /c mkdir "windows_ia32_gcc_mingw_release""

and see the output. I think the shell wants to ask you about something but since output is redirected to null device you can't see the question.

Or rename sh.exe for the check -then make should pick up the cmd.exe shell as default.

--Vladimir

nath02
Beginner
317 Views

Hello !

I did what you said : C:/msys/1.0/bin/sh.exe -c "cmd /c mkdir "windows_ia32_gcc_mingw_release"" and I wanted to give you what was said but, my computer felt down... I'm not very lucky with the computers, I think they don't like me (lol).

I'll ckeck this out, and I'll tell you.

I'd have another question anyway, about the code itself. Here's my loop for, which must be parallelised :

ClassFunct::ClassFunct() {

readFile();

// fill the matrix

int int_amount = int_vect.size();

for (int i=0; i

for (int j=i+1; j

//my code

}

}

}

I have to say that, when I read the examples about the transformation of a simple loop for into a parallel_for, I don't clearly understand what you do exactly. I would like to do it with this code but, as I said I don't understand what I do.

Can you explain to me in few words ?

Thank you again

[EDIT] : When I do C:/msys/1.0/bin/sh.exe -c "cmd /c mkdir "windows_ia32_gcc_mingw_release"" I just have :

Microsoft Windows [version 6.1.7600]

Copyright (c) 2009 Microsoft Corporation. Tous droits rservs.

RafSchietekat
Black Belt
317 Views
"Can you explain to me in few words ?"
Probably not in a few words, because your iterations are not independent. At best, they access every pair of elements, at worst they also change the elements. Which is it, and how big is the vector?
nath02
Beginner
317 Views

It's a matrix 1000x1000. It's true, loops are not independant. It might cause some errors in the results I guess.

Anyway, I can't find the problem on my Win 7 computer and I'm not sure about the implementation of the parallel_for. I don't have time anymore, I shoudfind another solution I think.

RafSchietekat
Black Belt
317 Views
If this is also a gaussian elimination or something like it, a parallel loop inside a serial loop should already get you somewhere.
nath02
Beginner
321 Views

Actually, yes the executions inside my loops are independant, completly. So, I can use the parallel_for, no ?

Nevermind, I don't really understand how to do even if I read the examples, and the doc about that.

Alexey-Kukanov
Employee
321 Views

This is not that hard actually. Consider you have a loop:

int A;
for(int i=0; i do something with A;
}

Then you write a class to use with TBB:

struct MyLoopBody {
int*my_A;

MyLoopBody( int*A ){
my_A = A;
} // body constructor

operator() ( int i ) {
do the samewith my_A as in serial loop;
} // loop iteration
};

and then in the place where you serial loop was, you write

int A;
tbb::parallel_for( 0, N, MyLoopBody( A ) );

Of course in practice it could be more complex than that, but you get the idea. Feel free to ask more specific questions.

Reply