lashgar / ipmacc

IPMACC is a framework for translating OpenACC for C API to CUDA, OpenCL, and Intel ISPC.
13 stars 4 forks source link

compilation errors ipmacc #5

Closed PaniniGrill closed 5 years ago

PaniniGrill commented 5 years ago

I follow all the way up to step 2 where i then type ./compile-all I also tired following some other previous issues threads and was able to fix some errors. the result is as follows:

paninigrill@PaniniGrill-PC:/mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc$ ./compile-all ~ compiling uncrustify .../mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 1: ====================: command not found /mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 2: The: command not found /mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 3: -: command not found /mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 4: -: command not found /mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 6: ====================: command not found /mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 7: Pre-requistics:: command not found /mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 9: Requirements:: command not found /mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 10: -: command not found /mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 11: -: command not found /mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 12: on: command not found /mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 13: $: command not found /mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 14: on: command not found /mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 15: $: command not found /mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 16: on: command not found /mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 17: $: command not found /mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 18: syntax error near unexpected token (' /mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 18:- In case of CUDA backend, CUDA Toolkit (>=4.2)' /mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 1: ====================: command not found /mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 2: The: command not found /mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 3: -: command not found /mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 4: -: command not found /mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 6: ====================: command not found /mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 7: Pre-requistics:: command not found /mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 9: Requirements:: command not found /mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 10: -: command not found /mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 11: -: command not found /mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 12: on: command not found /mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 13: $: command not found /mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 14: on: command not found /mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 15: $: command not found /mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 16: on: command not found /mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 17: $: command not found /mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 18: syntax error near unexpected token (' /mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 18:- In case of CUDA backend, CUDA Toolkit (>=4.2)' /mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 1: ====================: command not found /mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 2: The: command not found /mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 3: -: command not found /mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 4: -: command not found /mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 6: ====================: command not found /mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 7: Pre-requistics:: command not found /mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 9: Requirements:: command not found /mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 10: -: command not found /mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 11: -: command not found /mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 12: on: command not found /mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 13: $: command not found /mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 14: on: command not found /mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 15: $: command not found /mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 16: on: command not found /mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 17: $: command not found /mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 18: syntax error near unexpected token (' /mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc//install: line 18:- In case of CUDA backend, CUDA Toolkit (>=4.2)' .backup.cpp: In function ‘int backup_copy_file(const char, const std::vector&)’: backup.cpp:37:5: warning: ‘__builtin___snprintf_chk’ output truncated before the last format character [-Wformat-truncation=] int backup_copy_file(const char filename, const vector& data) ^~~~ In file included from /usr/include/stdio.h:862:0, from /usr/include/c++/7/cstdio:42, from /usr/include/c++/7/ext/string_conversions.h:43, from /usr/include/c++/7/bits/basic_string.h:6361, from /usr/include/c++/7/string:52, from /usr/include/c++/7/stdexcept:39, from /usr/include/c++/7/array:39, from /usr/include/c++/7/tuple:39, from /usr/include/c++/7/bits/stl_map.h:63, from /usr/include/c++/7/map:61, from options.h:12, from uncrustify_types.h:17, from prototypes.h:11, from backup.cpp:25: /usr/include/x86_64-linux-gnu/bits/stdio2.h:65:44: note: ‘builtin___snprintf_chk’ output 34 bytes into a destination of size 33 bos (s), fmt, __va_arg_pack ()); ^ .ln: failed to create symbolic link '/mnt/c/Users/PaniniGrill/code/ctocuda/ipmacc/uncrustify/build/bin/avalon.cfg': File exists . done ~ compiling pycparser .bison oaccparser.y oaccparser.y: warning: 63 shift/reduce conflicts [-Wconflicts-sr] oaccparser.y: warning: 49 reduce/reduce conflicts [-Wconflicts-rr] oaccparser.y:76.10-94: warning: rule useless in parser due to conflicts [-Wother] | error { printf("unexpected content within cache region\n"); return -1; } ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ gcc oaccparser.tab.c -o oaccparser oaccparser.y:7:1: warning: return type defaults to ‘int’ [-Wimplicit-int] yyerror (s) / Called by yyparse on error / ^~~ oaccparser.tab.c: In function ‘yyparse’: oaccparser.tab.c:1217:16: warning: implicit declaration of function ‘yylex’ [-Wimplicit-function-declaration] yychar = yylex (); ^~~~~ oaccparser.y: At top level: oaccparser.y:98:1: warning: return type defaults to ‘int’ [-Wimplicit-int] yylex () ^~~~~ oaccparser.y:115:1: warning: return type defaults to ‘int’ [-Wimplicit-int] main () ^~~~ .. done ~ compiling srcML parser .make: PureCommentLexer.g: Command not found make: *** [PureCommentLexerTokenTypes.txt] Error 127 . done ~ compiling OpenACC API .openacc.c: In function ‘acc_malloc’: openacc.c:704:52: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Wformat=] printf("failed to allocate memory %16llu bytes on CUDA device by acc_malloc: error-code (%d)\n", bytes, err);


                                               %16lu
openacc.c:706:66: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
         }else if(getenv("IPMACCLIB_VERBOSE")) printf("CUDA: %16llu bytes [allocated] on device by acc_malloc (ptr: %p)\n",bytes,ptr);
                                                             ~~~~~^
                                                             %16lu
