delitec to CPP gives error in MAC!

103 views
Skip to first unread message

mrez

unread,
Nov 13, 2014, 9:24:01 AM11/13/14
to opt...@googlegroups.com
Hi,

I am compiling with delitec Example1Compiler --cpp and then when trying to do: delite Example1Compiler --cpp I get this error:
------------------
Delite Runtime executing with: 1 Scala thread(s), 1 Cpp thread(s), 0 Cuda(s), 0 OpenCL(s)
--cpp compile args: /usr/bin/make,-s,-j,4,-f,/Users/strader/workspace/local/frameworks/hyperdsl/delite/generatedCache/cpp/bin/runtime/Makefile,all/Users/strader/workspace/local/frameworks/hyperdsl/delite/runtime/src/static/cpp/DeliteMemory.cpp:35:3: error: unknown type name 'cpu_set_t'
cpu_set_t cpuset;
^
/Users/strader/workspace/local/frameworks/hyperdsl/delite/runtime/src/static/cpp/DeliteMemory.cpp:40:44: error: use of undeclared identifier 'cpu_set_t'; did you mean 'cpuset'?
if(pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset) != 0) {
^~~~~~~~~
cpuset
/Users/strader/workspace/local/frameworks/hyperdsl/delite/runtime/src/static/cpp/DeliteMemory.cpp:35:13: note: 'cpuset' declared here
cpu_set_t cpuset;
^
/Users/strader/workspace/local/frameworks/hyperdsl/delite/runtime/src/static/cpp/DeliteMemory.cpp:45:29: error: use of undeclared identifier '_SC_PHYS_PAGES'
int64_t pages = sysconf(_SC_PHYS_PAGES);
^
3 errors generated.
make: *** [/Users/strader/workspace/local/frameworks/hyperdsl/delite/runtime/src/static/cpp/DeliteMemory.o] Error 1
make: *** Waiting for unfinished jobs....

Exception in thread "main" java.lang.RuntimeException: cpp compilation failed with exit value 2
at scala.sys.package$.error(package.scala:27)
at ppl.delite.runtime.codegen.CCompile$class.checkError(CCompile.scala:161)
at ppl.delite.runtime.codegen.CppCompile$.checkError(CppCompile.scala:8)
at ppl.delite.runtime.codegen.CCompile$class.compile(CCompile.scala:126)
at ppl.delite.runtime.codegen.CppCompile$.compile(CppCompile.scala:8)
at ppl.delite.runtime.codegen.CCompile$class.compile(CCompile.scala:88)
at ppl.delite.runtime.codegen.CppCompile$.compile(CppCompile.scala:8)
at ppl.delite.runtime.codegen.Compilers$.compileSchedule(Compilers.scala:70)
at ppl.delite.runtime.Delite$.walkTime$1(Delite.scala:128)
at ppl.delite.runtime.Delite$.walkAndRun(Delite.scala:157)
at ppl.delite.runtime.Delite$.embeddedMain(Delite.scala:58)
at ppl.delite.runtime.Delite$.main(Delite.scala:50)
at ppl.delite.runtime.Delite.main(Delite.scala)
error: Delite execution failed
-----------------


and this is my CPP.xml config: 
-----------
<DeliteExternalLib>
<compiler> /usr/bin/g++ </compiler>
<make> /usr/bin/make </make>
<headers>
  <prefix> -I </prefix>
  <path> ${JAVA_HOME}/include </path> <!-- required for JNI -->
  <path> ${JAVA_HOME}/include/darwin </path>
</headers>
</DeliteExternalLib>
----------


and also my BLAS.xml:
---------
<DeliteExternalLib>
<compiler> gcc </compiler> <!-- path to C compiler (gcc, icc, etc.) -->
<headers>
  <prefix> -I </prefix>
  <!-- insert path to JNI include directory -->
  <path> ${JAVA_HOME}/include </path>
  <path> ${JAVA_HOME}/include/darwin </path>
  <!-- insert path to BLAS include directory -->
  <path> /usr/local/Cellar/liblas/1.7.0/include/liblas/capi </path>
  <!-- insert name of header file that includes CBLAS functions -->
  <include> cblas.h </include>
</headers>
<libs>
  <prefix> -L </prefix>
  <!-- insert path to BLAS libraries -->
  <path> /usr/local/Cellar/liblas/1.7.0/lib </path>
  <!-- insert BLAS libraries -->
  <library> -lcblas </library>
</libs>
</DeliteExternalLib>
--------

I wonder what am I doing wrong!?

Kevin Brown

unread,
Nov 13, 2014, 9:37:07 AM11/13/14
to opt...@googlegroups.com
Delite's C++ code is currently only compatible with linux systems.  Supporting mac is something we're working on and should be available soon.

--
You received this message because you are subscribed to the Google Groups "OptiML" group.
To unsubscribe from this group and stop receiving emails from it, send an email to optiml+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

mrez

unread,
Nov 13, 2014, 10:16:31 AM11/13/14
to opt...@googlegroups.com
Thanks 
Reply all
Reply to author
Forward
0 new messages