Maj terminée. Pour consulter la release notes associée voici le lien :
https://about.gitlab.com/releases/2021/07/07/critical-security-release-gitlab-14-0-4-released/

Commit ee7d1312 authored by COULAUD Olivier's avatar COULAUD Olivier
Browse files

Fix problem with srand48.

parent 642e7408
// ===================================================================================
// Copyright ScalFmm 2011 INRIA, Olivier Coulaud, Bérenger Bramas, Matthias Messner
// Copyright ScalFmm 2011 INRIA, Olivier Coulaud, B��renger Bramas, Matthias Messner
// olivier.coulaud@inria.fr, berenger.bramas@inria.fr
// This software is a computer program whose purpose is to compute the FMM.
//
......@@ -66,6 +66,7 @@ int main(int argc, char ** argv){
// System properties
myfile << NbParticles << "\n";
myfile << BoxWidth << "\t" << XCenter << "\t" << YCenter << "\t" << ZCenter;
srand48( static_cast<long>(time(0))) ;
// Generate particles
for( long idx = 0 ; idx < NbParticles ; ++idx ){
......@@ -73,7 +74,7 @@ int main(int argc, char ** argv){
const FReal py = ((FReal(drand48())) * BoxWidth * FReal(2)) + YCenter - BoxWidth;
const FReal pz = ((FReal(drand48())) * BoxWidth * FReal(2)) + ZCenter - BoxWidth;
const int isTarget = srand48() > 0.5 ? 1 : 0;
const int isTarget = drand48() > 0.5 ? 1 : 0;
myfile << "\n" << px << "\t" << py << "\t" << pz << "\t" << physicalValue << "\t" << isTarget;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment