Commit d790e030 authored by Kai Zhang's avatar Kai Zhang

enable thread safe

parent 1baabf42
...@@ -19,9 +19,10 @@ ...@@ -19,9 +19,10 @@
#define HAVE_STRINGS_H 1 #define HAVE_STRINGS_H 1
#define HAVE_STRING_H 1 #define HAVE_STRING_H 1
#define HAVE_TLS 1
#define IGRAPH_F77_SAVE static IGRAPH_THREAD_LOCAL #define IGRAPH_F77_SAVE static IGRAPH_THREAD_LOCAL
#define IGRAPH_THREAD_LOCAL #define IGRAPH_THREAD_LOCAL __thread
#define IGRAPH_THREAD_SAFE 1 #define TLS __thread
#define INTERNAL_ARPACK 1 #define INTERNAL_ARPACK 1
#define INTERNAL_BLAS 1 #define INTERNAL_BLAS 1
...@@ -29,14 +30,15 @@ ...@@ -29,14 +30,15 @@
#define INTERNAL_GLPK 1 #define INTERNAL_GLPK 1
#define INTERNAL_LAPACK 1 #define INTERNAL_LAPACK 1
#define LT_OBJDIR ".libs/" #define LT_OBJDIR ".libs/"
#define PACKAGE "igraph" #define PACKAGE "igraph"
#define PACKAGE_BUGREPORT "igraph@igraph.org" #define PACKAGE_BUGREPORT "igraph@igraph.org"
#define PACKAGE_NAME "igraph" #define PACKAGE_NAME "igraph"
#define PACKAGE_STRING "igraph 0.8.0" #define PACKAGE_STRING "igraph 0.8.5"
#define PACKAGE_TARNAME "igraph" #define PACKAGE_TARNAME "igraph"
#define PACKAGE_URL "" #define PACKAGE_URL ""
#define PACKAGE_VERSION "0.8.0" #define PACKAGE_VERSION "0.8.5"
#define STDC_HEADERS 1 #define STDC_HEADERS 1
#define VERSION "0.8.0" #define VERSION "0.8.5"
#undef YYTEXT_POINTER #undef YYTEXT_POINTER
...@@ -150,7 +150,7 @@ communityTest = testGroup "Community" ...@@ -150,7 +150,7 @@ communityTest = testGroup "Community"
rs <- replicateM 50 $ withSeed 134 $ findCommunity zacharyKarate Nothing Nothing spinglass rs <- replicateM 50 $ withSeed 134 $ findCommunity zacharyKarate Nothing Nothing spinglass
all (== head rs) rs @=? True all (== head rs) rs @=? True
consistency2 = testCase "Consistency -- leiden" $ do consistency2 = testCase "Consistency -- leiden" $ do
rs <- replicateM 50 $ withSeed 234 $ findCommunity zacharyKarate Nothing Nothing spinglass rs <- replicateM 50 $ withSeed 234 $ findCommunity zacharyKarate Nothing Nothing leiden
True @=? all (== head rs) rs True @=? all (== head rs) rs
gr = mkGraph (replicate 10 ()) $ map (\(i,j) -> ((i,j),())) gr = mkGraph (replicate 10 ()) $ map (\(i,j) -> ((i,j),()))
[ (0, 1), (0, 2), (0, 3), (0, 4), (1, 2), (1, 3), (1, 4), (2, 3), (2, 4) [ (0, 1), (0, 2), (0, 3), (0, 4), (1, 2), (1, 3), (1, 4), (2, 3), (2, 4)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment