diff --git a/contrib/platform/mellanox/optimized b/contrib/platform/mellanox/optimized index e3457e1de4..244c320b95 100644 --- a/contrib/platform/mellanox/optimized +++ b/contrib/platform/mellanox/optimized @@ -6,14 +6,42 @@ enable_picky=no with_mpi_param_check=no enable_heterogeneous=no enable_ft_thread=no -enable_mpirun_prefix_by_default=yes enable_orterun_prefix_by_default=yes enable_debug_symbols=yes enable_oshmem_fortran=yes -with_openib=yes with_verbs=yes with_devel_headers=yes with_oshmem=yes + +mellanox_autodetect=${mellanox_autodetect:="no"} +if [ $mellanox_autodetect="yes" ]; then + mxm_dir=${mxm_dir:="$(pkg-config --variable=prefix mxm)"} + if [ -d $mxm_dir ]; then + with_mxm=$mxm_dir + fi + + fca_dir=${fca_dir:="$(pkg-config --variable=prefix fca)"} + if [ -d $fca_dir ]; then + with_fca=$fca_dir + fi + + hcoll_dir=${hcoll_dir:="$(pkg-config --variable=prefix hcoll)"} + if [ -d $hcol_dir ]; then + with_hcoll=$hcoll_dir + fi + + knem_dir=${knem_dir:="$(pkg-config --variable=prefix knem)"} + if [ -d $knem_dir ]; then + with_knem=$knem_dir + fi + + slurm_dir=${slurm_dir:="/usr"} + if [ -f $slurm_dir/include/slurm/slurm.h ]; then + with_slurm=$slurm_dir + with_pmi=$slurm_dir + fi +fi + CXXFLAGS="-O3" CCASFLAGS="-O3" FCFLAGS="-O3"