From: Paul H. Hargrove (PHHargrove_at_lbl_dot_gov)
Date: Thu Nov 20 2008 - 10:35:54 PST
To follow up on Yili's suggestions, I'd recommend modifying sys/Makefile to use $(CC), rather than $(UCC) to compile and link setparams. I am not sure which version of the NPB benchmarks you have, but you might be able to resolve your problem with make clean make HOST_CC=gcc If using the copy of the NPBs shipped with the Berkeley UPC compiler, this will ensure setparams is built with gcc, rather than upcc. -Paul Yili Zheng wrote: > Hi, here is my answer to your question. > > ../sys/setparams was compiled for 4 static threads by the UPC compiler > (upcc) because of the "-T ${NP}" compiler flag in your makefile. But > "../sys/setparams cg S 4" tried to run with only 1 thread because it > didn't use the upcrun command. The thread count mismatch caused the UPC > runtime library to report the error. > > Because setparams doesn't need to run in parallel, you may compile it > with a regular C compiler and run it in serial. > > You may find the information about building setparams in the makefile > "sys/make.common". > setparams is compiled/linked by $(UCC) which is defined in make.def as > the following: > UCC = upcc -T ${NP} -O -network=mpi -Wc,-g > > The quick fix is to use the regular C compiler for building the NPB > utilities. You may try the following in your make.def: > UCC = gcc -g ## or any other compatible C compiler such as icc. > > Regards, > Yili > > luxingjing wrote: > >> >> >> Hi, >> >> The platform is DSMP, and the conduit is mpi, the make.def under the >> dirction of config is: >> >> #--------------------------------------------------------------------------- >> >> # This is the UPC compiler used for UPC programs >> >> #--------------------------------------------------------------------------- >> >> CC = upcc >> >> # This links C programs; usually the same as ${CC} >> >> CLINK = upcc >> >> >> >> #--------------------------------------------------------------------------- >> >> # These macros are passed to the linker >> >> #--------------------------------------------------------------------------- >> >> C_LIB = -lm -T ${NP} -network=mpi >> >> >> >> #--------------------------------------------------------------------------- >> >> # These macros are passed to the compiler >> >> #--------------------------------------------------------------------------- >> >> C_INC = -I../common >> >> >> >> #--------------------------------------------------------------------------- >> >> # Global *compile time* flags for C programs >> >> #--------------------------------------------------------------------------- >> >> CFLAGS = -T ${NP} -O -network=mpi -Wc,-g >> >> >> >> #--------------------------------------------------------------------------- >> >> # Global *link time* flags. Flags for increasing maximum executable >> >> # size usually go here. >> >> #--------------------------------------------------------------------------- >> >> CLINKFLAGS = >> >> >> >> #--------------------------------------------------------------------------- >> >> # Utilities C: >> >> # >> >> # This is the C compiler used to compile C utilities. Flags required by >> >> # this compiler go here also; typically there are few flags required; hence >> >> # there are no separate macros provided for such flags. >> >> #--------------------------------------------------------------------------- >> >> UCC = upcc -T ${NP} -O -network=mpi -Wc,-g >> >> >> >> #--------------------------------------------------------------------------- >> >> # Destination of executables, relative to subdirs of the main directory. . >> >> #--------------------------------------------------------------------------- >> >> BINDIR = ../bin >> >> >> >> >> >> #--------------------------------------------------------------------------- >> >> # The variable RAND controls which random number generator >> >> # is used. It is described in detail in Doc/README.install. >> >> # Use "randi8" unless there is a reason to use another one. >> >> # Other allowed values are "randi8_safe", "randdp" and "randdpvec" >> >> #--------------------------------------------------------------------------- >> >> RAND = randi8 >> >> # The following is highly reliable but may be slow: >> >> #RAND = randdp >> >> >> >> >> >> #--------------------------------------------------------------------------- >> >> # The variable WTIME is the name of the wtime source code module in the >> >> # NPB2.x/common directory. >> >> # For most machines, use wtime.c >> >> # For SGI power challenge: use wtime_sgi64.c >> >> #--------------------------------------------------------------------------- >> >> WTIME = wtime.c >> >> >> >> >> >> #--------------------------------------------------------------------------- >> >> # Enable if either Cray or IBM: >> >> # (no such flag for most machines: see common/wtime.h) >> >> # This is used by the C compiler to pass the machine name to common/wtime.h, >> >> # where the C/Fortran binding interface format is determined >> >> #--------------------------------------------------------------------------- >> >> # MACHINE = -DCRAY >> >> # MACHINE = -DIBM >> >> >> >> >> >> But some erros show below: >> >> >> >> autopar@gnode10:~/lxj/NPB-UPC-110404/CG> make CLASS=S NP=4 >> >> gmake[1]: Entering directory `/bwdata/autopar/lxj/NPB-UPC-110404/sys' >> >> o setparams setparams.c -lm >> >> gmake[1]: o: Command not found >> >> gmake[1]: [setparams] Error 127 (ignored) >> >> gmake[1]: Leaving directory `/bwdata/autopar/lxj/NPB-UPC-110404/sys' >> >> ../sys/setparams cg S 4 >> >> UPC Runtime error: program was compiled with 4 static threads, but >> executed with 1 threads. >> >> NOTICE: Before reporting bugs, run with GASNET_BACKTRACE=1 in the >> environment to generate a backtrace. >> >> make: *** [config] Error 255 >> >> >> >> >> >> what it mean? >> >> Yours Eric.Lew >> >> >> >> >> >> >> >> -- Paul H. Hargrove PHHargrove_at_lbl_dot_gov Future Technologies Group Tel: +1-510-495-2352 HPC Research Department Fax: +1-510-486-6900 Lawrence Berkeley National Laboratory