Items tagged with parallel parallel Tagged Items Feed

hi all

i am trying to write some code to display:

a) hexagon tiling, rather like a honeycomb in 2D

b)  equilateral triangles tiling , all space filled by said triangles. eg a series of triangles whose base is parallel to base of plot, with inverted triangles filling in the remaining spaces

c) square tiling

for a,b c I  want about 50 of each displayed (all of edge length 1) on the one plot

d)  some code...

Hello Maple wizards,

I have two questions for you today.

First, a program I'm developing in Maple 15 does frequent matrix multiplication with a constant float[8] matrix. I hope to take advantage of multiple processors in my 6-way desktop processor and/or CUDA features of the Nvidia GPU card. The program is large enough that maintainability and good programming practice dictate that it be broken down into multiple procs. In addition, I'm considering...

Hi everyone, 

 

How I can split loops than in openMP library 

 

#pragma omp for

 

using threads in maple ... please a one example

 

thanks by your attention.

I have a for loop which run 50000 times.

I have a dual core cpu made by amd, so parallel is a better choice.

There are two packages in Maple 15: Grid and Thread.

I want to know which one is more effeciency?

And in my program,there are no intersection between for-loops.

how to programming in parallel?

Thank you in advance.

Hi,

I have 5 docs with datas (x,y), like this one : BEF1txt

I want to put the 5 graphs side by side (parallels linears fonctions in a 3D graph). So I added the z data, z=1 in this case, and BEF2 got z=2, etc... But I am not able to make the 3D plot with the 5 linears fonction side by side.

May you help me please?

Thanks

Classic Triangle Peg Board GameIn high school I was briefly fascinated by a triangular "jump all but one" game, commonly found at Cracker Barrel restaurants.  The basic premise is that any peg can "jump" over an adjacent peg to occupy the empty hole next to the jumped peg.  The jumped peg is then removed.  The goal is to continue jumping pegs until there is only one left.  


The instructions on the face of the Cracker Barrel version of this game say, "LEAVE ONLY ONE -- YOU'RE A GENIUS".  Wanting to claim the right to call myself a genius, unlike ordinary kids, who might just play the game a few times, I sat down on my Turbo-XT and started writing BASIC code.  The algorithm I came up with ran a bit slow, so I directed output to my printer and let it run over night.  In the morning the program was still chugging along.  I advanced the paper feed on the dot-matrix lineprinter -- the kind that used continuous feed paper with perforated edges and holes on each side.   Into view came 3 solutions represented by a string of numbers.   A quick check verified that I was now a genius.  

Hello wizards,

I'm given to understand that using add() or if possible Task:-Add() is more efficient than a FOR...DO loop. Today I'm asking about the limits of this generalization. My illustration is probably missing some evalf's, but hopefully the concept is clear:

A computation I'm working on involves between 10E4 and 10E6 computations like

Consider the following C code:

A user recently asked how to find the set of indices corresponding to a given value of a two-dimensional Array.

There are several ways to handle this problem.  For  a single value, a simple scan through the Array suffices:

FindIndices1 := proc(A :: Array, val)
local i,j,irng,jrng;
    (irng,jrng) := rtable_dims(A);
    {seq(seq(`if`(A[i,j]=val, [i,j], NULL), i=irng), j=jrng)};
end proc:

With a multi-core machine, the ...

It has been a while since my last post, mostly because of a combination of getting Maple 14 ready to ship and a lack of meaty topics to write about. I am trying to get back into the habit of posting more regularly. You can help me achieve my goal by posting questions about parallel programming. I'll do my best to answer. However for now, I'll give a brief overview of the new parallel programming features in Maple 14.

A new function has been added to the Task Programming Model. The Threads:-Task:-Return function allows a parallel algorithm implemented on top of the Task Programming Model to perform an early bail out. Lets imagine that you have implemented a parallel search. You are looking for a particular element in a large set of data. Using the Task Programming Model, you've created a bunch of tasks, each searching a particular subset of the data. However one of the first tasks to execute finds the element you are looking for. In Maple 13, there was no built in way of telling the other tasks that the result have been found and they they should not execute. In Maple 14, the Return function allows one task to specify a return value (which will be returned from Threads:-Task:-Start) and signal the other tasks that the algorithm is complete and that additional tasks should not be executed. Tasks that are already running will still run to completion, but tasks that have not started executing will not be started.

You may have noticed that there is a race condition with Return. What happens if two tasks both call Return in parallel? Only one of the values will become the value that is passed to Threads:-Task:-Start. I suppose I could say the "first" value is the one that is used, but really, what does that mean? If you call Return, then the value passed to Return should be an acceptable result for the algorithm.  If you call Return more than once, any of those values should be valid, thus it shouldn't matter which one becomes the return value.  That said, the Return function does give some feedback. In the task that succeeds in having its value accepted, Return will return true. In all other tasks that call Return, it will return false. This allows the code to know if a particular result was or was not accepted.

Maple 14 also adds the Task Programming Model to the C External Calling API. This means that you can write your algorithms in C and make use of the Task Programming Model. The C API is similar to the Maple API, with a few differences. In particular, you need to create each child task individually, instead of as a single call to Continue, as you would in Maple. As well, because it is C code, you need to worry about a few details like memory management that are handled automatically in Maple.  Using External Call is fairly advanced, so I won't go into too much detail here.  If you'd like to see more details of using the Task Programming Model in External Calling, I can write a seperated post dedicated to that.

As with every release of Maple, we spent some time trying to make our existing functionality faster and more stable. For parallel programming, we reduced the overhead of using the Task Programming Model, as well as reducing the locking in the kernel (which should help improve parallelism). Of course many bugs have been fixed, which should make parallel programming more reliable in Maple 14.

Our previous article described the design of fast algorithms for multiplying and dividing sparse polynomials. We have integrated these algorithms into the expand and divide commands of Maple 14. In this post I want to talk a bit about what you might see when you try Maple 14. Keep in mind that the product isn't released yet and I don't work for Maplesoft, so general disclaimers apply. Nevertheless, one of the first things you may notice is this.

task manager with maple 14

Hello all, I am about to write a simulation which is remarkably redundant and suits itself quite well to parallelization on my multi-core, shared memory machine. Also, I am new to OpenMaple. How does OpenMaple behave in parallelized situations? Is it possible to have multiple threads with independent Maple kernels? Could multiple threads coded with OpenMP or the fork command find uncorrupted solutions? Thank you for any help you may offer! -asn

Page 1 of 1