Skip to content

Shootout pidigits code, new shootout directory in examples and moved existing shootout code to it #700

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 12, 2012

Conversation

yledu
Copy link
Contributor

@yledu yledu commented Apr 11, 2012

yledu added 3 commits April 11, 2012 11:56
…e examples; it is a straighforward rewrite of the Python version available on the shootout. Also had to modify the bigint.jl module and corresponding gmp_wrapper.c in order to make 'divmod' and 'lshift' available. Without the printouts (commented out in the code), the speed is on par with Python -- use the timeit macro now available in timing.jl (also in shootout directory) and adapted from perf.jl. Also moved fasta.jl to that new shootout directory.
…Also: added some documentation for pidigits ; added an option to print the intermediate digits as requested by the shootout, leaving it as a non-default option because printing is so slow in Julia compared to Python...
@yledu yledu closed this Apr 11, 2012
@yledu yledu reopened this Apr 11, 2012
@@ -0,0 +1,78 @@
#Assume running from julia base dir
Copy link
Member

Choose a reason for hiding this comment

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

Makes no such assumption; timing.jl is in . and bigint.jl will be on the search path regardless. You can drop this comment.

@pao
Copy link
Member

pao commented Apr 11, 2012

Someone also needs to find out if the libgmp_wrapper.c change gets picked up by make. Will need to pull this into a local branch of master and make without cleaning external first. I won't be able to do it for ~14h or so.

Thanks @yledu, I think this is close pending the dlopen() issue and knowledge of whether we need to either fix the makefiles or send a special note out to -dev (or hopefully neither).

@pao
Copy link
Member

pao commented Apr 11, 2012

And note that since this is now a pull request on a branch (instead of a single commit), you can push new commits with any additional changes onto this branch on Github and they'll automagically show up here.

@StefanKarpinski
Copy link
Member

Thanks, @yledu. @pao: if you're happy with this, go ahead and merge it.

@pao
Copy link
Member

pao commented Apr 12, 2012

Doesn't run right now but that's due to an unrelated issue with printf(). No reason to delay this.

pao added a commit that referenced this pull request Apr 12, 2012
Shootout pidigits code, new shootout directory in examples and moved existing shootout code to it
@pao pao merged commit 1bc6857 into JuliaLang:master Apr 12, 2012
@StefanKarpinski
Copy link
Member

Oops. I get the following error on make testall in the BigInt tests:

     * bigint
dlopen(libgmp_wrapper.so.bundle, 2): image not found
could not load module libgmp_wrapper.so
 in dlopen at base.jl:94
 in include at /Users/stefan/projects/julia/src/boot.jl:198
 in load at util.jl:176
 in include at /Users/stefan/projects/julia/src/boot.jl:198
 in load at util.jl:176
 in runtests at ./runtests.jl:3
 in include at /Users/stefan/projects/julia/src/boot.jl:198
 in load at util.jl:176
 in include at /Users/stefan/projects/julia/src/boot.jl:198
 in load at util.jl:176
 in load at util.jl:188
 in runtests at ./runtests.jl:3
 in include at /Users/stefan/projects/julia/src/boot.jl:198
 in process_options at client.jl:175
 in _start at client.jl:213
at ../extras/bigint.jl:1
 in include at /Users/stefan/projects/julia/src/boot.jl:198
 in load at util.jl:176
 in include at /Users/stefan/projects/julia/src/boot.jl:198
 in load at util.jl:176
 in runtests at ./runtests.jl:3
 in include at /Users/stefan/projects/julia/src/boot.jl:198
 in load at util.jl:176
 in include at /Users/stefan/projects/julia/src/boot.jl:198
 in load at util.jl:176
 in load at util.jl:188
 in runtests at ./runtests.jl:3
 in include at /Users/stefan/projects/julia/src/boot.jl:198
 in process_options at client.jl:175
 in _start at client.jl:213
at bigint.jl:2
 in include at /Users/stefan/projects/julia/src/boot.jl:198
 in load at util.jl:176
 in runtests at ./runtests.jl:3
 in include at /Users/stefan/projects/julia/src/boot.jl:198
 in load at util.jl:176
 in include at /Users/stefan/projects/julia/src/boot.jl:198
 in load at util.jl:176
 in load at util.jl:188
 in runtests at ./runtests.jl:3
 in include at /Users/stefan/projects/julia/src/boot.jl:198
 in process_options at client.jl:175
 in _start at client.jl:213
at default.jl:21
 in include at /Users/stefan/projects/julia/src/boot.jl:198
 in load at util.jl:176
 in include at /Users/stefan/projects/julia/src/boot.jl:198
 in load at util.jl:176
 in load at util.jl:188
 in runtests at ./runtests.jl:3
 in include at /Users/stefan/projects/julia/src/boot.jl:198
 in process_options at client.jl:175
 in _start at client.jl:213
at all.jl:1
 in load at util.jl:199
 in runtests at ./runtests.jl:3
 in include at /Users/stefan/projects/julia/src/boot.jl:198
 in process_options at client.jl:175
 in _start at client.jl:213
at ./runtests.jl:48
 in include at /Users/stefan/projects/julia/src/boot.jl:198
 in process_options at client.jl:175
 in _start at client.jl:213
make[1]: *** [all] Error 1
make: *** [testall] Error 2

@pao
Copy link
Member

pao commented Apr 12, 2012

I hate our Makefiles. make testall WFM until it gets to perf. I didn't have to clean first, but you might want to give that a try. (The problem I ran into with printf is now #706.)

@StefanKarpinski
Copy link
Member

It doesn't show up on Linux because the .so DLL extension is correct there. On OS X it breaks. Easy fix.

@pao
Copy link
Member

pao commented Apr 12, 2012

Oh, I saw the line had changed to get rid of the hardcoded path, but didn't realize it hadn't quite made it all the way back to where it started. D'oh!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants