Closed sujitbiswas closed 6 years ago
@sujitbiswas There was indeed a bug. I think I fixed it with commit 43d0fa6. Can you please try again and confirm that things work as expected?
@sujitbiswas To run on Mac OS did you use the provide dynamic library by inserting libraryDependencies += "org.platanios" %% "tensorflow" % "0.1.0-SNAPSHOT" classifier "linux-cpu-x86_64"
on the build.sbt or did you compile manually the tensorflow libraries ? Because I'm trying to let it works on Mac OS but I got an error during bazel build --config=opt //tensorflow:libtensorflow.so
when I manually try to compile the tensorflow library
@lucaRadicalbit To run on Mac you have to change the classifier
part to classifier "darwin-cpu-x86_64"
. What error did you get when trying to manually compile the TensorFlow library?
Yes, sorry, it was a typo, I meant darwin-cpu-x86_64.
I try to build manually because since yesterday using classifier "darwin-cpu-x86_64"
I got an error. I retry now after reading this issue with the classifier and it works !!
By the way the error that I got when I manually compile is:
bazel build --config=opt //tensorflow:libtensorflow.so
...............................................................
WARNING: /Users/databiz/Desktop/tensorflow_#30/tensorflow/core/BUILD:1785:1: in includes attribute of cc_library rule //tensorflow/core:framework_headers_lib: '../../external/nsync/public' resolves to 'external/nsync/public' not below the relative path of its package 'tensorflow/core'. This will be an error in the future. Since this rule was created by the macro 'cc_header_only_library', the error might have been caused by the macro implementation in /Users/databiz/Desktop/tensorflow_#30/tensorflow/tensorflow.bzl:1048:30.
INFO: Found 1 target...
INFO: From Compiling external/protobuf_archive/src/google/protobuf/compiler/js/embed.cc [for host]:
external/protobuf_archive/src/google/protobuf/compiler/js/embed.cc:37:12: warning: unused variable 'output_file' [-Wunused-const-variable]
const char output_file[] = "well_known_types_embed.cc";
^
1 warning generated.
ERROR: /private/var/tmp/_bazel_databiz/a54d28f9c27f5cb81a625af2ea3ee534/external/nsync/BUILD:397:1: C++ compilation of rule '@nsync//:nsync_cpp' failed (Exit 1).
In file included from external/nsync/internal/common.c:18:
In file included from ./external/nsync//platform/c++11/platform.h:29:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/mutex:189:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/__mutex_base:17:
/Library/Developer/CommandLineTools/usr/include/c++/v1/__threading_support:166:1: error: unknown type name 'mach_port_t'
mach_port_t __libcpp_thread_get_port();
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/__threading_support:310:1: error: unknown type name 'mach_port_t'
mach_port_t __libcpp_thread_get_port() {
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/__threading_support:311:12: error: use of undeclared identifier 'pthread_mach_thread_np'
return pthread_mach_thread_np(pthread_self());
^
3 errors generated.
Target //tensorflow:libtensorflow.so failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 219.263s, Critical Path: 12.10s
I am on Mac OS Sierra 10.12.6 bazel version 0.5.4
@lucaRadicalbit Do you get this error while using the node_def_fix
from my fork of TensorFlow?
@eaplatanios Thanks for the fix, please note I am able to run the linear regression example, however MNIST run into the following error, please suggest
A fatal error has been detected by the Java Runtime Environment:
SIGILL (0x4) at pc=0x0000000128a551da, pid=13976, tid=5891
JRE version: Java(TM) SE Runtime Environment (8.0_40-b27) (build 1.8.0_40-b27)
Java VM: Java HotSpot(TM) 64-Bit Server VM (25.40-b25 mixed mode bsd-amd64 compressed oops)
Problematic frame:
C [libtensorflow.so+0x181da] TF_GraphNextOperation+0x1a
Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
If you would like to submit a bug report, please visit:
http://bugreport.java.com/bugreport/crash.jsp
The crash happened outside the Java Virtual Machine in native code.
See problematic frame for where to report the bug.
Stack: [0x000070000011a000,0x000070000021a000], sp=0x0000700000215cb0, free space=1007k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [libtensorflow.so+0x181da] TF_GraphNextOperation+0x1a
C [libtensorflow_jni.so+0x3d73] Java_org_platanios_tensorflow_jni_Graph_00024_ops+0x63
j org.platanios.tensorflow.jni.Graph$.ops(J)[J+0
j org.platanios.tensorflow.api.core.Graph.ops()[Lorg/platanios/tensorflow/api/ops/Op;+21
j org.platanios.tensorflow.api.ops.Op$.currentGraphRandomSeed(Lscala/Option;)Lscala/Tuple2;+356
j org.platanios.tensorflow.api.ops.Random.$anonfun$randomNormal$1(Lorg/platanios/tensorflow/api/types/DataType;Lorg/platanios/tensorflow/api/ops/Output;Lorg/platanios/tensorflow/api/ops/Output;Lorg/platanios/tensorflow/api/ops/Output;Lscala/Option;Ljava/lang/String;)Lorg/platanios/tensorflow/api/ops/Output;+55
j org.platanios.tensorflow.api.ops.Random$$Lambda$317.apply()Ljava/lang/Object;+24
j scala.util.DynamicVariable.withValue(Ljava/lang/Object;Lscala/Function0;)Ljava/lang/Object;+14
j org.platanios.tensorflow.api.ops.Op$.createWithNameScope(Ljava/lang/String;Lscala/collection/immutable/Set;Lscala/Function0;Lscala/util/DynamicVariable;)Ljava/lang/Object;+243
j org.platanios.tensorflow.api.ops.Random.randomNormal(Lorg/platanios/tensorflow/api/types/DataType;Lorg/platanios/tensorflow/api/ops/Output;Lorg/platanios/tensorflow/api/ops/Output;Lorg/platanios/tensorflow/api/ops/Output;Lscala/Option;Ljava/lang/String;)Lorg/platanios/tensorflow/api/ops/Output;+209
j org.platanios.tensorflow.api.ops.Random.randomNormal$(Lorg/platanios/tensorflow/api/ops/Random;Lorg/platanios/tensorflow/api/types/DataType;Lorg/platanios/tensorflow/api/ops/Output;Lorg/platanios/tensorflow/api/ops/Output;Lorg/platanios/tensorflow/api/ops/Output;Lscala/Option;Ljava/lang/String;)Lorg/platanios/tensorflow/api/ops/Output;+10
j org.platanios.tensorflow.api.ops.Random$.randomNormal(Lorg/platanios/tensorflow/api/types/DataType;Lorg/platanios/tensorflow/api/ops/Output;Lorg/platanios/tensorflow/api/ops/Output;Lorg/platanios/tensorflow/api/ops/Output;Lscala/Option;Ljava/lang/String;)Lorg/platanios/tensorflow/api/ops/Output;+10
j org.platanios.tensorflow.api.ops.variables.RandomNormalInitializer.initialValue(Lorg/platanios/tensorflow/api/types/DataType;Lorg/platanios/tensorflow/api/core/Shape;Lorg/platanios/tensorflow/api/ops/variables/Variable$PartitionInformation;)Lorg/platanios/tensorflow/api/ops/Output;+42
j org.platanios.tensorflow.api.ops.variables.Initializer.apply(Lorg/platanios/tensorflow/api/types/DataType;Lorg/platanios/tensorflow/api/core/Shape;Lorg/platanios/tensorflow/api/ops/variables/Variable$PartitionInformation;)Lorg/platanios/tensorflow/api/ops/Output;+4
j org.platanios.tensorflow.api.ops.variables.Initializer.apply$(Lorg/platanios/tensorflow/api/ops/variables/Initializer;Lorg/platanios/tensorflow/api/types/DataType;Lorg/platanios/tensorflow/api/core/Shape;Lorg/platanios/tensorflow/api/ops/variables/Variable$PartitionInformation;)Lorg/platanios/tensorflow/api/ops/Output;+4
j org.platanios.tensorflow.api.ops.variables.RandomNormalInitializer.apply(Lorg/platanios/tensorflow/api/types/DataType;Lorg/platanios/tensorflow/api/core/Shape;Lorg/platanios/tensorflow/api/ops/variables/Variable$PartitionInformation;)Lorg/platanios/tensorflow/api/ops/Output;+4
j org.platanios.tensorflow.api.ops.variables.Variable$.$anonfun$apply$3(Lorg/platanios/tensorflow/api/ops/variables/Initializer;Lorg/platanios/tensorflow/api/types/DataType;Lorg/platanios/tensorflow/api/core/Shape;)Lorg/platanios/tensorflow/api/ops/Output;+4
j org.platanios.tensorflow.api.ops.variables.Variable$$$Lambda$275.apply()Ljava/lang/Object;+12
j scala.util.DynamicVariable.withValue(Ljava/lang/Object;Lscala/Function0;)Ljava/lang/Object;+14
j org.platanios.tensorflow.api.ops.Op$.createWith(Lorg/platanios/tensorflow/api/core/Graph;Ljava/lang/String;Ljava/lang/String;Lscala/Function1;Lscala/collection/immutable/Set;Lscala/collection/immutable/Set;Lscala/collection/immutable/Map;Ljava/lang/String;Lscala/Function0;Lscala/util/DynamicVariable;)Ljava/lang/Object;+952
j org.platanios.tensorflow.api.ops.variables.Variable$.$anonfun$apply$2(Lorg/platanios/tensorflow/api/ops/variables/Initializer;ZLscala/collection/immutable/Set;Lscala/Function1;Lorg/platanios/tensorflow/api/types/DataType;Lorg/platanios/tensorflow/api/core/Shape;)Lorg/platanios/tensorflow/api/ops/variables/Variable;+193
j org.platanios.tensorflow.api.ops.variables.Variable$$$Lambda$82.apply()Ljava/lang/Object;+24
j scala.util.DynamicVariable.withValue(Ljava/lang/Object;Lscala/Function0;)Ljava/lang/Object;+14
j org.platanios.tensorflow.api.ops.Op$.createWith(Lorg/platanios/tensorflow/api/core/Graph;Ljava/lang/String;Ljava/lang/String;Lscala/Function1;Lscala/collection/immutable/Set;Lscala/collection/immutable/Set;Lscala/collection/immutable/Map;Ljava/lang/String;Lscala/Function0;Lscala/util/DynamicVariable;)Ljava/lang/Object;+952
j org.platanios.tensorflow.api.ops.variables.Variable$.apply(Lorg/platanios/tensorflow/api/ops/variables/Initializer;Lorg/platanios/tensorflow/api/types/DataType;Lorg/platanios/tensorflow/api/core/Shape;ZLscala/collection/immutable/Set;Lscala/Function1;Ljava/lang/String;)Lorg/platanios/tensorflow/api/ops/variables/Variable;+178
j org.platanios.tensorflow.api.ops.variables.VariableStore$$anon$1.apply(Ljava/lang/String;Lorg/platanios/tensorflow/api/types/DataType;Lorg/platanios/tensorflow/api/core/Shape;Lorg/platanios/tensorflow/api/ops/variables/Initializer;Lorg/platanios/tensorflow/api/ops/variables/Regularizer;ZLorg/platanios/tensorflow/api/ops/variables/Reuse;Lscala/collection/immutable/Set;Lscala/Function1;Lorg/platanios/tensorflow/api/ops/variables/Variable$VariableGetter;)Lorg/platanios/tensorflow/api/ops/variables/Variable;+800
j org.platanios.tensorflow.api.ops.variables.VariableStore.getVariable(Ljava/lang/String;Lorg/platanios/tensorflow/api/types/DataType;Lorg/platanios/tensorflow/api/core/Shape;Lorg/platanios/tensorflow/api/ops/variables/Initializer;Lorg/platanios/tensorflow/api/ops/variables/Regularizer;ZLorg/platanios/tensorflow/api/ops/variables/Reuse;Lscala/collection/immutable/Set;Lscala/Function1;Lorg/platanios/tensorflow/api/ops/variables/Variable$VariableGetter;)Lorg/platanios/tensorflow/api/ops/variables/Variable;+60
j org.platanios.tensorflow.api.ops.variables.VariableScope.$anonfun$getVariable$1(Lorg/platanios/tensorflow/api/ops/variables/VariableStore;Lorg/platanios/tensorflow/api/types/DataType;Lorg/platanios/tensorflow/api/core/Shape;Lorg/platanios/tensorflow/api/ops/variables/Initializer;Lorg/platanios/tensorflow/api/ops/variables/Regularizer;ZLorg/platanios/tensorflow/api/ops/variables/Reuse;Lscala/collection/immutable/Set;Lscala/Function1;Ljava/lang/String;)Lorg/platanios/tensorflow/api/ops/variables/Variable;+20
j org.platanios.tensorflow.api.ops.variables.VariableScope$$Lambda$80.apply()Ljava/lang/Object;+40
j scala.util.DynamicVariable.withValue(Ljava/lang/Object;Lscala/Function0;)Ljava/lang/Object;+14
j org.platanios.tensorflow.api.ops.Op$.createWith(Lorg/platanios/tensorflow/api/core/Graph;Ljava/lang/String;Ljava/lang/String;Lscala/Function1;Lscala/collection/immutable/Set;Lscala/collection/immutable/Set;Lscala/collection/immutable/Map;Ljava/lang/String;Lscala/Function0;Lscala/util/DynamicVariable;)Ljava/lang/Object;+952
j org.platanios.tensorflow.api.ops.variables.VariableScope.getVariable(Lorg/platanios/tensorflow/api/ops/variables/VariableStore;Ljava/lang/String;Lorg/platanios/tensorflow/api/types/DataType;Lorg/platanios/tensorflow/api/core/Shape;Lorg/platanios/tensorflow/api/ops/variables/Initializer;Lorg/platanios/tensorflow/api/ops/variables/Regularizer;ZLorg/platanios/tensorflow/api/ops/variables/Reuse;Lscala/collection/immutable/Set;Lscala/Function1;)Lorg/platanios/tensorflow/api/ops/variables/Variable;+213
j org.platanios.tensorflow.api.ops.variables.Variable$.getVariable(Ljava/lang/String;Lorg/platanios/tensorflow/api/types/DataType;Lorg/platanios/tensorflow/api/core/Shape;Lorg/platanios/tensorflow/api/ops/variables/Initializer;Lorg/platanios/tensorflow/api/ops/variables/Regularizer;ZLorg/platanios/tensorflow/api/ops/variables/Reuse;Lscala/collection/immutable/Set;Lscala/Function1;)Lorg/platanios/tensorflow/api/ops/variables/Variable;+39
j org.platanios.tensorflow.api.learn.layers.Linear.$anonfun$forward$3(Lorg/platanios/tensorflow/api/learn/layers/Linear;Lorg/platanios/tensorflow/api/ops/Output;)Lorg/platanios/tensorflow/api/ops/Output;+148
j org.platanios.tensorflow.api.learn.layers.Linear$$Lambda$41.apply(Ljava/lang/Object;)Ljava/lang/Object;+8
j org.platanios.tensorflow.api.learn.layers.NetworkLayer.forwardWithContext(Ljava/lang/Object;Lscala/collection/immutable/List;)Ljava/lang/Object;+488
j org.platanios.tensorflow.api.learn.layers.NetworkLayer.$anonfun$callProxy$1(Lorg/platanios/tensorflow/api/learn/layers/NetworkLayer;Ljava/lang/Object;)Ljava/lang/Object;+6
j org.platanios.tensorflow.api.learn.layers.NetworkLayer$$Lambda$307.apply(Ljava/lang/Object;)Ljava/lang/Object;+5
j org.platanios.tensorflow.api.learn.layers.CachedLayer.$anonfun$call$3(Lorg/platanios/tensorflow/api/learn/layers/CachedLayer;Ljava/lang/Object;)Ljava/lang/Object;+7
j org.platanios.tensorflow.api.learn.layers.CachedLayer$$Lambda$306.apply()Ljava/lang/Object;+8
j scala.collection.mutable.HashMap.getOrElseUpdate(Ljava/lang/Object;Lscala/Function0;)Ljava/lang/Object;+40
j org.platanios.tensorflow.api.learn.layers.CachedLayer.$anonfun$call$2(Lorg/platanios/tensorflow/api/learn/layers/CachedLayer;Ljava/lang/Object;)Ljava/lang/Object;+14
j org.platanios.tensorflow.api.learn.layers.CachedLayer$$Lambda$37.apply(Ljava/lang/Object;)Ljava/lang/Object;+5
j org.platanios.tensorflow.api.learn.layers.ComposedLayer.$anonfun$call$5(Lorg/platanios/tensorflow/api/learn/layers/ComposedLayer;Ljava/lang/Object;)Ljava/lang/Object;+24
j org.platanios.tensorflow.api.learn.layers.ComposedLayer$$Lambda$40.apply(Ljava/lang/Object;)Ljava/lang/Object;+5
j org.platanios.tensorflow.api.learn.layers.ComposedLayer.$anonfun$call$5(Lorg/platanios/tensorflow/api/learn/layers/ComposedLayer;Ljava/lang/Object;)Ljava/lang/Object;+19
j org.platanios.tensorflow.api.learn.layers.ComposedLayer$$Lambda$40.apply(Ljava/lang/Object;)Ljava/lang/Object;+5
j org.platanios.tensorflow.api.learn.layers.ComposedLayer.$anonfun$call$5(Lorg/platanios/tensorflow/api/learn/layers/ComposedLayer;Ljava/lang/Object;)Ljava/lang/Object;+19
j org.platanios.tensorflow.api.learn.layers.ComposedLayer$$Lambda$40.apply(Ljava/lang/Object;)Ljava/lang/Object;+5
j org.platanios.tensorflow.api.learn.layers.ComposedLayer.$anonfun$call$5(Lorg/platanios/tensorflow/api/learn/layers/ComposedLayer;Ljava/lang/Object;)Ljava/lang/Object;+19
j org.platanios.tensorflow.api.learn.layers.ComposedLayer$$Lambda$40.apply(Ljava/lang/Object;)Ljava/lang/Object;+5
j org.platanios.tensorflow.api.learn.layers.ComposedLayer.$anonfun$call$5(Lorg/platanios/tensorflow/api/learn/layers/ComposedLayer;Ljava/lang/Object;)Ljava/lang/Object;+19
j org.platanios.tensorflow.api.learn.layers.ComposedLayer$$Lambda$40.apply(Ljava/lang/Object;)Ljava/lang/Object;+5
j org.platanios.tensorflow.api.learn.layers.ComposedLayer.$anonfun$call$5(Lorg/platanios/tensorflow/api/learn/layers/ComposedLayer;Ljava/lang/Object;)Ljava/lang/Object;+19
j org.platanios.tensorflow.api.learn.layers.ComposedLayer$$Lambda$40.apply(Ljava/lang/Object;)Ljava/lang/Object;+5
j org.platanios.tensorflow.api.learn.layers.ComposedLayer.$anonfun$call$5(Lorg/platanios/tensorflow/api/learn/layers/ComposedLayer;Ljava/lang/Object;)Ljava/lang/Object;+19
j org.platanios.tensorflow.api.learn.layers.ComposedLayer$$Lambda$40.apply(Ljava/lang/Object;)Ljava/lang/Object;+5
j org.platanios.tensorflow.api.learn.layers.Layer.apply(Ljava/lang/Object;)Ljava/lang/Object;+7
j org.platanios.tensorflow.api.learn.layers.Layer.apply$(Lorg/platanios/tensorflow/api/learn/layers/Layer;Ljava/lang/Object;)Ljava/lang/Object;+2
j org.platanios.tensorflow.api.learn.layers.ComposedLayer.apply(Ljava/lang/Object;)Ljava/lang/Object;+2
j org.platanios.tensorflow.api.learn.SimpleTrainableModel.$anonfun$buildTrainOps$1(Lorg/platanios/tensorflow/api/learn/SimpleTrainableModel;)Lorg/platanios/tensorflow/api/learn/Model$TrainOps;+35
j org.platanios.tensorflow.api.learn.SimpleTrainableModel$$Lambda$298.apply()Ljava/lang/Object;+4
j scala.util.DynamicVariable.withValue(Ljava/lang/Object;Lscala/Function0;)Ljava/lang/Object;+14
j org.platanios.tensorflow.api.ops.Op$.createWith(Lorg/platanios/tensorflow/api/core/Graph;Ljava/lang/String;Ljava/lang/String;Lscala/Function1;Lscala/collection/immutable/Set;Lscala/collection/immutable/Set;Lscala/collection/immutable/Map;Ljava/lang/String;Lscala/Function0;Lscala/util/DynamicVariable;)Ljava/lang/Object;+952
j org.platanios.tensorflow.api.learn.SimpleTrainableModel.buildTrainOps(Lorg/platanios/tensorflow/api/core/Graph;)Lorg/platanios/tensorflow/api/learn/Model$TrainOps;+58
j org.platanios.tensorflow.api.learn.Estimator.$anonfun$train$10(Lorg/platanios/tensorflow/api/learn/TrainableModel;)Lorg/platanios/tensorflow/api/learn/Model$TrainOps;+7
j org.platanios.tensorflow.api.learn.Estimator$$Lambda$297.apply()Ljava/lang/Object;+4
j scala.util.DynamicVariable.withValue(Ljava/lang/Object;Lscala/Function0;)Ljava/lang/Object;+14
j org.platanios.tensorflow.api.ops.Op$.createWithNameScope(Ljava/lang/String;Lscala/collection/immutable/Set;Lscala/Function0;Lscala/util/DynamicVariable;)Ljava/lang/Object;+369
j org.platanios.tensorflow.api.learn.Estimator.$anonfun$train$9(Lorg/platanios/tensorflow/api/learn/Estimator;Lorg/platanios/tensorflow/api/ops/io/Dataset;Lorg/platanios/tensorflow/api/config/TensorBoardConfig;Lscala/collection/mutable/ListBuffer;Lscala/collection/mutable/ListBuffer;Lorg/platanios/tensorflow/api/learn/TrainableModel;Lorg/platanios/tensorflow/api/core/Graph;)V+69
j org.platanios.tensorflow.api.learn.Estimator$$Lambda$71.apply$mcV$sp()V+28
j scala.runtime.java8.JFunction0$mcV$sp.apply()Ljava/lang/Object;+1
j scala.util.DynamicVariable.withValue(Ljava/lang/Object;Lscala/Function0;)Ljava/lang/Object;+14
j org.platanios.tensorflow.api.ops.Op$.createWith(Lorg/platanios/tensorflow/api/core/Graph;Ljava/lang/String;Ljava/lang/String;Lscala/Function1;Lscala/collection/immutable/Set;Lscala/collection/immutable/Set;Lscala/collection/immutable/Map;Ljava/lang/String;Lscala/Function0;Lscala/util/DynamicVariable;)Ljava/lang/Object;+952
j org.platanios.tensorflow.api.learn.Estimator.train(Lorg/platanios/tensorflow/api/ops/io/Dataset;Lorg/platanios/tensorflow/api/learn/StopCriteria;Lscala/collection/Seq;Lscala/collection/Seq;Lorg/platanios/tensorflow/api/config/TensorBoardConfig;)V+280
j org.platanios.tensorflow.examples.MNIST$.main([Ljava/lang/String;)V+1235
j org.platanios.tensorflow.examples.MNIST.main([Ljava/lang/String;)V+4
v ~StubRoutines::call_stub
V [libjvm.dylib+0x2e036e] JavaCalls::call_helper(JavaValue*, methodHandle*, JavaCallArguments*, Thread*)+0x6ae
V [libjvm.dylib+0x316a7a] jni_invoke_static(JNIEnv_*, JavaValue*, _jobject*, JNICallType, _jmethodID*, JNI_ArgumentPusher*, Thread*)+0x1bf
V [libjvm.dylib+0x30f7f4] jni_CallStaticVoidMethod+0x15d
C [java+0x39ae] JavaMain+0x9b1
C [libsystem_pthread.dylib+0x399d] _pthread_body+0x83
C [libsystem_pthread.dylib+0x391a] _pthread_body+0x0
C [libsystem_pthread.dylib+0x1351] thread_start+0xd
C 0x0000000000000000
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j org.platanios.tensorflow.jni.Graph$.ops(J)[J+0
j org.platanios.tensorflow.api.core.Graph.ops()[Lorg/platanios/tensorflow/api/ops/Op;+21
j org.platanios.tensorflow.api.ops.Op$.currentGraphRandomSeed(Lscala/Option;)Lscala/Tuple2;+356
j org.platanios.tensorflow.api.ops.Random.$anonfun$randomNormal$1(Lorg/platanios/tensorflow/api/types/DataType;Lorg/platanios/tensorflow/api/ops/Output;Lorg/platanios/tensorflow/api/ops/Output;Lorg/platanios/tensorflow/api/ops/Output;Lscala/Option;Ljava/lang/String;)Lorg/platanios/tensorflow/api/ops/Output;+55
j org.platanios.tensorflow.api.ops.Random$$Lambda$317.apply()Ljava/lang/Object;+24
j scala.util.DynamicVariable.withValue(Ljava/lang/Object;Lscala/Function0;)Ljava/lang/Object;+14
j org.platanios.tensorflow.api.ops.Op$.createWithNameScope(Ljava/lang/String;Lscala/collection/immutable/Set;Lscala/Function0;Lscala/util/DynamicVariable;)Ljava/lang/Object;+243
j org.platanios.tensorflow.api.ops.Random.randomNormal(Lorg/platanios/tensorflow/api/types/DataType;Lorg/platanios/tensorflow/api/ops/Output;Lorg/platanios/tensorflow/api/ops/Output;Lorg/platanios/tensorflow/api/ops/Output;Lscala/Option;Ljava/lang/String;)Lorg/platanios/tensorflow/api/ops/Output;+209
j org.platanios.tensorflow.api.ops.Random.randomNormal$(Lorg/platanios/tensorflow/api/ops/Random;Lorg/platanios/tensorflow/api/types/DataType;Lorg/platanios/tensorflow/api/ops/Output;Lorg/platanios/tensorflow/api/ops/Output;Lorg/platanios/tensorflow/api/ops/Output;Lscala/Option;Ljava/lang/String;)Lorg/platanios/tensorflow/api/ops/Output;+10
j org.platanios.tensorflow.api.ops.Random$.randomNormal(Lorg/platanios/tensorflow/api/types/DataType;Lorg/platanios/tensorflow/api/ops/Output;Lorg/platanios/tensorflow/api/ops/Output;Lorg/platanios/tensorflow/api/ops/Output;Lscala/Option;Ljava/lang/String;)Lorg/platanios/tensorflow/api/ops/Output;+10
j org.platanios.tensorflow.api.ops.variables.RandomNormalInitializer.initialValue(Lorg/platanios/tensorflow/api/types/DataType;Lorg/platanios/tensorflow/api/core/Shape;Lorg/platanios/tensorflow/api/ops/variables/Variable$PartitionInformation;)Lorg/platanios/tensorflow/api/ops/Output;+42
j org.platanios.tensorflow.api.ops.variables.Initializer.apply(Lorg/platanios/tensorflow/api/types/DataType;Lorg/platanios/tensorflow/api/core/Shape;Lorg/platanios/tensorflow/api/ops/variables/Variable$PartitionInformation;)Lorg/platanios/tensorflow/api/ops/Output;+4
j org.platanios.tensorflow.api.ops.variables.Initializer.apply$(Lorg/platanios/tensorflow/api/ops/variables/Initializer;Lorg/platanios/tensorflow/api/types/DataType;Lorg/platanios/tensorflow/api/core/Shape;Lorg/platanios/tensorflow/api/ops/variables/Variable$PartitionInformation;)Lorg/platanios/tensorflow/api/ops/Output;+4
j org.platanios.tensorflow.api.ops.variables.RandomNormalInitializer.apply(Lorg/platanios/tensorflow/api/types/DataType;Lorg/platanios/tensorflow/api/core/Shape;Lorg/platanios/tensorflow/api/ops/variables/Variable$PartitionInformation;)Lorg/platanios/tensorflow/api/ops/Output;+4
j org.platanios.tensorflow.api.ops.variables.Variable$.$anonfun$apply$3(Lorg/platanios/tensorflow/api/ops/variables/Initializer;Lorg/platanios/tensorflow/api/types/DataType;Lorg/platanios/tensorflow/api/core/Shape;)Lorg/platanios/tensorflow/api/ops/Output;+4
j org.platanios.tensorflow.api.ops.variables.Variable$$$Lambda$275.apply()Ljava/lang/Object;+12
j scala.util.DynamicVariable.withValue(Ljava/lang/Object;Lscala/Function0;)Ljava/lang/Object;+14
j org.platanios.tensorflow.api.ops.Op$.createWith(Lorg/platanios/tensorflow/api/core/Graph;Ljava/lang/String;Ljava/lang/String;Lscala/Function1;Lscala/collection/immutable/Set;Lscala/collection/immutable/Set;Lscala/collection/immutable/Map;Ljava/lang/String;Lscala/Function0;Lscala/util/DynamicVariable;)Ljava/lang/Object;+952
j org.platanios.tensorflow.api.ops.variables.Variable$.$anonfun$apply$2(Lorg/platanios/tensorflow/api/ops/variables/Initializer;ZLscala/collection/immutable/Set;Lscala/Function1;Lorg/platanios/tensorflow/api/types/DataType;Lorg/platanios/tensorflow/api/core/Shape;)Lorg/platanios/tensorflow/api/ops/variables/Variable;+193
j org.platanios.tensorflow.api.ops.variables.Variable$$$Lambda$82.apply()Ljava/lang/Object;+24
j scala.util.DynamicVariable.withValue(Ljava/lang/Object;Lscala/Function0;)Ljava/lang/Object;+14
j org.platanios.tensorflow.api.ops.Op$.createWith(Lorg/platanios/tensorflow/api/core/Graph;Ljava/lang/String;Ljava/lang/String;Lscala/Function1;Lscala/collection/immutable/Set;Lscala/collection/immutable/Set;Lscala/collection/immutable/Map;Ljava/lang/String;Lscala/Function0;Lscala/util/DynamicVariable;)Ljava/lang/Object;+952
j org.platanios.tensorflow.api.ops.variables.Variable$.apply(Lorg/platanios/tensorflow/api/ops/variables/Initializer;Lorg/platanios/tensorflow/api/types/DataType;Lorg/platanios/tensorflow/api/core/Shape;ZLscala/collection/immutable/Set;Lscala/Function1;Ljava/lang/String;)Lorg/platanios/tensorflow/api/ops/variables/Variable;+178
j org.platanios.tensorflow.api.ops.variables.VariableStore$$anon$1.apply(Ljava/lang/String;Lorg/platanios/tensorflow/api/types/DataType;Lorg/platanios/tensorflow/api/core/Shape;Lorg/platanios/tensorflow/api/ops/variables/Initializer;Lorg/platanios/tensorflow/api/ops/variables/Regularizer;ZLorg/platanios/tensorflow/api/ops/variables/Reuse;Lscala/collection/immutable/Set;Lscala/Function1;Lorg/platanios/tensorflow/api/ops/variables/Variable$VariableGetter;)Lorg/platanios/tensorflow/api/ops/variables/Variable;+800
j org.platanios.tensorflow.api.ops.variables.VariableStore.getVariable(Ljava/lang/String;Lorg/platanios/tensorflow/api/types/DataType;Lorg/platanios/tensorflow/api/core/Shape;Lorg/platanios/tensorflow/api/ops/variables/Initializer;Lorg/platanios/tensorflow/api/ops/variables/Regularizer;ZLorg/platanios/tensorflow/api/ops/variables/Reuse;Lscala/collection/immutable/Set;Lscala/Function1;Lorg/platanios/tensorflow/api/ops/variables/Variable$VariableGetter;)Lorg/platanios/tensorflow/api/ops/variables/Variable;+60
j org.platanios.tensorflow.api.ops.variables.VariableScope.$anonfun$getVariable$1(Lorg/platanios/tensorflow/api/ops/variables/VariableStore;Lorg/platanios/tensorflow/api/types/DataType;Lorg/platanios/tensorflow/api/core/Shape;Lorg/platanios/tensorflow/api/ops/variables/Initializer;Lorg/platanios/tensorflow/api/ops/variables/Regularizer;ZLorg/platanios/tensorflow/api/ops/variables/Reuse;Lscala/collection/immutable/Set;Lscala/Function1;Ljava/lang/String;)Lorg/platanios/tensorflow/api/ops/variables/Variable;+20
j org.platanios.tensorflow.api.ops.variables.VariableScope$$Lambda$80.apply()Ljava/lang/Object;+40
j scala.util.DynamicVariable.withValue(Ljava/lang/Object;Lscala/Function0;)Ljava/lang/Object;+14
j org.platanios.tensorflow.api.ops.Op$.createWith(Lorg/platanios/tensorflow/api/core/Graph;Ljava/lang/String;Ljava/lang/String;Lscala/Function1;Lscala/collection/immutable/Set;Lscala/collection/immutable/Set;Lscala/collection/immutable/Map;Ljava/lang/String;Lscala/Function0;Lscala/util/DynamicVariable;)Ljava/lang/Object;+952
j org.platanios.tensorflow.api.ops.variables.VariableScope.getVariable(Lorg/platanios/tensorflow/api/ops/variables/VariableStore;Ljava/lang/String;Lorg/platanios/tensorflow/api/types/DataType;Lorg/platanios/tensorflow/api/core/Shape;Lorg/platanios/tensorflow/api/ops/variables/Initializer;Lorg/platanios/tensorflow/api/ops/variables/Regularizer;ZLorg/platanios/tensorflow/api/ops/variables/Reuse;Lscala/collection/immutable/Set;Lscala/Function1;)Lorg/platanios/tensorflow/api/ops/variables/Variable;+213
j org.platanios.tensorflow.api.ops.variables.Variable$.getVariable(Ljava/lang/String;Lorg/platanios/tensorflow/api/types/DataType;Lorg/platanios/tensorflow/api/core/Shape;Lorg/platanios/tensorflow/api/ops/variables/Initializer;Lorg/platanios/tensorflow/api/ops/variables/Regularizer;ZLorg/platanios/tensorflow/api/ops/variables/Reuse;Lscala/collection/immutable/Set;Lscala/Function1;)Lorg/platanios/tensorflow/api/ops/variables/Variable;+39
j org.platanios.tensorflow.api.learn.layers.Linear.$anonfun$forward$3(Lorg/platanios/tensorflow/api/learn/layers/Linear;Lorg/platanios/tensorflow/api/ops/Output;)Lorg/platanios/tensorflow/api/ops/Output;+148
j org.platanios.tensorflow.api.learn.layers.Linear$$Lambda$41.apply(Ljava/lang/Object;)Ljava/lang/Object;+8
j org.platanios.tensorflow.api.learn.layers.NetworkLayer.forwardWithContext(Ljava/lang/Object;Lscala/collection/immutable/List;)Ljava/lang/Object;+488
j org.platanios.tensorflow.api.learn.layers.NetworkLayer.$anonfun$callProxy$1(Lorg/platanios/tensorflow/api/learn/layers/NetworkLayer;Ljava/lang/Object;)Ljava/lang/Object;+6
j org.platanios.tensorflow.api.learn.layers.NetworkLayer$$Lambda$307.apply(Ljava/lang/Object;)Ljava/lang/Object;+5
j org.platanios.tensorflow.api.learn.layers.CachedLayer.$anonfun$call$3(Lorg/platanios/tensorflow/api/learn/layers/CachedLayer;Ljava/lang/Object;)Ljava/lang/Object;+7
j org.platanios.tensorflow.api.learn.layers.CachedLayer$$Lambda$306.apply()Ljava/lang/Object;+8
j scala.collection.mutable.HashMap.getOrElseUpdate(Ljava/lang/Object;Lscala/Function0;)Ljava/lang/Object;+40
j org.platanios.tensorflow.api.learn.layers.CachedLayer.$anonfun$call$2(Lorg/platanios/tensorflow/api/learn/layers/CachedLayer;Ljava/lang/Object;)Ljava/lang/Object;+14
j org.platanios.tensorflow.api.learn.layers.CachedLayer$$Lambda$37.apply(Ljava/lang/Object;)Ljava/lang/Object;+5
j org.platanios.tensorflow.api.learn.layers.ComposedLayer.$anonfun$call$5(Lorg/platanios/tensorflow/api/learn/layers/ComposedLayer;Ljava/lang/Object;)Ljava/lang/Object;+24
j org.platanios.tensorflow.api.learn.layers.ComposedLayer$$Lambda$40.apply(Ljava/lang/Object;)Ljava/lang/Object;+5
j org.platanios.tensorflow.api.learn.layers.ComposedLayer.$anonfun$call$5(Lorg/platanios/tensorflow/api/learn/layers/ComposedLayer;Ljava/lang/Object;)Ljava/lang/Object;+19
j org.platanios.tensorflow.api.learn.layers.ComposedLayer$$Lambda$40.apply(Ljava/lang/Object;)Ljava/lang/Object;+5
j org.platanios.tensorflow.api.learn.layers.ComposedLayer.$anonfun$call$5(Lorg/platanios/tensorflow/api/learn/layers/ComposedLayer;Ljava/lang/Object;)Ljava/lang/Object;+19
j org.platanios.tensorflow.api.learn.layers.ComposedLayer$$Lambda$40.apply(Ljava/lang/Object;)Ljava/lang/Object;+5
j org.platanios.tensorflow.api.learn.layers.ComposedLayer.$anonfun$call$5(Lorg/platanios/tensorflow/api/learn/layers/ComposedLayer;Ljava/lang/Object;)Ljava/lang/Object;+19
j org.platanios.tensorflow.api.learn.layers.ComposedLayer$$Lambda$40.apply(Ljava/lang/Object;)Ljava/lang/Object;+5
j org.platanios.tensorflow.api.learn.layers.ComposedLayer.$anonfun$call$5(Lorg/platanios/tensorflow/api/learn/layers/ComposedLayer;Ljava/lang/Object;)Ljava/lang/Object;+19
j org.platanios.tensorflow.api.learn.layers.ComposedLayer$$Lambda$40.apply(Ljava/lang/Object;)Ljava/lang/Object;+5
j org.platanios.tensorflow.api.learn.layers.ComposedLayer.$anonfun$call$5(Lorg/platanios/tensorflow/api/learn/layers/ComposedLayer;Ljava/lang/Object;)Ljava/lang/Object;+19
j org.platanios.tensorflow.api.learn.layers.ComposedLayer$$Lambda$40.apply(Ljava/lang/Object;)Ljava/lang/Object;+5
j org.platanios.tensorflow.api.learn.layers.ComposedLayer.$anonfun$call$5(Lorg/platanios/tensorflow/api/learn/layers/ComposedLayer;Ljava/lang/Object;)Ljava/lang/Object;+19
j org.platanios.tensorflow.api.learn.layers.ComposedLayer$$Lambda$40.apply(Ljava/lang/Object;)Ljava/lang/Object;+5
j org.platanios.tensorflow.api.learn.layers.Layer.apply(Ljava/lang/Object;)Ljava/lang/Object;+7
j org.platanios.tensorflow.api.learn.layers.Layer.apply$(Lorg/platanios/tensorflow/api/learn/layers/Layer;Ljava/lang/Object;)Ljava/lang/Object;+2
j org.platanios.tensorflow.api.learn.layers.ComposedLayer.apply(Ljava/lang/Object;)Ljava/lang/Object;+2
j org.platanios.tensorflow.api.learn.SimpleTrainableModel.$anonfun$buildTrainOps$1(Lorg/platanios/tensorflow/api/learn/SimpleTrainableModel;)Lorg/platanios/tensorflow/api/learn/Model$TrainOps;+35
j org.platanios.tensorflow.api.learn.SimpleTrainableModel$$Lambda$298.apply()Ljava/lang/Object;+4
j scala.util.DynamicVariable.withValue(Ljava/lang/Object;Lscala/Function0;)Ljava/lang/Object;+14
j org.platanios.tensorflow.api.ops.Op$.createWith(Lorg/platanios/tensorflow/api/core/Graph;Ljava/lang/String;Ljava/lang/String;Lscala/Function1;Lscala/collection/immutable/Set;Lscala/collection/immutable/Set;Lscala/collection/immutable/Map;Ljava/lang/String;Lscala/Function0;Lscala/util/DynamicVariable;)Ljava/lang/Object;+952
j org.platanios.tensorflow.api.learn.SimpleTrainableModel.buildTrainOps(Lorg/platanios/tensorflow/api/core/Graph;)Lorg/platanios/tensorflow/api/learn/Model$TrainOps;+58
j org.platanios.tensorflow.api.learn.Estimator.$anonfun$train$10(Lorg/platanios/tensorflow/api/learn/TrainableModel;)Lorg/platanios/tensorflow/api/learn/Model$TrainOps;+7
j org.platanios.tensorflow.api.learn.Estimator$$Lambda$297.apply()Ljava/lang/Object;+4
j scala.util.DynamicVariable.withValue(Ljava/lang/Object;Lscala/Function0;)Ljava/lang/Object;+14
j org.platanios.tensorflow.api.ops.Op$.createWithNameScope(Ljava/lang/String;Lscala/collection/immutable/Set;Lscala/Function0;Lscala/util/DynamicVariable;)Ljava/lang/Object;+369
j org.platanios.tensorflow.api.learn.Estimator.$anonfun$train$9(Lorg/platanios/tensorflow/api/learn/Estimator;Lorg/platanios/tensorflow/api/ops/io/Dataset;Lorg/platanios/tensorflow/api/config/TensorBoardConfig;Lscala/collection/mutable/ListBuffer;Lscala/collection/mutable/ListBuffer;Lorg/platanios/tensorflow/api/learn/TrainableModel;Lorg/platanios/tensorflow/api/core/Graph;)V+69
j org.platanios.tensorflow.api.learn.Estimator$$Lambda$71.apply$mcV$sp()V+28
j scala.runtime.java8.JFunction0$mcV$sp.apply()Ljava/lang/Object;+1
j scala.util.DynamicVariable.withValue(Ljava/lang/Object;Lscala/Function0;)Ljava/lang/Object;+14
j org.platanios.tensorflow.api.ops.Op$.createWith(Lorg/platanios/tensorflow/api/core/Graph;Ljava/lang/String;Ljava/lang/String;Lscala/Function1;Lscala/collection/immutable/Set;Lscala/collection/immutable/Set;Lscala/collection/immutable/Map;Ljava/lang/String;Lscala/Function0;Lscala/util/DynamicVariable;)Ljava/lang/Object;+952
j org.platanios.tensorflow.api.learn.Estimator.train(Lorg/platanios/tensorflow/api/ops/io/Dataset;Lorg/platanios/tensorflow/api/learn/StopCriteria;Lscala/collection/Seq;Lscala/collection/Seq;Lorg/platanios/tensorflow/api/config/TensorBoardConfig;)V+280
j org.platanios.tensorflow.examples.MNIST$.main([Ljava/lang/String;)V+1235
j org.platanios.tensorflow.examples.MNIST.main([Ljava/lang/String;)V+4
v ~StubRoutines::call_stub
@eaplatanios No it was not on the node_def_fix branch. I run now the bazel (version 0.5.4) command on node_def_fix and the computation give me this error:
[user@host tensorflow_eaplatanios] [node_def_fix ≡]$
bazel build --config=opt //tensorflow:libtensorflow.so
..............................
WARNING: /Users/databiz/Desktop/tensorflow_eaplatanios/tensorflow/core/BUILD:1785:1: in includes attribute of cc_library rule //tensorflow/core:framework_headers_lib: '../../external/nsync/public' resolves to 'external/nsync/public' not below the relative path of its package 'tensorflow/core'. This will be an error in the future. Since this rule was created by the macro 'cc_header_only_library', the error might have been caused by the macro implementation in /Users/databiz/Desktop/tensorflow_eaplatanios/tensorflow/tensorflow.bzl:1048:30.
INFO: Found 1 target...
INFO: From Compiling external/protobuf_archive/src/google/protobuf/compiler/js/embed.cc [for host]:
external/protobuf_archive/src/google/protobuf/compiler/js/embed.cc:37:12: warning: unused variable 'output_file' [-Wunused-const-variable]
const char output_file[] = "well_known_types_embed.cc";
^
1 warning generated.
ERROR: /private/var/tmp/_bazel_databiz/44eaa5dd8cdca5c856d36f16274cd22a/external/nsync/BUILD:397:1: C++ compilation of rule '@nsync//:nsync_cpp' failed (Exit 1).
In file included from external/nsync/platform/posix/src/per_thread_waiter.c:15:
In file included from ./external/nsync//internal/headers.h:19:
In file included from ./external/nsync//platform/c++11/platform.h:29:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/mutex:189:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/__mutex_base:17:
/Library/Developer/CommandLineTools/usr/include/c++/v1/__threading_support:166:1: error: unknown type name 'mach_port_t'
mach_port_t __libcpp_thread_get_port();
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/__threading_support:310:1: error: unknown type name 'mach_port_t'
mach_port_t __libcpp_thread_get_port() {
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/__threading_support:311:12: error: use of undeclared identifier 'pthread_mach_thread_np'
return pthread_mach_thread_np(pthread_self());
^
3 errors generated.
Target //tensorflow:libtensorflow.so failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 221.388s, Critical Path: 18.92s
The operative system is MaxOS Sierra 10.12.6
@sujitbiswas I cannot reproduce the error you're getting. Which branch did you use to compile the TensorFlow library? Did you use the node_def_fix
branch from my fork?
@lucaRadicalbit That's a bizarre error. It looks like it's the same problem as the one described here. Can you try adding the following lines in the beginning of the file /Library/Developer/CommandLineTools/usr/include/c++/v1/__threading_support
:
#ifndef _MACH_PORT_T
#define _MACH_PORT_T
#include <sys/_types.h> /* __darwin_mach_port_t */
typedef __darwin_mach_port_t mach_port_t;
#include <pthread.h>
mach_port_t pthread_mach_thread_np(pthread_t);
#endif /* _MACH_PORT_T */
@eaplatanios i just realized that running using maven, cause the problem, note SBT run works fine, the maven details are as below
mvn exec:java -Dexec.mainClass="org.platanios.tensorflow.examples.MNIST"
<dependencies>
<dependency>
<groupId>org.platanios</groupId>
<artifactId>tensorflow_2.12</artifactId>
<version>0.1.0-SNAPSHOT</version>
<classifier>darwin-cpu-x86_64</classifier>
</dependency>
</dependencies>
<repositories>
<repository>
<id>sonatypepublic</id>
<name>sonatype-public</name>
<url>https://oss.sonatype.org/content/repositories/public/</url>
<layout>default</layout>
<snapshots><enabled>true</enabled></snapshots>
</repository>
<repository>
<id>bintrayscalazreleases</id>
<name>bintray-scalaz-releases</name>
<url>https://dl.bintray.com/scalaz/releases/</url>
<layout>default</layout>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
the following works fine
scalaVersion := "2.12.3"
libraryDependencies += "org.platanios" %% "tensorflow" % "0.1.0-SNAPSHOT" classifier "darwin-cpu-x86_64"
resolvers ++= Seq(
Resolver.sonatypeRepo("public"),
Resolver.bintrayRepo("scalaz", "releases")
)
@sujitbiswas That's interesting. I'm not familiar with Maven and so I don't really know why there is a problem. Do you have any idea why this is happening?
@eaplatanios not sure what is causing the issue while running with maven, will update if i am able to resolve
@sujitbiswas That's great! Thanks! :)
@eaplatanios Adding the line you suggest in the /Library/Developer/CommandLineTools/usr/include/c++/v1/__threading_support
file and using the commit 2878bd1e1
(tag node_def_fix) the compile of the tensor flow library works !!
That’s good to hear! This is an issue with the compiler and it affects the native TensorFlow library. I don’t think there’s anything we can do on our side to fix this, but I think this fix should suffice for now.
On Oct 24, 2017, 12:31 PM -0400, Luca Tagliabue notifications@github.com, wrote:
@eaplatanios Adding the line you suggest in the /Library/Developer/CommandLineTools/usr/include/c++/v1/__threading_support file and using the commit 2878bd1e1 (tag node_def_fix) the compile of the tensor flow library works !! — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
I am running this on mac os, can you please help