openacc.c: In function ‘acc_list_devices_spec’:
openacc.c:769:55: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
             printf("\tTotal global memory:           %u\n",  devProp.totalGlobalMem);
                                                      ~^      ~~~~~~~~~~~~~~~~~~~~~~
                                                      %lu
openacc.c:770:55: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
             printf("\tTotal shared memory per block: %u\n",  devProp.sharedMemPerBlock);
                                                      ~^      ~~~~~~~~~~~~~~~~~~~~~~~~~
                                                      %lu
openacc.c:773:55: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
             printf("\tMaximum memory pitch:          %u\n",  devProp.memPitch);
                                                      ~^      ~~~~~~~~~~~~~~~~
                                                      %lu
openacc.c:782:55: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
             printf("\tTotal constant memory:         %u\n",  devProp.totalConstMem);
                                                      ~^      ~~~~~~~~~~~~~~~~~~~~~
                                                      %lu
openacc.c:783:55: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
             printf("\tTexture alignment:             %u\n",  devProp.textureAlignment);
                                                      ~^      ~~~~~~~~~~~~~~~~~~~~~~~~
                                                      %lu
openacc.c: In function ‘acc_compress_create’:
openacc.c:900:52: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
             printf("failed to allocate memory %16llu bytes on CUDA device: %d\n", bytes, err);
                                               ~~~~~^
                                               %16lu
openacc.c:901:66: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
         }else if(getenv("IPMACCLIB_VERBOSE")) printf("CUDA: %16llu bytes [allocated] on device (ptr: %p)\n",bytes,devptr);
                                                             ~~~~~^
                                                             %16lu
openacc.c: In function ‘acc_create’:
openacc.c:975:52: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
             printf("failed to allocate memory %16llu bytes on CUDA device: error-code (%d)\n", bytes, err);
                                               ~~~~~^
                                               %16lu
openacc.c:977:66: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
         }else if(getenv("IPMACCLIB_VERBOSE")) printf("CUDA: %16llu bytes [allocated] on device (ptr: %p)\n",bytes,devptr);
                                                             ~~~~~^
                                                             %16lu
openacc.c: In function ‘acc_copyout_and_keep’:
openacc.c:1065:61: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
         if (getenv("IPMACCLIB_VERBOSE")) printf("CUDA: %16llu bytes [copyout]   from device (ptr: %p)\n",bytes,devptr);
                                                        ~~~~~^
                                                        %16lu
openacc.c: In function ‘acc_copyout_to_comp’:
openacc.c:1103:61: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
         if (getenv("IPMACCLIB_VERBOSE")) printf("CUDA: %16llu bytes [copyout]   from device (ptr: %p)\n",bytes,devptr);
                                                        ~~~~~^
                                                        %16lu
openacc.c: In function ‘acc_present_or_copyin’:
openacc.c:1242:61: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
         if (getenv("IPMACCLIB_VERBOSE")) printf("CUDA: %16llu bytes [copyin]    to device (ptr: %p)\n",bytes,devptr);
                                                        ~~~~~^
                                                        %16lu
openacc.c: In function ‘acc_copy_from_compressed’:
openacc.c:1279:61: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
         if (getenv("IPMACCLIB_VERBOSE")) printf("CUDA: %16llu bytes [copyin]    to device (ptr: %p)\n",bytes,devptr);
                                                        ~~~~~^
                                                        %16lu
openacc.c: In function ‘acc_memcpy_to_device’:
openacc.c:1685:61: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
         if (getenv("IPMACCLIB_VERBOSE")) printf("CUDA: %16llu bytes [copyin]    to device (ptr: %p)\n",bytes,devptr);
                                                        ~~~~~^
                                                        %16lu
openacc.c: In function ‘acc_memcpy_from_device’:
openacc.c:1721:61: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
         if (getenv("IPMACCLIB_VERBOSE")) printf("CUDA: %16llu bytes [copyout]   from device (ptr: %p)\n",bytes,devptr);
                                                        ~~~~~^
                                                        %16lu
openacc.c: In function ‘acc_profiler_dump’:
openacc.c:2218:12: warning: implicit declaration of function ‘time’; did you mean ‘utimes’? [-Wimplicit-function-declaration]
     srand (time(NULL));
            ^~~~
            utimes
. done
lashgar commented 5 years ago

Is this running in bash environment? Please list operating system, make, bash, and gcc versions.

PaniniGrill commented 5 years ago

Bash environment: Yes OS: Ubuntu Make: 18.04.1 LTS Bash: bash for windows 10 gcc version: (Ubuntu 7.4.0-1ubuntu1~18.04) 7.4.0

lashgar commented 5 years ago

compile-all.sh is not compatible with Windows. GNU Bash is required for running it.

PaniniGrill commented 5 years ago

Ok thanks, I will try again tomorrow on a different machine and get back to you