[julia-users] Performance regression with latest master?

2016-03-19 Thread 'Bill Hart' via julia-users
We are seeing a performance regression with a factor of 1.5 or 2.0 (depending on machine) for the following simple C interface code between 0.4.2 and today's master (not sure where the problem initially showed up, but within the last 50 days): import Base: + typealias ZZ Array{UInt, 1} functi

Re: [julia-users] Re: Performance regression with latest master?

2016-03-19 Thread 'Bill Hart' via julia-users
I can only partially bisect. The regression happens between: 75fc9104ee24 (more recent) and dc6b0de80550 (older) But few of the intervening commits actually build, so I can't refine it further. There's something like 40 commits in that range. Bill. On 16 March 2016 at 18:28, Kristoffer Carls

Re: [julia-users] Re: Performance regression with latest master?

2016-03-18 Thread 'Bill Hart' via julia-users
It's actually a regression of more than a factor of 2 on the machine I'm using. I'll try to further refine the commit range by hand today. Bill. On Wednesday, 16 March 2016 20:45:00 UTC+1, Bill Hart wrote: > > I can only partially bisect. > > The regression happens between: > > 75fc9104ee24 (mo

Re: [julia-users] Questions about the garbage collector

2016-03-15 Thread 'Bill Hart' via julia-users
> > > >> The generational part of the GC is a little messy. This is mainly > >> because the new GC was designed to be an incremental GC and then > >> gradually transformed into a generational GC... (they are > >> suprisingly similar). > >> > > > > Oh I didn't even realise that LOL. I

Re: [julia-users] Questions about the garbage collector

2016-03-15 Thread 'Bill Hart' via julia-users
On 15 March 2016 at 20:24, Yichao Yu wrote: > > I wonder what the issue was, and whether the person who fixed it even > realised they had fixed it. :-) > > There were many GC related PRs. Some of them are for mem-leak. I don't > remember any one in particular about malloc though > > > Actuall

Re: [julia-users] Questions about the garbage collector

2016-03-15 Thread 'Bill Hart' via julia-users
> > > > I see. That is a relief. We'll stick with & for now. > > > >> more than 2 collection* > > > > > > I see, so collections can happen at any time, not when some block of > memory > > is "full". > > Yes, it happens whenever the GC thinks there are enough allocation > since the last time. > So

Re: [julia-users] Questions about the garbage collector

2016-03-15 Thread 'Bill Hart' via julia-users
Good to hear the problem seems to be fixed in recent 0.5. Thanks for checking this. That gives me more motivation for fixing our code so it can run on the latest 0.5. Hopefully I can find a way. I wonder what the issue was, and whether the person who fixed it even realised they had fixed it. :-)

Re: [julia-users] Questions about the garbage collector

2016-03-15 Thread 'Bill Hart' via julia-users
On 15 March 2016 at 19:45, Bill Hart wrote: > >> > >> > I noticed in the code that it looks like things get promoted if they >> survive >> > more than 2 generations (currently). But what happens to the objects >> between >> >> more than 2 collection* >> > > I see, so collections can happen at any

Re: [julia-users] Questions about the garbage collector

2016-03-15 Thread 'Bill Hart' via julia-users
On 15 March 2016 at 19:33, Yichao Yu wrote: > On Tue, Mar 15, 2016 at 2:18 PM, 'Bill Hart' via julia-users > wrote: > > > > Thanks for your answers. Please see my followup questions below. > > > > On 15 March 2016 at 18:45, Yichao Yu wrote: > >>

Re: [julia-users] Questions about the garbage collector

2016-03-15 Thread 'Bill Hart' via julia-users
On Tuesday, 15 March 2016 19:02:41 UTC+1, Yichao Yu wrote: > > On Tue, Mar 15, 2016 at 1:45 PM, Yichao Yu > > wrote: > > > > On Mar 15, 2016 11:56 AM, "'Bill Hart' via julia-users" > > > wrote: > >> > >> We have been

Re: [julia-users] Questions about the garbage collector

2016-03-15 Thread 'Bill Hart' via julia-users
Thanks for your answers. Please see my followup questions below. On 15 March 2016 at 18:45, Yichao Yu wrote: > > On Mar 15, 2016 11:56 AM, "'Bill Hart' via julia-users" < > julia-users@googlegroups.com> wrote: > > > > We have been trying to underst

Re: [julia-users] Questions about the garbage collector

2016-03-15 Thread &#x27;Bill Hart&#x27; via julia-users
Yes, s+=i just calls the + function for bignums, which indeed creates a new BigNum object each iteration. [It would incidentally be great if we could overload += directly in Julia!! I wouldn't mind if it was required to return an immutable object because I could still return a new immutable object

Re: [julia-users] Questions about the garbage collector

2016-03-15 Thread &#x27;Bill Hart&#x27; via julia-users
Just to clarify what I meant by "Julia can't be responsible for" I was talking about the fact that the garbage collector does a gc_collect every 23mb on my machine. If memory is allocated on the C side without calling jl_gc_counted_malloc to do so, Julia can't be expected to include these a

Re: [julia-users] Questions about the garbage collector

2016-03-15 Thread &#x27;Bill Hart&#x27; via julia-users
Here is the (very primitive) example using mpn's that I mentioned. import Base: + typealias ZZ Array{UInt, 1} function +(a::ZZ, b::Int) r = ZZ(length(a)) ccall((:__gmpn_add_1, :libgmp), Void, (Ptr{UInt}, Ptr{UInt}, Int, Int), r, a, 3, b) return r end function doit(n::Int) a = ZZ(3)

Re: [julia-users] Questions about the garbage collector

2016-03-15 Thread &#x27;Bill Hart&#x27; via julia-users
On 15 March 2016 at 17:04, Yichao Yu wrote: > > On Mar 15, 2016 11:56 AM, "'Bill Hart' via julia-users" < > julia-users@googlegroups.com> wrote: > > > > We have been trying to understand the garbage collector behaviour, since > we had some code f

[julia-users] Questions about the garbage collector

2016-03-15 Thread &#x27;Bill Hart&#x27; via julia-users
We have been trying to understand the garbage collector behaviour, since we had some code for which our machine is running out of memory in a matter of an hour. We already realised that Julia isn't responsible for memory we allocate on the C side unless we use jl_gc_counted_malloc, which we now

Re: [julia-users] Re: deepcopy_internal and arrays

2016-02-26 Thread &#x27;Bill Hart&#x27; via julia-users
Thanks. I appreciate the reply. On 26 February 2016 at 09:32, Mauro wrote: > > However, could you please explain to me what is involved in updating > dict? > > I understand an ObjectIdDict is a hash table whose keys are object ID's. > > But the documentation doesn't tell me how to generate such

Re: [julia-users] Re: deepcopy_internal and arrays

2016-02-25 Thread &#x27;Bill Hart&#x27; via julia-users
Thanks. Indeed I missed this in the docs, so no ticket needs to be opened. The fact that overloading deecopy_internal is fully supported is perfectly fine. However, could you please explain to me what is involved in updating dict? I understand an ObjectIdDict is a hash table whose keys are object

Re: [julia-users] Intermittent failure on Travis in Nemo.jl? (was : Just a noob question: why are some test-failing PR merged?)

2016-02-23 Thread &#x27;Bill Hart&#x27; via julia-users
On Tuesday, 23 February 2016 15:40:50 UTC+1, Yichao Yu wrote: > > > > On Tue, Feb 23, 2016 at 9:26 AM, 'Bill Hart' via julia-users < > julia...@googlegroups.com > wrote: > >> We just had a failure of Nemo.jl on Travis on OSX which looks completely >

[julia-users] Re: deepcopy_internal and arrays

2016-02-23 Thread &#x27;Bill Hart&#x27; via julia-users
Just correcting a typo in my question (the question still stands): deepcopy(A)[1] == x was not meant to be written twice. I accidentally copy and pasted it from my terminal twice. On Tuesday, 23 February 2016 15:16:08 UTC+1, Bill Hart wrote: > > In Nemo.jl we require some objects to be singleto

Re: [julia-users] Just a noob question: why are some test-failing PR merged?

2016-02-23 Thread &#x27;Bill Hart&#x27; via julia-users
We just had a failure of Nemo.jl on Travis on OSX which looks completely random. We replace uint with UInt in two places. Before the patch all passes. After the patch, segfault on OSX in a fairly unrelated function. The failure almost seems to random to even bother posting, but here is the line

[julia-users] deepcopy_internal and arrays

2016-02-23 Thread &#x27;Bill Hart&#x27; via julia-users
In Nemo.jl we require some objects to be singleton. In other words they should never be deep copied since we require only one of them to exist. This is causing a problem with deepcopy of arrays that somewhere contain these objects. E.g. in Nemo.jl: Qx,x = PolynomialRing(QQ, "x") # here x conta

Re: [julia-users] Re: Embedding Julia

2015-12-09 Thread &#x27;Bill Hart&#x27; via julia-users
One mystery is solved. Elliot Saba pointed out that I was issuing the wrong command to look for symbols in libjulia.so. And in fact libjulia.so is expected to be in the "odd" location that I reported, on Ubuntu. And linking against it does in fact work. So that leaves one remaining issue, namely

Re: [julia-users] Re: Embedding Julia

2015-12-08 Thread &#x27;Bill Hart&#x27; via julia-users
On 9 December 2015 at 04:47, Tony Kelman wrote: > I'd think a simple shell script, install-julia.sh or something, would be > better than a Makefile - you don't always have build-essential installed. > Putting something in contrib (along with a corresponding uninstall-julia.sh > script?) and addin

Re: [julia-users] Re: Embedding Julia

2015-12-08 Thread &#x27;Bill Hart&#x27; via julia-users
I should add that it would still be useful if there was a Makefile to install Julia system wide after extracting the tarball. Bill. On 9 December 2015 at 03:28, Bill Hart wrote: > > > On 9 December 2015 at 01:54, Tony Kelman wrote: > >> The PPA is maintained by staticfloat, aka Elliot Saba. He

Re: [julia-users] Re: Embedding Julia

2015-12-08 Thread &#x27;Bill Hart&#x27; via julia-users
On 9 December 2015 at 01:54, Tony Kelman wrote: > The PPA is maintained by staticfloat, aka Elliot Saba. He's had very > little time for Julia lately and no one has stepped up to take over the PPA > maintenance from him. > Thanks for letting me know. I'll circulate that and see if anyone locally

Re: [julia-users] Re: Embedding Julia

2015-12-08 Thread &#x27;Bill Hart&#x27; via julia-users
By the way, I haven't used the generic Linux binaries because I couldn't figure out how to install them. There's no Makefile and no instructions. The last time I tried they didn't work when just placed in my home directory. They seem to need installation somewhere. I'm pretty sure our Ubuntu users

Re: [julia-users] Re: Embedding Julia

2015-12-08 Thread &#x27;Bill Hart&#x27; via julia-users
I've searched my machine and really haven't found libjulia.so, except the copy I mentioned, which has no symbols. The PPA's seemed to be very up-to-date with v0.4.1 being available the day it was released. They also work just fine. I think they are just missing something. Where would I even repor

Re: [julia-users] Re: Embedding Julia

2015-12-08 Thread &#x27;Bill Hart&#x27; via julia-users
@Kristoffer That's because you have libjulia.so installed on your system. I've only installed Julia using an Ubuntu ppa, which is missing libjulia.so apparently. It obviously looks in the standard system library location for the libraries it needs (as it should). The problem here is that we canno

Re: [julia-users] Fwd: [ANN] Nemo 0.4 released!

2015-12-04 Thread &#x27;Bill Hart&#x27; via julia-users
I should add that one thing that number theorists are very interested in is quaternion algebras, especially over number fields. I hope that will eventually be done well in Nemo. Bill. On 5 December 2015 at 01:42, Bill Hart wrote: > > > On 5 December 2015 at 01:27, Eric Forgy wrote: > >> Numero

Re: [julia-users] Fwd: [ANN] Nemo 0.4 released!

2015-12-04 Thread &#x27;Bill Hart&#x27; via julia-users
On 5 December 2015 at 01:27, Eric Forgy wrote: > Numerous benchmarks have been added to our benchmarks page to show that >> these implementations are competitive with other systems. > > > Looking at the numbers, I call this an understatement :) > Yes, but we are cheating by using the Julia progr

