From 4e5db08d0a938bcf9fffea63d6cd8e24368a802b Mon Sep 17 00:00:00 2001
From: Juan Escobar <juan.escobar@aero.obs-mip.fr>
Date: Tue, 3 Aug 2021 11:54:34 +0200
Subject: [PATCH] Juan 03/08/2021: compile_tensor , remove -DOVERLAP <-> bad
 for GPU prenstly

---
 .../tensorproductmultigrid_Source/compile_tensor     | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/ZSOLVER/tensorproductmultigrid_Source/compile_tensor b/src/ZSOLVER/tensorproductmultigrid_Source/compile_tensor
index dae8a9185..12f102872 100755
--- a/src/ZSOLVER/tensorproductmultigrid_Source/compile_tensor
+++ b/src/ZSOLVER/tensorproductmultigrid_Source/compile_tensor
@@ -8,10 +8,14 @@ OPT_BASE="  -Mbackslash -Mextend -Kieee -nofma  -Mallocatable=95 "
 
 #OPTLEVEL="  -O2 -ta=multicore,tesla:nofma,managed "
 #OPTLEVEL="  -g -O2 -ta=multicore,tesla:managed "
-OPTLEVEL=" -tp=px -O2 -ta=multicore,tesla,nofma,cc35,cc50,cc70,cuda10.1,managed -Minfo=accel,ccff -Mprof=ccff  "
+#OPTLEVEL=" -tp=px -O2 -ta=multicore,tesla,nofma,cc35,cc50,cc70,cuda10.1,managed -Minfo=accel,ccff -Mprof=ccff  "
+#OPTLEVEL=" -O2 -ta=multicore,tesla,nofma,cc70,cuda11.0,managed -Minfo=accel "
+OPTLEVEL=" -Mpreprocess -O4 -ta=host,tesla,nofma,cc70,cuda11.0,managed -Minfo=accel "
+#OPTLEVEL=" -Mpreprocess -O2 -ta=host,tesla,nofma,cc70,cuda11.0,managed -Minfo=accel "
 #OPTLEVEL=" -O2 -ta=tesla:nofma,managed "
 
-OPT="-r8 -DCARTESIANGEOMETRY -DOVERLAPCOMMS -DPIECEWISELINEAR -Mpreprocess ${OPT_BASE} ${OPTLEVEL} "
+#OPT="-r8 -DCARTESIANGEOMETRY -DOVERLAPCOMMS -DPIECEWISELINEAR -Mpreprocess ${OPT_BASE} ${OPTLEVEL} "
+OPT="-r8 -DCARTESIANGEOMETRY -DPIECEWISELINEAR -Mpreprocess ${OPT_BASE} ${OPTLEVEL} "
 
 F90="mpif90 ${OPT} "
 
@@ -20,7 +24,7 @@ rm -f *.o *.mod mg_main_mnh
 pgf90 -show ${OPT} mg_main_mnh.f90
 
 
-for file in parameters.f90 messages.f90 datatypes.f90 timer.f90 communication.f90 discretisation.f90 \
+for file in mode_openacc_set_device.f90 parameters.f90 messages.f90 datatypes.f90 timer.f90 communication.f90 discretisation.f90 \
             solver.f90 conjugategradient.f90 multigrid.f90 profiles.f90 mode_mg_read_param.f90 \
 	    mode_mg.f90 mode_mg_read_param.f90 \
 	    dblas.f90 
@@ -30,7 +34,7 @@ ${F90} -c $file
 done
 
 
-${F90} -o mg_main_mnh mg_main_mnh.f90 *.o
+${F90} -o mg_main_mnh${XYZ} mg_main_mnh.f90 *.o
 
 rm -f *.o *.mod
 
-- 
GitLab