Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' into fix/execute_benched
[simgrid.git] / examples / smpi / NAS / is.c
index 68cbb77..b681965 100644 (file)
@@ -1,42 +1,42 @@
 /*************************************************************************
- *                                                                       * 
+ *                                                                       *
  *        N  A  S     P A R A L L E L     B E N C H M A R K S  3.3       *
- *                                                                       * 
- *                                  I S                                  * 
- *                                                                       * 
- ************************************************************************* 
- *                                                                       * 
+ *                                                                       *
+ *                                  I S                                  *
+ *                                                                       *
+ *************************************************************************
+ *                                                                       *
  *   This benchmark is part of the NAS Parallel Benchmark 3.3 suite.     *
- *   It is described in NAS Technical Report 95-020.                     * 
- *                                                                       * 
- *   Permission to use, copy, distribute and modify this software        * 
- *   for any purpose with or without fee is hereby granted.  We          * 
- *   request, however, that all derived work reference the NAS           * 
+ *   It is described in NAS Technical Report 95-020.                     *
+ *                                                                       *
+ *   Permission to use, copy, distribute and modify this software        *
+ *   for any purpose with or without fee is hereby granted.  We          *
+ *   request, however, that all derived work reference the NAS           *
  *   Parallel Benchmarks 3.3. This software is provided "as is"          *
- *   without express or implied warranty.                                * 
- *                                                                       * 
+ *   without express or implied warranty.                                *
+ *                                                                       *
  *   Information on NPB 3.3, including the technical report, the         *
- *   original specifications, source code, results and information       * 
- *   on how to submit new results, is available at:                      * 
- *                                                                       * 
- *          http://www.nas.nasa.gov/Software/NPB                         * 
- *                                                                       * 
- *   Send comments or suggestions to  npb@nas.nasa.gov                   * 
- *   Send bug reports to              npb-bugs@nas.nasa.gov              * 
- *                                                                       * 
- *         NAS Parallel Benchmarks Group                                 * 
- *         NASA Ames Research Center                                     * 
- *         Mail Stop: T27A-1                                             * 
- *         Moffett Field, CA   94035-1000                                * 
- *                                                                       * 
- *         E-mail:  npb@nas.nasa.gov                                     * 
- *         Fax:     (650) 604-3957                                       * 
- *                                                                       * 
- ************************************************************************* 
- *                                                                       * 
- *   Author: M. Yarrow                                                   * 
- *           H. Jin                                                      * 
- *                                                                       * 
+ *   original specifications, source code, results and information       *
+ *   on how to submit new results, is available at:                      *
+ *                                                                       *
+ *          http://www.nas.nasa.gov/Software/NPB                         *
+ *                                                                       *
+ *   Send comments or suggestions to  npb@nas.nasa.gov                   *
+ *   Send bug reports to              npb-bugs@nas.nasa.gov              *
+ *                                                                       *
+ *         NAS Parallel Benchmarks Group                                 *
+ *         NASA Ames Research Center                                     *
+ *         Mail Stop: T27A-1                                             *
+ *         Moffett Field, CA   94035-1000                                *
+ *                                                                       *
+ *         E-mail:  npb@nas.nasa.gov                                     *
+ *         Fax:     (650) 604-3957                                       *
+ *                                                                       *
+ *************************************************************************
+ *                                                                       *
+ *   Author: M. Yarrow                                                   *
+ *           H. Jin                                                      *
+ *                                                                       *
  *************************************************************************/
 
 #include "smpi/mpi.h"
@@ -53,8 +53,7 @@ int max_key_log_2;
 int num_bucket_log_2;
 int min_procs=1;
 /* NOTE: THIS CODE CANNOT BE RUN ON ARBITRARILY LARGE NUMBERS OF PROCESSORS. THE LARGEST VERIFIED NUMBER IS 1024.
- * INCREASE max_procs AT YOUR PERIL
- */
+ * INCREASE max_procs AT YOUR PERIL */
 int max_procs=1024;
 
 int total_keys;
@@ -125,7 +124,7 @@ static double  find_my_seed( int  kn,       /* my processor rank, 0<=kn<=num pro
                              double a )     /* Ran num gen mult, try 1220703125.00 */
 {
   long   i;
-  double t1,t2,t3,an;
+  double t1,t2,an;
   long   mq,nq,kk,ik;
 
   nq = nn / np;
@@ -146,13 +145,12 @@ static double  find_my_seed( int  kn,       /* my processor rank, 0<=kn<=num pro
   for( i=1; i<=100; i++ ){
     ik = kk / 2;
     if( 2 * ik !=  kk )
-      t3 = randlc( &t1, &t2 );
+      randlc( &t1, &t2 );
     if( ik == 0 )
       break;
-    t3 = randlc( &t2, &t2 );
+    randlc( &t2, &t2 );
     kk = ik;
   }
-  an=t3;//added to silence paranoid compilers
 
   return t1;
 }
@@ -222,7 +220,7 @@ static void rank( global_data* gd, int iteration )
   INT_TYPE    min_key_val, max_key_val;
   INT_TYPE    *key_buff_ptr;
 
-/*  Iteration alteration of keys */  
+/*  Iteration alteration of keys */
   if(gd->my_rank == 0){
     gd->key_array[iteration] = iteration;
     gd->key_array[iteration+MAX_ITERATIONS] = max_key - iteration;
@@ -580,7 +578,7 @@ int main( int argc, char **argv )
              1220703125.00 ),   /* Random number gen mult */
              1220703125.00 );   /* Random number gen mult */
 
-/*  Do one interation for free (i.e., untimed) to guarantee initialization of  
+/*  Do one interation for free (i.e., untimed) to guarantee initialization of
     all data and code pages and respective tables */
   rank(gd, 1 );