Kenneth Hoste
2006-Sep-01 08:05 UTC
[LLVMdev] compiling the full SPEC CPU2000 suite to LLVM bytecode
On 31 Aug 2006, at 23:46, Chris Lattner wrote:> On Thu, 31 Aug 2006, Kenneth Hoste wrote: >> Bummer. I think I'll contact the NAG support for more info on >> this. Can you >> show me the content of your Makefile.nagfortran? > > It is identical to yours. > >> Also, it is possible to tell make only to compile benchmark X? How >> can I >> enforce this? > > Go into the directory for that benchmark, then run 'make' or whatever.OK, I seem to be getting closer to the problem... When compiling a single benchmark, I noticed the following... /work/NAG_f95/bin/f95 -w -S -O2 /work/SPEC_CPU2000_1.3_src/benchspec/ CFP2000/168.wupwise/src/dcabs1.f -o dcabs1.c -dusty -dcfuns Evaluation trial version of NAGWare Fortran 95 Release 5.1(216) /home/kehoste/work/LLVM/1.8/llvm-gcc4-1.8-x86-linux/bin/llvm-gcc - DSPEC_CPU2000 -I/home/kehoste/work/LLVM/1.8/llvm/projects/llvm-test/ External/SPEC/CFP2000/168.wupwise -I/home/kehoste/work/LLVM/1.8/llvm/ projects/llvm-test/External/SPEC/CFP2000/168.wupwise -I/home/kehoste/ work/LLVM/1.8/llvm/include -I/home/kehoste/work/LLVM/1.8/llvm/ projects/llvm-test/include -I../../../../include -I/home/kehoste/work/ LLVM/1.8/llvm/include -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -I /work/ SPEC_CPU2000_1.3_src/benchspec/CFP2000/168.wupwise/src/ -I/work/ NAG_f95/lib -O3 -S dcabs1.c -o Output/dcabs1.ll -emit-llvm In file included from /work/SPEC_CPU2000_1.3_src/benchspec/ CFP2000/168.wupwise/src/dcabs1.f:1: /work/NAG_f95/lib/f95.h:109: error: syntax error before ‘Logical4’ /work/NAG_f95/lib/f95.h:109: warning: data definition has no type or storage class /work/NAG_f95/lib/f95.h:118: error: syntax error before ‘Integer4’ /work/NAG_f95/lib/f95.h:118: warning: data definition has no type or storage class This seems to suggest something is wrong with the f95.h file provided by NAG. This would be very strange, since I can't imagine them releasing something without thorough testing on a common platform (Linux/x86). I've mailed the support, but their reply seems to be quite slow... greetings, Kenneth -- Statistics are like a bikini. What they reveal is suggestive, but what they conceal is vital (Aaron Levenstein) Kenneth Hoste ELIS - Ghent University kenneth.hoste at elis.ugent.be http://www.elis.ugent.be/~kehoste
Kenneth Hoste
2006-Sep-01 11:43 UTC
[LLVMdev] compiling the full SPEC CPU2000 suite to LLVM bytecode
On 01 Sep 2006, at 10:05, Kenneth Hoste wrote:> >> >>> Also, it is possible to tell make only to compile benchmark X? How >>> can I >>> enforce this? >> >> Go into the directory for that benchmark, then run 'make' or >> whatever. >I tried tom compile each of the SPEC CPU2000 benchmarks using the make command is each respective subdirectory of llvm-test/External/SPEC. My setup: LLVM-1.8 with the gcc4 frontend (gcc-4.0.1). The NAG f95 compiler is v5.1(216). My platform is Fedora Core 4 on a Intel Pentium 4. I was confronted with 6 different errors for the various benchmarks, 4 of which are relate to the NAG f95 compiler. See below for details. I seems most of the error are directly related to f95, which seems to have undergone some changes in the 5.1 release. Two errors are related to LLVM I think, (crtend and the syntax error for perlbmk). Any hints to solve these problems are welcome. I've contacted the f95 people on the NAG-specific problems. *** cannot find library crtend This seems to be LLVM-specific. I've check the FAQ, and this is actually mentioned there. Only, it says to define the LLVM_LIB_SEARCH_PATH environment variable. Only, I can't find libcrtend.a anywhere in the cfrontend directories. Is there a known workaround for this? And if there is, why isn't it in the documentation? Affected benchmarks: equake, lucas, vpr, gcc, crafty, eon, gcc *** syntax error Compiling the perlbmk benchmark produces a syntax error. This may be a GCC4 problem. <path>/SPEC_CPU2000_1.3_src/benchspec/CINT2000/253.perlbmk/src/ nt_perlmain.c:80: error: syntax error before ‘int’ (among others) This specific line of code is: DllExport int RunPerl(int argc, char **argv, char **env, void *ios); which does seem very strange syntax to me... Affected benchmarks: perlbmk. +++ following errors seem to be NAG-specific +++ *** f95.h There seem to be some changes in the f95.h file for version 5.1 which cause llvm-gcc to throw an error. I suspect there's a small problem, perhaps with the detection of my system. I guess this has more to do with the NAG compiler than with LLVM itself. Nevertheless, I wanted to mention it. llvm-gcc <with-a-bunch-of-options> -O3 -S dcabs1.c -o Output/ dcabs1.ll -emit-llvm In file included from <path>/SPEC_CPU2000_1.3_src/benchspec/ CFP2000/168.wupwise/src/dcabs1.f:1: <path>/lib/f95.h:109: error: syntax error before ‘Logical4’ <path>/lib/f95.h:109: warning: data definition has no type or sto rage class <path>/lib/f95.h:118: error: syntax error before ‘Integer4’ ... Affected SPEC CPU2000 benchmarks: wupwise, swim, mgrid, applu *** f95 PANIC Another f95 specific issue is a PANIC when compiling the code of apsi to C code. More specific: Panic: apsi.f: Unexpected expr node 47050 type 414 in tree flattener Internal Error -- please report this bug Again, this is no job for the LLVM people. Affected benchmarks: apsi *** libf97.dylib not found ...simply because it's not on my system. I guess this changed in the 5.1 release of f95. Also, there's no NAGWare subdirectory of the lib directory, which should be the case according to the NAG documentation. It seems the libraries are directly located in <path>/lib. This should probably be fixed in the Makefile.nagfortran, but I don't know how (since there's no other *dylib file available it seems). This only generates a warning from gccld, but I think it's the cause of the problems which are reported subsequently. Affected benchmarks: galgel, facerec, sixtrack *** BEAM (fma3d) There seem to be some issues with the fma3d benchmark, when translating from Fortran to C: f95 -w -S -O2 <path>/SPEC_CPU2000_1.3_src/benchspec/CFP2000/191.fma3d/ src/beam.f90 -o beam.c -dusty -maxcontin=69 Error: <path>/SPEC_CPU2000_1.3_src/benchspec/CFP2000/191.fma3d/src/ beam.f 90: Binding label 'beam_' of COMMON/BEAM/ matches module BEAM_ [f95 error termination] Also a f95-related issue I'd guess. Affected benchmarks: fma3d. *** greetings, Kenneth -- Statistics are like a bikini. What they reveal is suggestive, but what they conceal is vital (Aaron Levenstein) Kenneth Hoste ELIS - Ghent University kenneth.hoste at elis.ugent.be http://www.elis.ugent.be/~kehoste
Kenneth Hoste
2006-Sep-01 14:46 UTC
[LLVMdev] compiling the full SPEC CPU2000 suite to LLVM bytecode
Hello, Some problems were solved, new ones arised... Getting closer though... The fixes for the previous problems are at the bottom of this email, bug reports will be submitted when all problems are solved. +++ New/remaining problems +++ Currently, 9/26 benchmarks compile and run succesfully. One (fma3d) still has a f95 related problem (see below). The other 16 are divided into two groups: *** 1) *** bytecode builds ok, but exection fails For 10 benchmarks the execution fails as follows: JIT problems: <start> Running: /home/kehoste/work/LLVM/1.8/llvm/projects/llvm-test/ RunSafely.sh 500 galgel.in galgel.out /home/kehoste/work/LLVM/1.8/ llvm/Release/bin/lli -force-interpreter=false ../178.galgel.llvm.bc (no debugging symbols found) Using host libthread_db library "/lib/libthread_db.so.1". (no debugging symbols found) Core was generated by `/home/kehoste/work/LLVM/1.8/llvm/Release/bin/ lli-force-interpreter=false ../17'. Program terminated with signal 6, Aborted. warning: svr4_current_sos: Can't read pathname for load map: Input/ outpu t error </end> Other tests: <start> /home/kehoste/work/LLVM/1.8/llvm/Release/bin/fpcmp: Comparison failed, not a numeric difference. ******************** TEST (llc) '178.galgel' FAILED! ******************** Execution Context Diff: </end> Strangely enough, no additional output (error or warnings) is generated. Also, the execution diff seems to be empty. Additionally, I don't think the programs get executed at all, because make runs too fast. For gap/gcc, only the cbe test fails, the other (including JIT) are ok. Affected benchmarks: galgel, equake, lucas, gcc, gap, facerec, sixtrack, wupwise, mgrid, applu, apsi Since these include both SPECfp and SPECint benchmarks, this has nothing todo with f95. *** 2) *** Undefined references With 3 benchmarks (vpr, crafty and eon), I'm getting similar undefined references: /tmp/ccGCQxYs.o(.text+0x76b2): In function `init_chan': 175.vpr.cbe.c: undefined reference to `ltmp_6791_156' /tmp/ccGCQxYs.o(.text+0x76cb):175.vpr.cbe.c: undefined reference to `ltmp_6792_156' /tmp/ccGCQxYs.o(.text+0x76f1):175.vpr.cbe.c: undefined reference to `ltmp_6793_157' /tmp/ccGCQxYs.o(.text+0x76fb):175.vpr.cbe.c: undefined reference to `ltmp_6794_156' These also include SPECint benchmarks, so again, this has nothing todo with f95.> *** perlbmk syntax error > > Compiling the perlbmk benchmark produces a syntax error. This may be > a GCC4 problem. > > <path>/SPEC_CPU2000_1.3_src/benchspec/CINT2000/253.perlbmk/src/ > nt_perlmain.c:80: error: syntax error before ‘int’ > > (among others) > > This specific line of code is: > > DllExport int RunPerl(int argc, char **argv, char **env, void *ios); > > which does seem very strange syntax to me... > > Affected benchmarks: perlbmk. > > This one remains. Solutions/ideas are very welcome.This one remains. Solutions/ideas are very welcome. +++ Problems solved +++> *** cannot find library crtend >This is a know problem. Fix is shown at http://lists.cs.uiuc.edu/ pipermail/llvm-commits/Week-of-Mon-20060828/037184.html Thanks to Reid for mentioning this (on IRC). Reason: crtend is a library used in the old frontend, and the Makefile weren't aware of this.> > +++ following errors seem to be NAG-specific +++ >The NAG support was really friendly, here's how the NAG problems got fixed.> *** BEAM (fma3d) > > There seem to be some issues with the fma3d benchmark, when > translating from Fortran to C: > > f95 -w -S -O2 <path>/SPEC_CPU2000_1.3_src/benchspec/CFP2000/191.fma3d/ > src/beam.f90 -o beam.c -dusty -maxcontin=69 > Error: <path>/SPEC_CPU2000_1.3_src/benchspec/CFP2000/191.fma3d/src/ > beam.f > 90: Binding label 'beam_' of COMMON/BEAM/ matches module BEAM_ > [f95 error termination] > > Also a f95-related issue I'd guess. > > Affected benchmarks: fma3d.This is yet to be solved.> *** problems with f95.hAdding -DINT64='long long' to the CPPFLAGS solved this. I will submit a bug report for this some time soon.> > *** f95 PANICThis was a known problem, which is fixed in the latest edit (available at ftp://ftp.nag.co.uk/pub/nagware_support/ nplux51na_rh90_282.tgz).> > *** libf97.dylib not found >It appears the *.dylib files are Mac specific. Apparently the usage of f95 was only tested on Mac (I think Chris did this?). Solution (for Linux/x86): modify Makefile.nagfortran: CPPFLAGS += -I$(F95_DIR)/lib LDFLAGS += $(F95_DIR)/lib/quickfit.o $(F95_DIR)/lib/libf98.so $ (F95_DIR) /lib/libf98.a I'll also submit a bug report for this one. greetings, Kenneth -- Statistics are like a bikini. What they reveal is suggestive, but what they conceal is vital (Aaron Levenstein) Kenneth Hoste ELIS - Ghent University kenneth.hoste at elis.ugent.be http://www.elis.ugent.be/~kehoste
Reasonably Related Threads
- [LLVMdev] compiling the full SPEC CPU2000 suite to LLVM bytecode
- [LLVMdev] compiling the full SPEC CPU2000 suite to LLVM bytecode
- [LLVMdev] compiling the full SPEC CPU2000 suite to LLVM bytecode
- [LLVMdev] compiling the full SPEC CPU2000 suite to LLVM bytecode
- [LLVMdev] compiling the full SPEC CPU2000 suite to LLVM bytecode