Skip to content

Commit

Permalink
Patch dSFMT.h, so that it can be used from julia.
Browse files Browse the repository at this point in the history
  • Loading branch information
Viral Shah committed Jul 7, 2011
1 parent f26a3c5 commit 500b092
Show file tree
Hide file tree
Showing 3 changed files with 652 additions and 31 deletions.
5 changes: 4 additions & 1 deletion external/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,14 @@ random/dsfmt-$(DSFMT_VER)/Makefile: random/dsfmt-$(DSFMT_VER).tar.gz
cd random && \
mkdir -p dsfmt-$(DSFMT_VER) && \
tar -C dsfmt-$(DSFMT_VER) --strip-components 1 -xf dsfmt-$(DSFMT_VER).tar.gz && \
cp dSFMT.h dsfmt-$(DSFMT_VER) && \
tar zxf mt19937-64.tgz
touch $@
$(DSFMT_OBJ_SOURCE): random/dsfmt-$(DSFMT_VER)/Makefile
cd random && \
$(CC) -O3 -finline-functions -fomit-frame-pointer -DNDEBUG -fno-strict-aliasing --param max-inline-insns-single=1800 -Wmissing-prototypes -Wall -std=c99 -DDSFMT_MEXP=19937 -fPIC -shared jl_random.c dsfmt-2.1/dSFMT.c -I mt19937-64 mt19937-64/mt19937-64.c -o libMT.$(SHLIB_EXT)
$(CC) -O3 -finline-functions -fomit-frame-pointer -DNDEBUG -fno-strict-aliasing --param max-inline-insns-single=1800 -Wmissing-prototypes -Wall -std=c99 -DDSFMT_MEXP=19937 -fPIC -shared -DDSFMT_DO_NOT_USE_OLD_NAMES jl_random.c -I dSFMT dsfmt-$(DSFMT_VER)/dSFMT.c -o libMT.$(SHLIB_EXT)
# $(CC) -Wall -std=c99 -DDSFMT_MEXP=19937 -fPIC -shared -DDSFMT_DO_NOT_USE_OLD_NAMES jl_random.c dsfmt-2.1/dSFMT.c -I mt19937-64 mt19937-64/mt19937-64.c -o libMT.$(SHLIB_EXT)

$(DSFMT_OBJ_TARGET): $(DSFMT_OBJ_SOURCE)
mkdir -p $(EXTROOTLIB)
cp $< $@
Expand Down
Loading

5 comments on commit 500b092

@StefanKarpinski
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: this commit completely broke my build:

dlsym: dlsym(0x113321640, dsfmt_gv_init_gen_rand): symbol not found /Users/stefan/projects/julia/j/sysimg.j:49

@StefanKarpinski
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to be fine if I delete external/random do git co -f to get the committed files back and then do make. So it's a broken makefile situation again. Sigh.

@StefanKarpinski
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woah. Our random matrix stats are fast now. Awesome. Nice work, Viral.

@ViralBShah
Copy link
Member

@ViralBShah ViralBShah commented on 500b092 Jul 7, 2011 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ViralBShah
Copy link
Member

@ViralBShah ViralBShah commented on 500b092 Jul 7, 2011 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.