Skip to content

Commit

Permalink
fix: now array are allocated on the heap. Should fix segfault for big…
Browse files Browse the repository at this point in the history
… arrays.
  • Loading branch information
irukoa committed Dec 8, 2023
1 parent 4df470c commit 98ebaf5
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
default: main

F90 = mpiifort
F90FLAGS = -fPIE -qopenmp -lmkl_intel_lp64 -lmkl_core -lmkl_gnu_thread -lpthread -fpp -stand f18
F90FLAGS = -fPIE -qopenmp -lmkl_intel_lp64 -lmkl_core -lmkl_gnu_thread -lpthread -fpp -stand f18 -heap-arrays
F90FLAGS += -g -traceback -warn unused -warn all -check bounds -fp-stack-check -implicitnone -diag-disable 5462 -diag-disable 10440 #Debug flags.
F90FLAGS += -Ofast #Optimization flags.

Expand Down
2 changes: 1 addition & 1 deletion config/gfortran
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
default: main

F90 = mpif90
F90FLAGS = -fPIE -fopenmp -lmkl_intel_lp64 -lmkl_core -lmkl_gnu_thread -lpthread -cpp -std=f2018
F90FLAGS = -fPIE -fopenmp -lmkl_intel_lp64 -lmkl_core -lmkl_gnu_thread -lpthread -cpp -std=f2018 -fmax-stack-var-size=32768
F90FLAGS += -g -fbacktrace --warn-extra --warn-unused --warn-all -Wno-maybe-uninitialized --check=bounds -fstack-check -fimplicit-none #Debug flags.
F90FLAGS += -Ofast #Optimization flags.

Expand Down
2 changes: 1 addition & 1 deletion config/ifort
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
default: main

F90 = mpiifort
F90FLAGS = -fPIE -qopenmp -lmkl_intel_lp64 -lmkl_core -lmkl_gnu_thread -lpthread -fpp -stand f18
F90FLAGS = -fPIE -qopenmp -lmkl_intel_lp64 -lmkl_core -lmkl_gnu_thread -lpthread -fpp -stand f18 -heap-arrays
F90FLAGS += -g -traceback -warn unused -warn all -check bounds -fp-stack-check -implicitnone -diag-disable 5462 -diag-disable 10440 #Debug flags.
F90FLAGS += -Ofast #Optimization flags.

Expand Down
2 changes: 1 addition & 1 deletion config/ifx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
default: main

F90 = mpiifx
F90FLAGS = -fPIE -qopenmp -lmkl_intel_lp64 -lmkl_core -lmkl_gnu_thread -lpthread -fpp -stand f18
F90FLAGS = -fPIE -qopenmp -lmkl_intel_lp64 -lmkl_core -lmkl_gnu_thread -lpthread -fpp -stand f18 -heap-arrays
F90FLAGS += -g -traceback -warn unused -warn all -check bounds -fp-stack-check -implicitnone -diag-disable 5462 -diag-disable 10440 #Debug flags.
F90FLAGS += -Ofast #Optimization flags.

Expand Down
3 changes: 2 additions & 1 deletion doc/examples/example2/mymod/calculators_jerk.F90
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,10 @@ function jerk_current(task, system, k, error) result(u)
real(kind=dp) :: omega, smearing, &
spacing, dk, &
arg, delta, &
bpart, &
eig(system%num_bands)

complex(kind=dp) :: bpart

complex(kind=dp), dimension(system%num_bands, system%num_bands) :: w_hamiltonian, &
rho, &
rot
Expand Down

0 comments on commit 98ebaf5

Please sign in to comment.