473,405 Members | 2,176 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Copying gsl_rng_state across MPI

Bonjour,
I have a program which has 'Objects' that move around in a 3d space,
partly according to the gsl random number generator. The 3d space is
split into two nodes which control the objects in it, with each space
being split into voxels. In the 'border' voxels, each node follows the
objects in them, and as such I need them to be generating the same
random number for the object in both nodes. As far as I am aware this
can be achieved by starting with the same gsl_rng state, and I'm trying
to send this across with MPI when one node becomes aware of an object
from the other node moving into the border voxels.

At present I belive this is achieved using
> void * gsl_rng_state (const gsl_rng * r)
and I've implemented this like so:
state = gsl_rng_state(rng); where> rng = gsl_rng_alloc (gsl_rng_taus); // this worked in a previous version and I've declared> void * state(const gsl_rng * r);
> gsl_rng * rng;


Now I understand that this probably miles wrong, but C++ isn't my
mainstay, and as such I need any help I can get! If I sound very wide
of the mark with the above, a pointer in the right direction would be
appreciated.

Thanks.

Aug 16 '05 #1
1 1255
stringy wrote:
Bonjour,
I have a program which has 'Objects' that move around in a 3d space,
partly according to the gsl random number generator. The 3d space is
split into two nodes which control the objects in it, with each space
being split into voxels. In the 'border' voxels, each node follows the
objects in them, and as such I need them to be generating the same
random number for the object in both nodes. As far as I am aware this
can be achieved by starting with the same gsl_rng state, and I'm trying
to send this across with MPI when one node becomes aware of an object
from the other node moving into the border voxels.

At present I belive this is achieved using

>>void * gsl_rng_state (const gsl_rng * r)

and I've implemented this like so:

state = gsl_rng_state(rng);
where
rng = gsl_rng_alloc (gsl_rng_taus); // this worked in a previous version
and I've declared
void * state(const gsl_rng * r);
>>gsl_rng * rng;

Now I understand that this probably miles wrong, but C++ isn't my
mainstay, and as such I need any help I can get! If I sound very wide
of the mark with the above, a pointer in the right direction would be
appreciated.

Thanks.

The GSL is written in C and the MPI is implemented in C (and Fortran)
with C++ wrappers. I don't understand what question you are asking in
your posting and what it has to do with C++. If you are looking for
advice on numerical mathematics and how to work with clusters I suspect
you probably would get more help in sci.math.num-analysis. GSL also has
a mailing list of its own.

Best,

p
Aug 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: bobb | last post by:
(I'm a long term newbie :) ) I wanted to copy a blob's contents in mysql in python from one record to another. I had a heck of a time with it, so I wanted to post it for others. The where clause...
0
by: Michal Vitecek | last post by:
hello, i have a data cache which sits between a slow database and my server and it's used to cache data retrieved from the database. in order for it to work correctly (race-conditions) i need a...
4
by: Alex Vinokur | last post by:
Copying files : input to output =============================== C/C++ Performance Tests ======================= Using C/C++ Program Perfometer http://sourceforge.net/projects/cpp-perfometer...
2
by: Erhan | last post by:
Hello, after a recent move to windows API from terminal I come across a small problem. How can I execute a program without using stdlib.h ? Before I would use stdlib.h by using a command such as...
0
by: Sudha | last post by:
Hi, I'm using file.move function in asp.net to copy a file from one server to another server. When both the servers are windows2000, files are getting copied. However, when the source and...
8
by: Randy | last post by:
Hi, is it possible to show the progress of a big file being copied e.g. in a "progressbar"? I tried to use file.copy - but this seems to make no sense :-( Thanks in advance, Randy
4
by: Sue | last post by:
Hello We have an application where the user would upload files (max size of 200 mb) from their client machine. This application will run on a web server (its a web server which would be used by...
2
by: aoao | last post by:
I need to make a new database at the beginning of every year but have forgotten how to do this quickly and efficiently. I have a database with about 10 tables, 10 forms related to the 10 tables...
0
by: Michiel Overtoom | last post by:
Ethan wrote: Caveat -- this is dependent on the operating system! Windows will indeed not allow you to rename or delete a file that's still open for writing by another process, at least not...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.