MinGW and TBB installation

MinGW and TBB installation

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

60 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.

hello, you can build tbb from sources using below command and you'll get binaries compatible with mingw

gmake compiler=gcc

--Vladimir

Thank you.

Can I build all your TBB versions ? Even the newest ones ? Do I need a specific file ?

Actually, I downloaded theses files :

- tbb22_20090809oss_src.tgz (and then depacked)
- tbb22_20090809oss_win.zip

Do I need something else ? I have to say that I'm a real beginner in this domain, so excuse me to ask you this kind of questions...

And, I don't have the gmake command (yet I have installed minGW). When I use something like "mingw32-make" in the directory of these files I have the message "No targets specified and no makefile found".

What's my error ?

Thank you very much for your help, really.

tbb22_20090809oss_src.tgz is good package to use. you need to change dir to the unpacked archive. there you should see Makefile, COPYING and other files and folders. there you need to invoke mingw32-make. and make sure that mingw32-make has version 3.81 by launching 'mingw32-make -v' command.

--Vladimir

All right, I put the unpacked _src in the unpacked tbb22_20090809oss and then, I foundaMakefile.win in the dir "examples\common\gui".

So, Iput it in the root dir, and then did mingw32-make. But I have the answer : mingw32-make : Nothing to bedone for 'default'.

Did I do something wrong?

Thank you

hi nath02,

I think you need to keep things simple. you need to unpack sources, change dir to tbb22_20090809oss folder. The folder content should be following:

build
doc
examples
include
src
changes
copying
index.html
Makefile
readme

then in this directory you need to execute
mingw32-make.exe compiler=gcc

and compilation should be started then.

cheers,
--Vladimir

So, I did what you said. But it's weird :

In myfolder tbb22_20090809oss I have, once unpacked :

  • doc
  • examples
  • ia32
  • include
  • intel64
  • CHANGES
  • COPYING
  • README

and tbb22_20090809oss_src (when I unpacked the archive .tgz I had only this file). I don't have the files that you described in your previous post, as you can see (as Makefile, build, etc.).

I'm really sorry, and very confused, I should understand faster...

But thank you again for your help and your patience...

tbb22_20090809oss_src.tgz unpacks to a directory tbb22_20090809oss; you don't need tbb22_20090809oss_win.zip at all. Reread #5 with that in mind.

Ok.... But in this case I only have one file (sources) ... No Makefile, no "build" directory, etc.

Vladimir,

I'm really sorry but when I unpacked tbb22_20090809oss_src.tgz I don't see any files. Just, tbb22_20090809oss_src of course. (no build, no Makefile, nothing).

I really don't understand.

I was assuming no errors in the packaging, I'll have a look...

(Added) Works for me on Linux (prompt changed to protect the innocent):

% openssl md5 tbb22_20090809oss_src.tgz

MD5(tbb22_20090809oss_src.tgz)= c621053887c7ee86932da43e2deb3bff

% cat tbb22_20090809oss_src.tgz | gunzip | gtar xf -

% ls tbb22_20090809oss

CHANGES COPYING Makefile README build doc examples include index.html src

%

Oh, okay I see what you did.

