Skip to content

Commit 232de05

Browse files
committed
Update Intel flags and correct bugs related to: halo, check on single precision. FFT ph deallocation is only an issue with Intel
1 parent 5a38c00 commit 232de05

File tree

10 files changed

+13
-10
lines changed

10 files changed

+13
-10
lines changed

cmake/D2D_MPI.cmake

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ if (MPI_FOUND)
5858
# Force the mpirun to be coherent with the mpifortran
5959
string(REGEX REPLACE "mpif90" "mpirun" PATH_TO_MPIRUN "${MPI_Fortran_COMPILER}")
6060
string(REPLACE "mpiifort" "mpirun" PATH_TO_MPIRUN "${PATH_TO_MPIRUN}")
61+
string(REPLACE "mpiifx" "mpirun" PATH_TO_MPIRUN "${PATH_TO_MPIRUN}")
6162
message(STATUS "Path to mpirun ${PATH_TO_MPIRUN}")
6263
set(MPIEXEC_EXECUTABLE "${PATH_TO_MPIRUN}" CACHE STRING
6364
"Force MPIRUN to be consistent with MPI_Fortran_COMPILER" FORCE)

cmake/compilers/D2D_flags_intel.cmake

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# Compilers Flags for Intel
22
# Check is the compiler is the new ifx based on LLVM or the old ifort
33
if (Fortran_COMPILER_NAME MATCHES "IntelLLVM")
4-
set(D2D_FFLAGS "-fpp -std08")
5-
set(D2D_FFLAGS_RELEASE "-O2")
4+
set(D2D_FFLAGS "-fpp -std08 -safe-cray-ptr -g -traceback")
5+
set(D2D_FFLAGS_RELEASE "-O3")
6+
#set(D2D_FFLAGS "-fpp -std08 -xHost -heaparrays -safe-cray-ptr -g -traceback")
7+
#set(D2D_FFLAGS_RELEASE "-O3 -ipo")
68
else (Fortran_COMPILER_NAME MATCHES "IntelLLVM")
79
#set(CMAKE_Fortran_FLAGS "-cpp xSSE4.2 -axAVX,CORE-AVX-I,CORE-AVX2 -ipo -fp-model fast=2 -mcmodel=large -safe-cray-ptr")
810
set(D2D_FFLAGS "-fpp -std08 -xHost -heaparrays -safe-cray-ptr -g -traceback")

examples/fft_physical_x/fft_c2c_x.f90

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ program fft_c2c_x
3535
#ifdef DOUBLE_PREC
3636
real(mytype), parameter :: error_precision = 1.e-12_mytype
3737
#else
38-
real(mytype), parameter :: error_precision = 1.e-6_mytype
38+
real(mytype), parameter :: error_precision = 5.e-6_mytype
3939
#endif
4040

4141

examples/fft_physical_x/fft_grid_x.f90

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ program fft_physical_x
3535
#ifdef DOUBLE_PREC
3636
real(mytype), parameter :: error_precision = 1.e-12_mytype
3737
#else
38-
real(mytype), parameter :: error_precision = 1.e-6_mytype
38+
real(mytype), parameter :: error_precision = 5.e-6_mytype
3939
#endif
4040

4141

examples/fft_physical_x/fft_r2c_x.f90

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ program fft_r2c_x
3636
#ifdef DOUBLE_PREC
3737
real(mytype), parameter :: error_precision = 1.e-12_mytype
3838
#else
39-
real(mytype), parameter :: error_precision = 1.e-6_mytype
39+
real(mytype), parameter :: error_precision = 5.e-6_mytype
4040
#endif
4141

4242

examples/fft_physical_z/fft_c2c_z.f90

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ program fft_c2c_z
3535
#ifdef DOUBLE_PREC
3636
real(mytype), parameter :: error_precision = 1.e-12_mytype
3737
#else
38-
real(mytype), parameter :: error_precision = 1.e-6_mytype
38+
real(mytype), parameter :: error_precision = 5.e-6_mytype
3939
#endif
4040

4141

examples/fft_physical_z/fft_r2c_z.f90

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ program fft_r2c_z
3636
#ifdef DOUBLE_PREC
3737
real(mytype), parameter :: error_precision = 1.e-12_mytype
3838
#else
39-
real(mytype), parameter :: error_precision = 1.e-6_mytype
39+
real(mytype), parameter :: error_precision = 5.e-6_mytype
4040
#endif
4141

4242

examples/halo_test/halo_test.f90

+1-1
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ subroutine check_err(divh, divref, pencil)
533533
!$acc end kernels
534534
divmag = mag(tmp)
535535

536-
if (error < epsilon(divmag) * divmag) then
536+
if (error < real(2.0,mytype) * epsilon(divmag) * divmag) then
537537
passing = .true.
538538
else
539539
passing = .false.

src/fft_common.f90

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ subroutine decomp_2d_fft_finalize
186186

187187
if (nx_fft /= nx_global .or. ny_fft /= ny_global .or. nz_fft /= nz_global) then
188188
call decomp_info_finalize(ph)
189-
deallocate (ph)
189+
!deallocate (ph)
190190
end if
191191
nullify (ph)
192192
call decomp_info_finalize(sp)

src/halo_common.f90

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140
!$acc end kernels
141141
else if (ipencil == 3) then
142142
jst = decomp%zst(2); jen = decomp%zen(2)
143-
ist = decomp%xst(1); ien = decomp%xen(1)
143+
ist = decomp%zst(1); ien = decomp%zen(1)
144144
!$acc kernels default(present)
145145
do k = 1, s3 ! z all local
146146
do j = jst, jen

0 commit comments

Comments
 (0)