From: Dan Bonachea (bonachea_at_cs_dot_berkeley_dot_edu)
Date: Sat Apr 09 2005 - 01:30:00 PDT
At 10:32 PM 4/7/2005, Cundong Yang wrote: >Thanks a lot. >Attached is my code and the result by executing upcc --version. >I will submit a bug report if it is confirmed to >be a bug. Cundong - I believe your compilation problems are being caused by a known incompatibility with the Sun CC preprocessor, which it appears you're using as the backend C compiler: http://upc-bugs.lbl.gov/bugzilla/show_bug.cgi?id=475 I recommend doing a clean configure and build of the UPC runtime using gcc as the backend compiler, ie: CC=gcc ./configure ; gmake Using gcc as the backend compiler I'm able to get further in compilation of your code (although it fails due to some legitimate syntax errors in the program that you'll need to fix). Also, I noticed your code contains some questionable declarations: shared FILE *g_InputFile; shared FILE *g_OutputFile; I'm not 100% certain what these are for, but I doubt they will work as you expect. The C/POSIX IO functions work on a strictly per-thread basis in UPC - it's unsafe to share a C99 FILE handle across UPC threads. UPC has recently added an IO library for performing parallel IO, but if you just want serial IO then each thread should open and use its own FILE handles. Dan >--cundong >On Thu, 07 Apr 2005 20:29:26 -0700 > Dan Bonachea <bonachea_at_cs_dot_berkeley_dot_edu> wrote: >>Hi Cundong - I'm taking this discussion off the main UPC community list onto >>the Berkeley UPC users list. >>Without seeing your code, it's hard to say what might be wrong. >>Could you please submit a bug report here: >> http://upc-bugs.lbl.gov/bugzilla/ >>and attach your code so we can diagnose? >>Please be sure to include the output of upcc --version >>Thanks, >>DanAt 08:07 PM 4/7/2005, Cundong Yang wrote: >>>Hi: >>> sorry to bother all.I am a novice to UPC. Who could >>>help me solve this problem? >>> I have a program,now compile using CC on Sun solaris >>>and run smoothly.But when I want >>> to compile it with upcc, some error information is >>>printed as follows: >>>Thanks a lot. >>>--cundong >>>>make -f Makefile.upc >>>/amd/madera/madera/pool8/mahimahi/cundongyang/upcbin/upcc >>>-c -g -I >>>/amd/madera/madera/pool8/mahimahi/cundongyang/upcbin/berkeley_upc-2.1.0/upcr_preinclude/ >>>-o io.o io.c >>>Error during remote HTTP translation: >>>upcc: error during UPC-to-C translation (sgiupc stage): >>>io.c:4: undefined or invalid # directive `file' >>> >>>make: *** [io.o] Error 255 >>> >>>--------------------------------------------------| >>>Cundong Yang | >>>High Performance Computing Lab. | >>>Electrical and Computing Engineering Department | >>>Universiy of New Mexico | >>>Email: cdyang_at_unm_dot_edu | >>>Phone: +1-505-277 0801 | >>>Website:http://www.ece.unm.edu/~cundongyang | > > > >--------------------------------------------------| >Cundong Yang | >High Performance Computing Lab. | >Electrical and Computing Engineering Department | >Universiy of New Mexico | >Email: cdyang_at_unm_dot_edu | >Phone: +1-505-277 0801 | >Website:http://www.ece.unm.edu/~cundongyang | > >