how to generate random number?

46 views
Skip to first unread message

Alnazer mohamed

unread,
Nov 13, 2014, 1:29:06 PM11/13/14
to omn...@googlegroups.com
hi guys,
im running simulation by using linux so once i start the program and try to run the code i got an error, this error affect my system and i cant finished my simulation and get the output  data
this is error

alnazer@cat1:~/Alnazer/Metal-Semiconductor_Monte-Carlo/Simulator$ grep -i -n "closest node not found" *

contactos6.c:1253:if( dmintet == -100 ){printf("ERROR 1: closest node not found\nparticle: (%e %e %e)\n",x*1e9,y*1e9,z*1e9);MPI_Finalize();exit(0);}

contactos6.c:1557:if( dmintet == -100 ){printf("ERROR 2: closest node not found\nparticle: (%e %e %e)\n",x*1e9,y*1e9,z*1e9);MPI_Finalize();exit(0);}

im assuming the error from the generate random number seed 1 and seed 2  but i dont know how to fix it and how change this .any help please
thanks

Mohsen Sichani

unread,
Nov 13, 2014, 2:32:05 PM11/13/14
to omn...@googlegroups.com
Hi Alnazar

To be honest, I did not get what your problem is, but I use the following in ini

network = Hostmeshmohsen
#// akharin bar dashtam getcurrentposiition ra dastkari mikardam ke betonam lastposition ra bedast biaram,
#ye chizayiam to MoBANLocal.h   va void LinearMobility::move neveshtam
#record-eventlog = true
num-rngs = 3
sim-time-limit = 150s
repeat = 3
#seed-0-mt = 23
seed-set =${runnumber}
#output-scalar-file = ${resultdir}/${configname}-${runnumber}-runnnnn.sca
output-scalar-file = ${resultdir}/${configname}-${runnumber}-Proposal-React-27-withoutPCL.sca

HTH

Alnazer mohamed

unread,
Nov 24, 2014, 6:17:13 AM11/24/14
to omn...@googlegroups.com

 Hi Mohsen ,
thanks very much

Kike Ledesma

unread,
Nov 24, 2014, 6:02:32 PM11/24/14
to omn...@googlegroups.com
Hi,
You can generate random numbers with dblrand().

Regards,
Reply all
Reply to author
Forward
0 new messages