[julia-users] Fwd: [ANN] Nemo 0.4 released!

2015-12-04 Thread &#x27;Bill Hart&#x27; via julia-users
Hi all, It is with great pleasure that we release Nemo-0.4. Nemo is a computer algebra package written in the Julia programming language, with the eventual aim of covering commutative algebra, number theory and group theory. For instructions on getting and using Nemo-0.4, including full document

Re: [julia-users] Re: Factorization of big integers is taking too long

2015-11-04 Thread &#x27;Bill Hart&#x27; via julia-users
It would be better with Pollard Rho to list the times depending on the smallest factor. It would be interesting to compare timings for some known numbers such as Fermat numbers (F_n = 2^(2^n) + 1). Here are some timings from a Google summer of code project we had this year: F_6 (1844674407370955

Re: [julia-users] Re: Factorization of big integers is taking too long

2015-11-04 Thread &#x27;Bill Hart&#x27; via julia-users
Do you mean you are factoring something other than random numbers, or do you mean your Pollard Rho is completely deterministic? It's not a good measure of performance to time just one factorisation with Pollard Rho, since you could just pick the parameters such that it essentially succeeds immedia

Re: [julia-users] [OT] Assembly language position

2015-10-29 Thread &#x27;Bill Hart&#x27; via julia-users
Thanks, I wasn't aware of it. I'll see to it that something gets posted there. Bill. On 29 October 2015 at 14:09, Yichao Yu wrote: > On Thu, Oct 29, 2015 at 9:06 AM, Bill Hart > wrote: > > Hi all, > > > > If anyone would be interested in writing an x86_64 assembly > superoptimiser > > in Julia

[julia-users] Example usage for withenv()

2015-10-09 Thread &#x27;Bill Hart&#x27; via julia-users
I managed to finally figure out how to use withenv with two arguments (the first has to be a lambda or function with no parameters). But the documentation here: http://julia.readthedocs.org/en/latest/stdlib/base/#Base.withenv indicates that withenv can also be used with a do..end block. Howev

[julia-users] Re: System wide package installation

2015-10-09 Thread &#x27;Bill Hart&#x27; via julia-users
I think I figured it out, actually. I can set rpath to both possibilities. One will be silently ignored. Now if only the rpath wasn't hard coded into the build scripts... Anyway, this is clearly not a Julia issue. Sorry for the noise. Bill. On 9 October 2015 at 22:17, Bill Hart wrote: > A sy

[julia-users] System wide package installation

2015-10-09 Thread &#x27;Bill Hart&#x27; via julia-users
A system administrator is trying to install our Nemo package system wide on a VM for his users. He's located a ticket [1] which gave him the hint to put Nemo into ../ share/julia/site/v0.4 relative to the Julia binary, after Nemo has built its dependencies. The problem is, a few of Nemo's depende

[julia-users] GC and scope

2015-10-01 Thread &#x27;Bill Hart&#x27; via julia-users
Is there any relationship between Julia's lexical scoping and garbage collection? What I mean is: if I have a function inside which is a variable which is not used from some point onwards in the function, does the object live on until the end of scope or is it possible that it may be gc'd before t

[julia-users] Re: [ANN] Nemo: A computer algebra package for Julia

2015-09-26 Thread &#x27;Bill Hart&#x27; via julia-users
I've just tagged Nemo-0.3.1. This fixes some issues on OSX and on 32 bit platforms that were reported. Other platforms are not affected. Note that on OSX we don't provide binaries, but build from source. So you need a working build environment (a fairly recent Xcode -- is that the right incantatio

Re: [julia-users] Re: Building binary dependencies from source on OSX

2015-09-26 Thread &#x27;Bill Hart&#x27; via julia-users
I had a look at Homebrew, but I'm afraid it's quite beyond me. I'm going to have to wait until our OSX usership has increased enough for someone to build all the necessary recipes for us. The homebrew-science tap definitely won't have Antic, since that's brand new, and we also added quite a lot of

[julia-users] [ANN] Nemo: A computer algebra package for Julia

2015-09-25 Thread &#x27;Bill Hart&#x27; via julia-users
Hi all, It is with pleasure that we release Nemo, a new computer algebra package we've been working on that uses the Julia programming language. The official announcement was made yesterday at the computer algebra minisymposium at the annual meeting of the German Mathematical Society (DMV) in Ham

Re: [julia-users] Re: cglobal library name issue

2015-09-19 Thread &#x27;Bill Hart&#x27; via julia-users
>> module HiThere >> const AConstant = compute_anything() >> function AFunction() >> ccall((:a_cfunction, AConstant), Void, ()) >> end >> end >> >> On Fri, Sep 18, 2015 at 5:10 PM 'Bill Hart' via julia-users < >> julia-use

Re: [julia-users] Re: cglobal library name issue

2015-09-18 Thread &#x27;Bill Hart&#x27; via julia-users
question. >> >> Bill. >> >> On 18 September 2015 at 22:24, Jameson Nash wrote: >> >>> That seems like an odd way to write replace(somdir, "\\", ""), but >>> no, those functions aren't const. You need to actually ca

Re: [julia-users] Re: cglobal library name issue

2015-09-18 Thread &#x27;Bill Hart&#x27; via julia-users
unctions aren't const. You need to actually call them at compile > time and store the result in a global const variable. > > > On Fri, Sep 18, 2015 at 2:59 PM 'Bill Hart' via julia-users < > julia-users@googlegroups.com> wrote: > >> Thanks, but this app

Re: [julia-users] Re: cglobal library name issue

2015-09-18 Thread &#x27;Bill Hart&#x27; via julia-users
nd split, etc? Bill. On 18 September 2015 at 20:52, Jameson Nash wrote: > You should be able to work out everything relative to source_path() at > compile time (this is what `include` does to find files relative to the > current file being included). > > > On Fri, Sep 18, 2015

Re: [julia-users] Re: cglobal library name issue

2015-09-18 Thread &#x27;Bill Hart&#x27; via julia-users
Sorry, I didn't explain that well. It is the location of deps/deps.jl that is not at a constant location _relative_ to the current working directory, which could be anything. I can't hard code it to an absolute path since that will just break on someone else's machine. The whole point of the deps

[julia-users] Re: cglobal library name issue

2015-09-18 Thread &#x27;Bill Hart&#x27; via julia-users
Sorry, it's complaining about the ccall,not the cglobal. I has this code inside of init. ccall((:pari_init, "$pkgdir/local/lib/libpari"), Void, (Int, Int), 30, 1) It looks like it is complaining about the string interpolation. I guess it needs to know the exact string at compile time

[julia-users] cglobal library name issue

2015-09-18 Thread &#x27;Bill Hart&#x27; via julia-users
Hi, I'm actually trying to precompile our library. This seems to necessitate putting some of the initialisation code we had in an __init__ function. But I'm having problems with the cglobal syntax. According to the documentation, it takes a tuple with exactly the same format as ccall. But this

[julia-users] Re: [julia-dev] Re: Julia v0.4.0-rc1 released

2015-09-15 Thread &#x27;Bill Hart&#x27; via julia-users
All 23,000 lines of code in our Nemo package passes its extensive test suite with Julia-0.4-rc1 on Ubuntu 14.04 and Windows 10 (64 bit). Thanks all for the amazing hard work! Bill. On 11 September 2015 at 06:18, Nitin Arora wrote: > Congrats all ! > > > On Thursday, September 10, 2015 at 10:21

Re: [julia-users] Re: Accessing Windows 64 dll's from within Julia

2015-09-15 Thread &#x27;Bill Hart&#x27; via julia-users
which builds msys-2.0.dll into the other dlls I'm building. >>>> >>>> Bill. >>>> >>>> On 15 September 2015 at 03:58, Jameson Nash wrote: >>>> >>>>> You can use a program called depends22.exe to check whether it has any

Re: [julia-users] Re: Accessing Windows 64 dll's from within Julia

2015-09-14 Thread &#x27;Bill Hart&#x27; via julia-users
at 04:30, Jameson Nash wrote: > The shell is correct, but you will probably want to download mingw64 > separately. The julia `README.windows` file has links, I think, to the > right one to download. > > On Mon, Sep 14, 2015 at 10:27 PM 'Bill Hart' via julia-users < >

Re: [julia-users] Re: Accessing Windows 64 dll's from within Julia

2015-09-14 Thread &#x27;Bill Hart&#x27; via julia-users
exe to check whether it has any >>> odd dependencies. Then try calling just >>> `dlopen("C:\\absolute\\path\\to\\lib.dll")` and see whether that works. >>> ccall uses the same underlying dlopen call, so once you get it working for >>> one, it should

Re: [julia-users] Re: Accessing Windows 64 dll's from within Julia

2015-09-14 Thread &#x27;Bill Hart&#x27; via julia-users
d depends22.exe to check whether it has any odd > dependencies. Then try calling just > `dlopen("C:\\absolute\\path\\to\\lib.dll")` and see whether that works. > ccall uses the same underlying dlopen call, so once you get it working for > one, it should work for both. > > O

Re: [julia-users] Re: Accessing Windows 64 dll's from within Julia

2015-09-14 Thread &#x27;Bill Hart&#x27; via julia-users
I tried two different dll's with absolute paths, built with recent MinGW64 and Julia's ccall does not work for either. It still says, "The specified module could not be found". The file type is "gmp-6.0.0/.libs/libgmp-10.dll: PE32+ executable (DLL) (console) x86-64, for MS Windows" and it is just

Re: [julia-users] Re: Accessing Windows 64 dll's from within Julia

2015-09-14 Thread &#x27;Bill Hart&#x27; via julia-users
On 15 September 2015 at 02:54, Tony Kelman wrote: > On second thought ECOS.jl is a simpler example: > https://github.com/JuliaOpt/ECOS.jl/blob/master/deps/build.jl > > Or MbedTLS.jl, very similar but with multiple libraries: > https://github.com/JuliaWeb/MbedTLS.jl/blob/master/deps/build.jl > > >

[julia-users] Re: Accessing Windows 64 dll's from within Julia

2015-09-14 Thread &#x27;Bill Hart&#x27; via julia-users
I forgot to ask: does Julia currently expect to find .a or .dll files on Windows 64? Is anything else needed? Bill. On 15 September 2015 at 02:23, Bill Hart wrote: > Hi, > > I'm currently up to working on building the dependencies for our Nemo > computer algebra package for Julia: > > https://g

[julia-users] Accessing Windows 64 dll's from within Julia

2015-09-14 Thread &#x27;Bill Hart&#x27; via julia-users
Hi, I'm currently up to working on building the dependencies for our Nemo computer algebra package for Julia: https://github.com/wbhart/Nemo.jl We have dependencies on the following C libraries: libpari (Pari/GP) Antic (https://github.com/wbhart/Antic) Flint (https://github.com/wbhart/flint2) m

<    1   2