Thanks for the research. I also did some testing with the original code and
to me it seems like the problem has nothing to do with the interpolation
method but with the memory allocation. Matlab is just faster because it
doesn't reallocate memory in every iteration, as you said. It also explains
Ok. My original code certainly spends most of the time on looping the
interpolation. In that sense, the example I post here is similar to the
original code and hightlights the problem I am facing I think. Fwiw, I wrap
the original code in a function. I also do it above, at least for the
perform
@Tomas: maybe check out Numerical Recipes in C: The Art of Scientific
Computing, 2nd edition. There is also an edition for Fortran. The code that
I use in C is basically from there.
@Andrew: The xprime needs to be in the loop. I just made it ones to
simplify but normally it changes every itera
Hi,
my original problem is a dynammic programming problem in which I need to
interpolate the value function on an irregular grid using a cubic spline
method. I was translating my MATLAB code into Julia and used the Dierckx
package in Julia to do the interpolation (there weren't some many
alter
copying the libgomp.dll into my working directory worked! Thanks!
Am Mittwoch, 20. Januar 2016 03:36:54 UTC+1 schrieb Tony Kelman:
>
> Take a look at the libcspline3.dll in Dependency Walker. You're likely
> missing a libgomp dll which you'll need to copy from your compiler
> installation and p
Hi,
I am trying to call C code from Julia.It works for 'regular' C code but now
I have code that (potentially) uses OpenMP which causes trouble. I am
trying to interpolate a function using a spline approximation. In short, if
I type:
gcc -shared -O3 nspline_omp.c -o libcspline.dll -ffast-ma
Yes, sorry, next time I will open a new thread. I actually already have a
new problem, so I am going to post that in a new thread.
This particular problem here has been solved. I didn't manage to get it
working with ifort (I guess there is no hope?) and with gfortran I noticed
that the standar
Hi,
first of all, I am new to Julia (and Fortran). I tried to follow OP's
example and call Fortran from Julia. First, I was using the Intel Fortran
compiler and tried to compile the following .f90 file (saved as f90tojl.f90)
module m
contains
integer function five()
five = 5
end fun