loganoz / horses3d

HORSES3D: A high-order discontinuous Galerkin solver for flow simulations and multi-physics applications
https://loganoz.github.io/horses3d/
MIT License
112 stars 24 forks source link

Check optimisation flags for gfortran and ifort #78

Open loganoz opened 2 years ago

loganoz commented 2 years ago

compilation in flexo with -xhost, -march=cascadelake or -mtune=cascadelake with ifort generates an internal compiler error

loganoz commented 2 years ago

LinearSolvers/LinearMultigridSolverClass.f90 ifort -cpp -O3 -march=native -mtune=native -assume bscc -D_has_Quad -fp-model precise -fopenmp -DNAVIERSTOKES -I./include_ns -I/home/grubio/horses_hdf5_2/Solver/include -I/home/grubio/horses_hdf5_2/Solver/include_ns -c LinearSolvers/LinearMultigridSolverClass.f90 -o build_ns/LinearMultigridSolverClass.o -module ./include_ns /tmp/ifort3GAe47.i90: catastrophic error: Internal compiler error: segmentation violation signal raised Please report this error along with the circumstances in which it occurred in a Software Problem Report. Note: File and line given may not be explicit cause of this error. compilation aborted for LinearSolvers/LinearMultigridSolverClass.f90 (code 1) make[1]: [build_ns/LinearMultigridSolverClass.o] Error 1 make[1]: se sale del directorio `/home/grubio/horses_hdf5_2/Solver/src/libs/timeintegrator' make: [horseslibs] Error 1

loganoz commented 2 years ago

LinearSolvers/LinearMultigridSolverClass.f90 ifort -cpp -O3 -xHost -assume bscc -D_has_Quad -fp-model precise -fopenmp -DNAVIERSTOKES -I./include_ns -I/home/grubio/horses_hdf5_2/Solver/include -I/home/grubio/horses_hdf5_2/Solver/include_ns -c LinearSolvers/LinearMultigridSolverClass.f90 -o build_ns/LinearMultigridSolverClass.o -module ./include_ns /tmp/iforteL8Gbp.i90: catastrophic error: Internal compiler error: segmentation violation signal raised Please report this error along with the circumstances in which it occurred in a Software Problem Report. Note: File and line given may not be explicit cause of this error. compilation aborted for LinearSolvers/LinearMultigridSolverClass.f90 (code 1) make[1]: [build_ns/LinearMultigridSolverClass.o] Error 1 make[1]: se sale del directorio `/home/grubio/horses_hdf5_2/Solver/src/libs/timeintegrator' make: [horseslibs] Error 1

loganoz commented 2 years ago

-msse3 -axavx,avx2 (https://www.mjr19.org.uk/IT/ifort.html) (tested by @Andres-MG, they work)

loganoz commented 2 years ago

@EstebanFerrer suggestion: -O3 -restrict -xAVX -mAVX -axavx -msse3 -mkl=parallel -fno-alias -fp-model precise -fp-model source -no-prec-div -openmp -lmpi -ip -ip o -parallel