diff --git a/contrib/platform/mellanox/optimized b/contrib/platform/mellanox/optimized index ba13e4a9ce..50ed50c04a 100644 --- a/contrib/platform/mellanox/optimized +++ b/contrib/platform/mellanox/optimized @@ -1,12 +1,5 @@ -enable_mem_debug=no -enable_mem_profile=no -enable_debug=no -enable_memchecker=no -enable_picky=no enable_mca_no_build=coll-ml -with_mpi_param_check=no -enable_heterogeneous=no -enable_ft_thread=no +enable_debug_symbols=yes enable_orterun_prefix_by_default=yes with_verbs=yes with_devel_headers=yes @@ -16,10 +9,6 @@ enable_oshmem_fortran=yes mellanox_autodetect=${mellanox_autodetect:="no"} mellanox_debug=${mellanox_debug:="no"} -if [ "$mellanox_debug" == "yes" ]; then - enable_debug_symbols=yes - enable_debug=yes -fi if [ "$mellanox_autodetect" == "yes" ]; then @@ -51,7 +40,25 @@ if [ "$mellanox_autodetect" == "yes" ]; then fi -CXXFLAGS="-O3 -g" -CCASFLAGS="-O3 -g" -FCFLAGS="-O3 -g" -CFLAGS="-O3 -g" +if [ "$mellanox_debug" == "yes" ]; then + enable_debug=yes + enable_memchecker=yes + with_valgrind=yes + CXXFLAGS="-O0 -g" + CCASFLAGS="-O0 -g" + FCFLAGS="-O0 -g" + CFLAGS="-O0 -g" +else + enable_debug=no + enable_mem_debug=no + enable_mem_profile=no + enable_memchecker=no + enable_picky=no + enable_heterogeneous=no + enable_ft_thread=no + with_mpi_param_check=no + CXXFLAGS="-O3 -g" + CCASFLAGS="-O3 -g" + FCFLAGS="-O3 -g" + CFLAGS="-O3 -g" +fi