Ubuntu를 실행하는 32 비트 컴퓨터 인 집 컴퓨터에 Cilk를 성공적으로 설치했습니다. 필자는 32 비트 버전 대신 64 비트 버전을 다운로드 한 것을 제외하고는 64 비트 우분투 netbook에 대한 지식을 최대한 활용하여 프로세스를 복제했습니다. 아래에 복사 한 매우 간단한 cilkexample.c을 실행하려고 할 때, 그러나, 나는 모두가이 라이브러리 파일에 대한 액세스 권한을 가지고 있지 관련된 것처럼 보이는, 아주 아주 많은 오류를 얻을 :Cilk ++ cilkexample.c = stderr의 200 줄
In file included from /usr/include/stdio.h:28,
from cilkexample.c:1:
/usr/include/features.h:323:26: error: bits/predefs.h: No such file or director\
y
/usr/include/features.h:356:25: error: sys/cdefs.h: No such file or directory
/usr/include/features.h:388:23: error: gnu/stubs.h: No such file or directory
In file included from cilkexample.c:1:
/usr/include/stdio.h:36:25: error: bits/types.h: No such file or directory
/usr/include/stdio.h:161:28: error: bits/stdio_lim.h: No such file or directory
/usr/include/stdio.h:846:30: error: bits/sys_errlist.h: No such file or directo\
ry
In file included from /usr/include/stdio.h:34,
from cilkexample.c:1:
/usr/local/cilk/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.2.4/include/stddef.h:\
214: error: expected constructor, destructor, or type conversion before ‘typede\
f’
In file included from cilkexample.c:1:
/usr/include/stdio.h:49: error: expected constructor, destructor, or type conve\
rsion before ‘typedef’
등등, 등등, 등등.
#include <stdio.h>
#include <cilk.h>
int foo() {
return 100;
}
int bar() {
return 50;
}
int cilk_main(int argc, char **argv) {
int x, y;
x = cilk_spawn foo();
y = cilk_spawn bar();
cilk_sync;
printf("Got %d %d, expecting %d %d\n", x, y, 100, 50);
return 0;
}
가 다시 말하지만, 나는이 구성 문제가 될 수 있다고 생각 : 여기
내가 명령cilk++ -o cilkexample cilkexample.c
컴파일을 시도하는 파일입니다. 이 코드는 우리 교수가 배포 한 작업 버전에서 수정되지 않고 별도의 컴퓨터에서 테스트되었습니다.
제가 생각할 수있는 마지막 정보 비트는 PATH입니다.
******@********:~/Path/To/Cilk$ echo $PATH
/usr/local/cilk/bin/:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
도움 주셔서 감사합니다.
stdio.h를 포함하기 때문에 설치 파일이 엉망이되어 많은 헤더 파일이 누락 된 것처럼 보입니다. – jv42
@ jv42, 네가 맞다고 생각하지만, 이것에 대해 어떻게해야할지 모르겠다. :) –