I unpack tbb22_20090809oss_src.tgz with the soft IZArc (because it's able to unpack .tgz), maybe the problem comes from that ?

What can I use ?

.tgz is the same as .tar.gz, and maybe IZArc behaves differently if you rename the package, e.g., giving the expanded file a .tar extension and then knowing what to do with it next. Otherwise http://www.mingw.org/wiki/Getting_Started should get you started (didn't you already do this to install MinGW in the first place?).

Hi nath02,

if you see tbb22_20090809oss_src or tbb22_20090809oss_src.tar it looks you just unzipped the archive without untarring it.

to get sources you can use following command or its MinGW equivalent

tar -xzf ./tbb22_20090809oss_src.tgz

after all you should see tbb22_20090809oss folder (without _src suffix) and the files inside it.

--Vladimir

Thank you very much, I understood.

It's ok now, I have all the files. But, (I hope a last question), I ran the command "mingw32-make", and, how can I say that, it seems to be running for 30min now, and nothing appears on my DOS console. Is it normal that it takes so much time ?

(edit) Furthermore, when I look at the tasks manager of windows I see "mingw32-make.exe*32" Memory : 1.616K.

But nothing happens in my DOS console, nothing.I'm waiting since 3 hours and I don't even have an error message.

I have to add that I just tested mingw32-make with a simple program and its Makefile, and everything was all right. So it doesn't come from mingw32-make.exe actually.

Do you have an idea ? (Maybe, I have to change something in the Makefile to set it to my computer ?)

you can try the command

mingw32-make compiler=gcc arch=ia32

it should start inalmost the same time as simple example. No changes to makefiles are needed.

--Vladimir

When I do that, I have this error message :

'untime' is unknown as an internal or externalcommand, a executable program or a command file.

build/common.inc:57: *** Runtime version not detected. Stop.

it is much better. it does not hang at least:)

what gmake version installed on your machine ("mingw32-make.exe -v")? it should be 3.81

can you also try the following command

mingw32-make.exe compiler=gcc arch=ia32 runtime=mingw

it disables autodetection.

--Vladimir

So, yes, as you said in a first post, I changed the make version, so now I jave this one :

GNU Make 3.81, so I think it's good.

But now, when I add to the command line 'runtime=mingw' nothing happens at all. It seems to be on stand by, as described before... Maybe does it come from a environment variable or something like this ?

So, I don't understand what's happening. I did again all you said to me on your previous posts and I still have the same errors...

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?

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.

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

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.

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 ?

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.

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 ?

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.

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 !

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).

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

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.

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.

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.

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

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.

"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?

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.

If this is also a gaussian elimination or something like it, a parallel loop inside a serial loop should already get you somewhere.

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.

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

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

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[i] as in serial loop;
} // loop iteration
};

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

int A[N];
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.

would the command
cmd /c"cmd /c mkdir "windows_ia32_gcc_mingw_release""
work on your machine and create the folder?

--Vladimir

Thank you !

@Vladimir : I can't answer you now; actually, my motherboard is down, so I have to wait until tomorrow to get my computer back. I thought to install Win XP 64bits in place of Windows 7, maybe I'll have so many problems... Otherwise, I'll try your suggestion, and I'll tell you the result !

@Alexey Thank you! I'm looking forward to try it. I don't have the time at the moment to study it (I'm at school), but of course, I'll ask if I don't understand something.

Thank you, both of you !

Actually, here is the structure of my loops :

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

}

}

}

And, I'm quite embarassed by the initialisation of second index : j : i+1

Does it create a dependence between the two loops ?

It is appropriated to use a parallel_for on the first loop ? Won't my data be corrupted ?

What do you think ?

Thanks !

Actually, I don't see what's the my_A variable ? What's its value ?

my_A is the pointer on int.
It's a class member.

#include  //has declaration of task_scheduler_init
#include         //has declaration of parallel_for and blocked_range

class Functor
{
public:
    Functor(int** matrix, size_t amount) : m_matrix(matrix), m_amount(amount){}
    void operator()(const tbb::blocked_range& range) const
    {
        for (size_t i = range.begin(), end = range.end(); i != end; ++i)
        {
            for (size_t j = i + 1; j < m_amount; ++j)
            {
                int& elementFromMatrix = matrix[i][j];
                //please locate your code here
            }
        }
    }
private:
    int** m_matrix;
    size_t m_amount;
}

void doMyTaskParallel()
{
    size_t amount = //please init here
    int** matrix = //please init here
    tbb::parallel_for(tbb::blocked_range(0, amount), Functor(matrix, amount), tbb::auto_partitioner());
}

int main()
{
    tbb::task_scheduler_init init;
    doMyTaskParallel();
    return 0;
}

To follow up on this and perhaps provide a solution, as I'm attempting the same thing:

