[LLVMdev] Fwd: OpenMPI and llvm-gcc

Frank Fuchs fuchs at ifto.physik.uni-jena.de
Fri Apr 17 10:40:57 PDT 2009


Yes I think I can.

The original compile line was:
llvm-g++ -DHAVE_CONFIG_H -I. -I../.. -I../../extlib/otf/otflib -I../../ 
extlib/otf/otflib -I../../vtlib/ -I../../vtlib  -D_REENTRANT -fopenmp - 
DVT_OMP -O2 -MT vtfilter-vt_tracefilter.o -MD -MP -MF .deps/vtfilter- 
vt_tracefilter.Tpo -c -o vtfilter-vt_tracefilter.o `test -f  
'vt_tracefilter.cc' || echo './'`vt_tracefilter.cc

I preprocessed the file using the llvm-cpp as follows:
llvm-cpp -DHAVE_CONFIG_H -I. -I../.. -I../../extlib/otf/otflib -I../../ 
extlib/otf/otflib -I../../vtlib/ -I../../vtlib  -D_REENTRANT -fopenmp - 
DVT_OMP -O2 -MT vtfilter-vt_tracefilter.o -MD -MP -MF .deps/vtfilter- 
vt_tracefilter.Tpo  vt_tracefilter.cc > vtfilter-vt_tracefilter.cpp

Than I checked whether or not the .o file compiled as:
llvm-gcc   -fopenmp -DVT_OMP -O2 -MT vtfilter-vt_tracefilter_.o -MD - 
MP -MF .deps/vtfilter-vt_tracefilter_.Tpo -c -o vtfilter- 
vt_tracefilter_.o vtfilter-vt_tracefilter.cpp

matched the original .o file (it did ... lucky me)
Finally I compiled for llvm byte-code (.bc) with the above command  
plus the  -emit-llvm flag.

I hope that is what you were asking for!

	FF

-------------- next part --------------
A non-text attachment was scrubbed...
Name: llvm.zip
Type: application/zip
Size: 197293 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090417/fab95398/attachment.zip>
-------------- next part --------------



Am 16.04.2009 um 22:47 schrieb Bill Wendling:

> That's odd. We should be lowering the __builtin_expect calls. Could
> you provide a preprocessed and .bc file for the
> vtfilter-vt_tracefilter.o file?
>
> -bw
>
> On Thu, Apr 16, 2009 at 6:02 AM, Frank Fuchs
> <fuchs at ifto.physik.uni-jena.de> wrote:
>> Hi,
>>
>> I was wondering whether or not MPI-libraries are expected to work  
>> with
>> llvm-gcc?
>>
>> I tried to compile openmpi-1.3 using the llvm-gcc4.2-2.5-x86-darwin9
>> distribution on my MacBook Pro running OS 10.5.6.
>> Installation using the gcc (gcc version 4.0.1 (Apple Inc. build  
>> 5490))
>> worked well.
>>
>> But for the llvm-gcc I get the following error message (during the
>> make):
>>> ....
>>> Making all in vtfilter
>>> llvm-g++ -DHAVE_CONFIG_H -I. -I../.. -I../../extlib/otf/otflib -
>>> I../../extlib/otf/otflib -I../../vtlib/ -I../../vtlib  - 
>>> D_REENTRANT -
>>> fopenmp -DVT_OMP -O2 -MT vtfilter-vt_filter.o -MD -MP -MF .deps/
>>> vtfilter-vt_filter.Tpo -c -o vtfilter-vt_filter.o `test -f
>>> 'vt_filter.cc' || echo './'`vt_filter.cc
>>> mv -f .deps/vtfilter-vt_filter.Tpo .deps/vtfilter-vt_filter.Po
>>> llvm-g++ -DHAVE_CONFIG_H -I. -I../.. -I../../extlib/otf/otflib -
>>> I../../extlib/otf/otflib -I../../vtlib/ -I../../vtlib  - 
>>> D_REENTRANT -
>>> fopenmp -DVT_OMP -O2 -MT vtfilter-vt_filthandler.o -MD -MP - 
>>> MF .deps/
>>> vtfilter-vt_filthandler.Tpo -c -o vtfilter-vt_filthandler.o `test -f
>>> 'vt_filthandler.cc' || echo './'`vt_filthandler.cc
>>> mv -f .deps/vtfilter-vt_filthandler.Tpo .deps/vtfilter-
>>> vt_filthandler.Po
>>> llvm-g++ -DHAVE_CONFIG_H -I. -I../.. -I../../extlib/otf/otflib -
>>> I../../extlib/otf/otflib -I../../vtlib/ -I../../vtlib  - 
>>> D_REENTRANT -
>>> fopenmp -DVT_OMP -O2 -MT vtfilter-vt_otfhandler.o -MD -MP -MF .deps/
>>> vtfilter-vt_otfhandler.Tpo -c -o vtfilter-vt_otfhandler.o `test -f
>>> 'vt_otfhandler.cc' || echo './'`vt_otfhandler.cc
>>> mv -f .deps/vtfilter-vt_otfhandler.Tpo .deps/vtfilter- 
>>> vt_otfhandler.Po
>>> llvm-g++ -DHAVE_CONFIG_H -I. -I../.. -I../../extlib/otf/otflib -
>>> I../../extlib/otf/otflib -I../../vtlib/ -I../../vtlib  - 
>>> D_REENTRANT -
>>> fopenmp -DVT_OMP -O2 -MT vtfilter-vt_tracefilter.o -MD -MP - 
>>> MF .deps/
>>> vtfilter-vt_tracefilter.Tpo -c -o vtfilter-vt_tracefilter.o `test -f
>>> 'vt_tracefilter.cc' || echo './'`vt_tracefilter.cc
>>> mv -f .deps/vtfilter-vt_tracefilter.Tpo .deps/vtfilter-
>>> vt_tracefilter.Po
>>> llvm-g++ -fopenmp -DVT_OMP -O2 -fopenmp  -o vtfilter vtfilter-
>>> vt_filter.o vtfilter-vt_filthandler.o vtfilter-vt_otfhandler.o
>>> vtfilter-vt_tracefilter.o ../../util/util.o -L../../extlib/otf/
>>> otflib -L../../extlib/otf/otflib/.libs -lotf  -lz
>>> Undefined symbols:
>>>  "___builtin_expect", referenced from:
>>>      _main.omp_fn.0 in vtfilter-vt_tracefilter.o
>>>      _main.omp_fn.0 in vtfilter-vt_tracefilter.o
>>>      _main.omp_fn.0 in vtfilter-vt_tracefilter.o
>>>      _main.omp_fn.1 in vtfilter-vt_tracefilter.o
>>>      _main.omp_fn.1 in vtfilter-vt_tracefilter.o
>>>      _main.omp_fn.1 in vtfilter-vt_tracefilter.o
>>>      _main.omp_fn.1 in vtfilter-vt_tracefilter.o
>>> ld: symbol(s) not found
>>> collect2: ld returned 1 exit status
>>> make[6]: *** [vtfilter] Error 1
>>
>>
>> Best,
>> FF
>>
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev






More information about the llvm-dev mailing list