Révision 292

TrouNoir/TrouNoir.py (revision 292)
1396 1396
  // Integer Impact Parameter Size (half of image)
1397 1397
  int bmaxi=gridDim.x*blockDim.x;
1398 1398

  
1399
  float Trajectory[2048];
1399
  float Trajectory[TRACKPOINTS];
1400 1400

  
1401 1401
  // Perform trajectory for each pixel
1402 1402

  
......
1450 1450

  
1451 1451
  } while ((bvus>=rs)&&(bvus<=bvus0));
1452 1452

  
1453
  for (uint i=(uint)nh+1;i<TRACKPOINTS;i++) {
1454
     Trajectory[i]=0.e0f;
1455
  }
1456

  
1453 1457
  int imx=(int)(16*bi);
1454 1458

  
1455 1459
  for (int i=0;i<imx;i++)
TrouNoir/trou_noir_OpenACC.c (revision 292)
20 20

  
21 21
	Compilation sous gcc ( Compilateur GNU sous Linux ) :
22 22

  
23
	Version FP32 : gcc -fopenmp -O3 -ffast-math -DFP32 -o trou_noir_OMP_FP32 trou_noir_OpenMP.c -lm -lgomp
24
	Version FP64 : gcc -fopenmp -O3 -ffast-math -FP64 -o trou_noir_OMP_FP64 trou_noir_OpenMP.c -lm -lgomp
25

  
26 23
        Version FP32 : gcc -O3 -fopenacc  -ffast-math -DFP32 -foffload=nvptx-none -foffload="-O3 -misa=sm_35 -lm" -o trou_noir_openacc_FP32 trou_noir_OpenACC.c -lm
27 24
        Version FP64 : gcc -O3 -fopenacc  -ffast-math -DFP64 -foffload=nvptx-none -foffload="-O3 -misa=sm_35 -lm" -o trou_noir_openacc_FP64 trou_noir_OpenACC.c -lm
28 25

  
......
42 39
#define TRACKPOINTS 2048
43 40

  
44 41
#if TYPE == FP64
45
#define MYFLOAT float
46
#else
47 42
#define MYFLOAT double
43
#else
44
#define MYFLOAT float
48 45
#endif
49 46

  
50 47
#pragma acc routine
TrouNoir/trou_noir_OpenMP.c (revision 292)
20 20

  
21 21
	Compilation sous gcc ( Compilateur GNU sous Linux ) :
22 22

  
23
	Version FP32 : gcc -fopenmp -O3 -ffast-math -DFP32 -o trou_noir_OMP_FP32 trou_noir_OpenMP.c -lm -lgomp
24
	Version FP64 : gcc -fopenmp -O3 -ffast-math -DFP64 -o trou_noir_OMP_FP64 trou_noir_OpenMP.c -lm -lgomp
23
	Version FP32 : gcc -fopenmp -Ofast -DFP32 -o trou_noir_OMP_FP32 trou_noir_OpenMP.c -lm -lgomp
24
	Version FP64 : gcc -fopenmp -Ofast -DFP64 -o trou_noir_OMP_FP64 trou_noir_OpenMP.c -lm -lgomp
25 25
*/ 
26 26

  
27 27
#include <stdio.h>
......
38 38
#define TRACKPOINTS 2048
39 39

  
40 40
#if TYPE == FP64
41
#define MYFLOAT double
42
#else
41 43
#define MYFLOAT float
42
#else
43
#define MYFLOAT double
44 44
#endif
45 45

  
46 46
MYFLOAT atanp(MYFLOAT x,MYFLOAT y)
TrouNoir/trou_noir.c (revision 292)
20 20

  
21 21
	Compilation sous gcc ( Compilateur GNU sous Linux ) :
22 22

  
23
	Version FP32 :	gcc -O3 -ffast-math -DFP32 -o trou_noir_FP32 trou_noir.c -lm
24
	Version FP64 :	gcc -O3 -ffast-math -DFP64 -o trou_noir_FP64 trou_noir.c -lm
23
	Version FP32 :	gcc -Ofast -DFP32 -o trou_noir_FP32 trou_noir.c -lm
24
	Version FP64 :	gcc -Ofast -DFP64 -o trou_noir_FP64 trou_noir.c -lm
25 25
*/ 
26 26

  
27 27
#include <stdio.h>
......
448 448
  printf("\nElapsed Time : %lf",(double)elapsed);
449 449
  printf("\nCPU Time : %lf",(double)cputime);
450 450
  printf("\nEpoch Time : %lf",(double)epoch);
451
  printf("\nZ max @(%i,%i) : %f",zimx,zjmx,zmx);
452
  printf("\nFlux max @(%i,%i) : %f\n\n",fimx,fjmx,fmx);
453

  
451
  printf("\nZ max @(%.6f,%.6f) : %.6f",
452
	 (float)zimx/(float)dim-0.5,0.5-(float)zjmx/(float)dim,zmx);
453
  printf("\nFlux max @(%.6f,%.6f) : %.6f\n\n",
454
	 (float)fimx/(float)dim-0.5,0.5-(float)fjmx/(float)dim,fmx);
455
  
454 456
  // If input parameters set without output files precised
455 457
  if (argc!=7) {
456 458
    for (int i=0;i<dim;i++)

Formats disponibles : Unified diff