OS: Windows 7 x64
MinGW just installed, from MinGW-5.1.6.exe and MSYS-1.0.11.exe

I have upgraded the compiler:
C:\Users\wgriffin\Active\tbb>gcc -v
Using built-in specs.
Target: mingw32
Configured with: ../gcc-4.4.0/configure --enable-languages=c,ada,c++,fortran,java,objc,obj-c++ --disable-sjlj-exceptions --enable-shared --enable-libgcj --enable-libgomp --with-dwarf2 --disable-win32-registry --enable-libstdcxx-debug --enable-version-specific-runtime-libs --prefix=/mingw --with-gmp=/mingw/src/gmp/root--with-mpfr=/mingw/src/mpfr/root --build=mingw32
Thread model: win32
gcc version 4.4.0 (GCC)

I've tried both mingw32-make (which -v reports as GNU Make 3.81) and the gnuwin32 make fromhttp://gnuwin32.sourceforge.net/packages/make.htm (also GNU Make 3.81) with identical results.

When I run:

C:\Users\wgriffin\Active\tbb>C:/msys/1.0/bin/sh.exe -c "cmd /c mkdir "windows_ia32_gcc_mingw_release""

I get a brand new command shell:

Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\wgriffin\Active\tbb>exit
C:\Users\wgriffin\Active\tbb>

When I run:

C:\Users\wgriffin\Active\tbb>cmd /c "cmd /c mkdir"windows_ia32_gcc_mingw_release""

It creates the directory as C:\windows_ia32_gcc_mingw_release

If I rename C:\MSYS\1.0\bin\sh.exe, then tbb builds fine (note I didn't try any of the other targets).

C:\Users\wgriffin\Active\tbb>mingw32-make compiler=gcc arch=ia32 runtime=mingw tbb

but without specifying the arch/runtime:

C:\Users\wgriffin\Active\tbb>mingw32-make tbb
cd ".\\build\\windows_unknown_cl_unknown_release" && cmd /C "..\..\build\generate_tbbvars.bat" windows_unknown_cl_unknown_release
cd ".\\build\\windows_unknown_cl_unknown_debug" && cmd /C "..\..\build\generate_tbbvars.bat" windows_unknown_cl_unknown_debug
mingw32-make -C ".\\build\\windows_unknown_cl_unknown_debug" -r -f ../../build/Makefile.tbb cfg=debug tbb_root=../..
mingw32-make[1]: Entering directory `C:/Users/wgriffin/Active/tbb/build/windows_unknown_cl_unknown_debug'
../../build/Makefile.tbb:39: CONFIG: cfg=debug arch=unknown compiler=cl os=windows runtime=unknown
cl /nologo /c /MDd /Od /Ob0 /Zi /EHsc /GR /Zc:forScope /Zc:wchar_t /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 /W4 /I../../src /I../../src/rml/include /I../../include../../src/tbb/concurrent_hash_map.cpp
process_begin: CreateProcess(NULL, cl /nologo /c /MDd /Od /Ob0 /Zi /EHsc /GR /Zc:forScope /Zc:wchar_t /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 /W4 /I../../src /I../../src/rml/include /I../../include ../../src/tbb/concurrent_hash_map.cpp, ...) failed.
make (e=2): The system cannot find the file specified.
mingw32-make[1]: *** [concurrent_hash_map.obj] Error 2
mingw32-make[1]: Leaving directory `C:/Users/wgriffin/Active/tbb/build/windows_unknown_cl_unknown_debug'
mingw32-make: *** [tbb] Error 2

Thanks,
Wes

You have to specify compiler=gcc to use TBB with MinGW.

Hi,Is there any way to compile tbb under mingw-w64?Regards,Alexander

No we did not work on support for MinGW-w64. And I do not remember anybody asking for it before.
Wanna step in and implement such support based on what we have for MinGW32? :)

Seiten

Kommentar hinterlassen

Bitte anmelden, um einen Kommentar hinzuzufügen. Sie sind noch nicht Mitglied? Jetzt teilnehmen