Hi,
I wanted to try this out. My test Fortran module is the following, which
I compile with: ifort -mkl -o test_mod.so test_mod.f90 -shared -fpic
,
| module testmodule
|
| implicit none
|
| double precision, external :: ddot
| double precision, dimension(3) :: d,e
|
| integer :: i
|
Hi,
博陈 writes:
> The julia code:
>
> !f90tojl.f90
> module m
> contains
> integer function five()
> five = 5
> end function five
> end module m
>
> The corresponding julia code:
> #test.jl
> println(ccall( (:__m_MOD_five, "f90tojl"), Int, () ))
>
> The test command and the result: (test is the di
Hi again,
Angel de Vicente writes:
> I'm also trying to run julia with Condor, and so far the same issue as
> you. I'm not sure if this will be your case, but in my case the problem
> seems twofold:
>
> 1- I have julia installed in a directory that is not accessible
Hi,
Tom Breloff writes:
> FYI... I'm working on a demo for this sort of thing... stay tuned:
looking forward to it. In the meantime I found a way to use Graphs to
nicely display the graphs inside Jupyter notebooks:
,
| using Graphs
| using GraphViz
|
| g = simple_graph(3) #Directed Graph
Hi,
"David P. Sanders" writes:
> Use LightGraphs.jl
>
> I believe that Graphs.jl is deprecated.
yes, thanks. I was aware that Graphs.jl was no going to be maintained
anymore, but somehow integration with visualization packages looked a
bit less convenient (I might be completely wrong, I just ha
Hi,
Pere writes:
> I've run into the same problem. Did you manage to fix it?
>
> On Thursday, 25 September 2014 20:32:15 UTC+2, Roshan Chaudhari wrote:
> I have one central manager and other 3 nodes. I installed HTCondor and
> Julia
> on all these machines and when I check condor_status,
Hi,
Tony Kelman writes:
> I think you'll have to run in a debugger, either Gallium.jl (installed
> manually
> since Pkg isn't working for you) or gdb or lldb, to see exactly where the
> error
> is happening in libgit2 cloning METADATA. Do the 0.5.0 generic Linux release
> binaries have the same
Nice. Thanks!
>> Yes, I was using that, but it is not very clean. It gives the wrong
>> impression that an error happened (which in many cases it is probably
>> true, but not always) plus it prints the call stack at the point of the
>> error. If error() could be told to be silent, it would be almo
Tamas Papp writes:
>> But return will only quit the current function and return execution to
>> the caller. Coming from Fortran, I also miss something like STOP, which
>> will stop all execution and return me to the REPL.
>
> I hear you --- I miss RETURN-FROM from Common Lisp.
>
> Simply throwing
Tamas Papp writes:
> return
But return will only quit the current function and return execution to
the caller. Coming from Fortran, I also miss something like STOP, which
will stop all execution and return me to the REPL.
--
Ángel de Vicente
http://www.iac.es/galeria/angelv/
Hi Aleksandr,
Aleksandr Mikheev writes:
> I used debug tools, found out that something doesn't work when I try to
> insert a
> point into the node which already contains a point, and they both should go to
> the same subnode. For instance,
didn't have the time to look into your code, but just
Hi,
Tony Kelman writes:
> Was this by any chance a source build in the same git clone where you had
> previously compiled the master 0.6-dev branch of julia?
No. Just to make sure, I deleted the directories .julia and julia and
did it again as per the instructions at:
https://github.com/JuliaLa
Hi,
I just did a fresh installation of Julia from source files and
apparently all went well, but I get the following error when trying to
call Pkg.init()
Any idea what could be happening?
,
| [angelv@duna ~]$ julia
|_
|_ _ _(_)_ | A fresh approach to technica
Alexey Cherkaev writes:
> Found the problem: "double precision" on my machine (presumably, any 64-bit
> machine) with "-fdefault-real-8" flag will be "real*16" (something like
> non-existent "Float128" in Julia).
In Fortran, if you want your code to be portable and avoid these type of
issues it
Hi,
Alexey Cherkaev writes:
> To cut long story short, I have a problem of passing floating-point numbers
> from
> Julia to Fortran subroutine. Documentation suggests, that each parameter to
> Fortran's program needs "Ref{T}" wrapper as they are passed by reference (I've
> seen that older code a
Hi,
Páll Haraldsson writes:
> I've been trying to implement some code to build Binary Search Trees.
>
> Is this a genuine need or an exercise? I quickly looked at Datastructures.jl:
a genuine need (well, not really the BSTs, but recursive data structures
in general. In this thread I have ano
Hi,
hubert_tiey...@t-online.de writes:
> Hi,
>
> I've been trying to implement some code to build Binary Search
> Trees. The code below works, I'm able to build a tree and then print
> it
> in ascending order, but it is quite ugly, with those Nullable types
Hi,
Tamas Papp writes:
>> What I miss from the ansi-term is that I cannot keep the whole
>> interaction in the buffer, which I grew accustomed to rely on when
>> running a regular shell inside Emacs. To illustrate, when running
>> something that generates a lot of output inside ansi-term, this ge
Hi,
Tamas Papp writes:
> Hi Julia & Emacs users,
I'm one of those :-)
> I wrote a minor mode for starting and interacting with a Julia REPL from
> Emacs. It basically uses term, and defers to the Julia REPL for almost
> everything. The main reason for using this instead of ESS is that some
> p
Hi,
Angel de Vicente writes:
> OK, so this was just a test example to go for something bigger, and by
> using the cleaner version with Nullable fields I implemented a basic
> code to perform a Barnes-Hut N-body simulation
> (https://en.wikipedia.org/wiki/Barnes%E2%80%93Hut_simulat
Hi,
Angel de Vicente writes:
> Being used to nullify a pointer for this, I'm not sure how to best
> proceed in Julia. Is there a better way to build recursive data
> structures?
OK, so this was just a test example to go for something bigger, and by
using the cleaner version
Hi Ralph,
Ralph Smith writes:
> Conversion is done by methods listed in base/nullable.jl
OK, but more than the conversion rules I was wondering about when
conversion will be invoked. Conversion does not happen when calling a
function (so, in this example a function expecting a Nullable{BST} but
Hi,
by searching in the web I found
(http://stackoverflow.com/questions/36383517/how-to-implement-bst-in-julia)
a way to make my BST code much cleaner (as posted below). Nevertheless,
I don't find this very ellegant, since the head node is of type Bst,
while the children are of type Nullable{Bst}
Hi,
I've been trying to implement some code to build Binary Search
Trees. The code below works, I'm able to build a tree and then print it
in ascending order, but it is quite ugly, with those Nullable types and
having to access subtrees with code like tree.value.left instead of
directly tree.left
programista...@gmail.com writes:
> BIG THX, but what about Float array ?
map(x->round(Int,x),rand(Bool,5))
map(x->round(Int,x),rand(5))
both do work.
--
Ángel de Vicente
http://www.iac.es/galeria/angelv/
Hi,
programista...@gmail.com writes:
> in ver 0.5 how to convert to Int f.e bool or Float
>
> julia> int(rand(Bool,10))
> ERROR: UndefVarError: int not defined
>
> julia> convert(Int64,rand(Bool,10))
> ERROR: MethodError: Cannot `convert` an object of type Array{Bool,1} to an
> object of type Int
Hi,
I'm trying to profile a simple code I wrote that has just two
functions. When I call Profile.print() I get a lot of detail about
modules that (at least at this point) I'm not interested in profiling
(in this case, for example the Primes module, and the REPL itself).
,
| julia> Profile.pri
Hi,
Tim Holy writes:
> That document is aimed at developers to tell them how to make their package
> ready for arrays that have custom indices. As a user, the key line is:
>
>> Such array types are expected to be supplied through packages.
>
> I recommend the OffsetArrays package.
>
> Great to se
Hi,
Isaiah Norton writes:
> mg = zeros(Int,(0:4,0:4))
>
> This isn't related to indexing -- it doesn't work with `1:4`
> either.
But it doesn't complain if I do:
,
| julia> mg=zeros(Int,(0:4))
| 5-element Array{Int64,1}:
| 0
| 0
| 0
| 0
| 0
`
(though then I cannot access mg[0]
Hi,
Isaiah Norton writes:
> Is it possible now (or in the near future) to have named nested loops in
> Julia?
>
> No, and I'm not aware of any plan to support this. But you can create custom
> control flow with '@goto', so it could be probably be done with a macro.
Just learning Julia, s
Hi,
I'm trying to figure out how to use arrays with custom indices, and I've
read http://docs.julialang.org/en/release-0.5/devdocs/offset-arrays/,
but I don't seem to see how I could actually access array positions
using arbitrary indices.
A basic example of what I'd like to do would be something
Hi,
I don't see it in the documentation, but I'm wondering if there is a way
to have named nested loops, so that one can specify those names to break
and continue, in order to have more control.
In the following examples, continue always skips the remaining loop for
j, while break terminates the
Hi Simon,
Simon Danisch writes:
> There is a speed difference, which you can see beautifully like this:
>
> function _sum{T}(::Type{T}, A)
> r = zero(T)
> @inbounds for i in eachindex(A)
> r += T(A[i])
> end
> r
> end
>
great, thanks. My machine seems to be way slower that yours or either I
run
Hi,
Ismael Venegas Castelló writes:
> julia> Base.sum{T<:Real, S<:Real}(::Type{T}, xs::Range{S})::T = sum(xs)
> julia> r = 1:100; sum(r), sum(Int32, r)
thanks for this, but as I understand it, for my particular case in which
I'm interested in working with 32bits Integers this would be similar t
Hi Simon,
Simon Danisch writes:
> I'm guessing that is done to prevent overflow.
> So you need to use your own implementation.
> Here are the promote rules defining this behavior:
> https://github.com/JuliaLang/julia/blob/master/base/reduce.jl#L32
> So in theory you could also implement your ow
Lutfullah Tomak writes:
> It may be because ifort uses proper simd instructions. Eriks's suggestion for
> @simd
> does not use simd instructions in my laptop.
I don't see any improvement in Julia by using @simd either.
On the other hand, vectorization with the Intel compiler definitely
helps, b
Hi,
Mosè Giordano writes:
> I'm working on a Fortran77 code, but I'd much prefer to translate it
> to Julia. However, I've the impression that when working with large
> arrays (of the order of tens of thousands elements) Julia is way
> slower than the equivalent Fortran code.
I'm late into the c
Hi,
Daniel Carrera writes:
> I already have simulation software that works well enough for this. I
> just wanted to experiment with Julia to see if this could be made
> parallel. An irritating problem with all the codes that solve
> planetary systems is that they are all serial -- this problem is
Angel de Vicente writes:
> Viral Shah writes:
>> You may see some better performance with julia 0.4-dev. The other
>> thing to do that is easy is to start julia with the -O option that
>> enables some more optimizations in the JIT, that may or may not help.
>
>
Hi Jake,
Jake Bolewski writes:
> DistributedArray performance is pretty bad. The reason for removing
> them from base was to spur their development. All I can say at this
> time is that we are actively working on making their performance
> better.
OK, thanks. Should I try with the DistributedA
Viral Shah writes:
> You may see some better performance with julia 0.4-dev. The other
> thing to do that is easy is to start julia with the -O option that
> enables some more optimizations in the JIT, that may or may not help.
thanks for the tip. the -O option works only in 0.4, right?
--
Ánge
Hi,
Ángel de Vicente writes:
> Now I have two more questions, to see if I can get better performance:
>
> 1) I'm just running the Julia distribuation that came with my Ubuntu
> distro. I don't know how this was compiled. Is there a way to see
> which optimization level and which compiler options
42 matches
Mail list logo