1 Reply Latest reply on Nov 30, 2011 4:15 PM by santosh.zanjurne

    Comiling OpenMPI with Open64 and -Ofast (implying -ipa)

    simonhmanc
      Unable determine correct flags/config with "-ipa"

      I want to compile OpenMPI 1.4.x (or 1.5.x for that matter) with Open64 with "-Ofast" which implies "-ipa".  I am unable to determine the correct flags to set.  With Open64 v5.0 and OpenMPI 1.4.3 with

      CFLAGS="-Ofast -Xlinker -ipa -HP:bdt=2m:heap=2m -m64 -march=barcelona -CG:compute_to=ON"

      for example, I get

      libtool: link: /opt/gridware/compilers/amd/open64-5.0/bin/opencc -shared  .... -Wl,libopen-pal.so.0 -o .libs/libopen-pal.so.0.0.0 asm/.libs/libasm.a: cannot mix regular and ipa objects in same archive.  Looks as if not all parts of the build are getting the "-ipa"?

       

        • Comiling OpenMPI with Open64 and -Ofast (implying -ipa)
          santosh.zanjurne

           

           

          The attached patch should help you build openmpi-1.4.4 with Ofast.

          However its advisible to not to use IPA optimizations in cases where shared objects are used, which openmpi uses.  You must go through following two known issues:

          https://bugs.open64.net/show_bug.cgi?id=928

          https://bugs.open64.net/show_bug.cgi?id=683

           

          Also read -shared flag details at :

          http://developer.amd.com/tools/open64/Documents/open64.html#Command-Options

           

          Regards,

          Santosh





          diff -crB openmpi-1.4.4/configure openmpi-1.4.4-mod/configure *** openmpi-1.4.4/configure 2011-09-27 22:30:24.000000000 +0530 --- openmpi-1.4.4-mod/configure 2011-11-30 18:06:05.000000000 +0530 *************** *** 186551,186557 **** compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' ! archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' --- 186551,186557 ---- compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' ! archive_cmds='`$ECHO "X$archive_cmds" "$LDFLAGS" | $Xsed -e "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' *************** *** 186652,186660 **** old_archive_from_expsyms_cmds_CXX='`$ECHO "X$old_archive_from_expsyms_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds_F77='`$ECHO "X$old_archive_from_expsyms_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds_FC='`$ECHO "X$old_archive_from_expsyms_cmds_FC" | $Xsed -e "$delay_single_quote_subst"`' ! archive_cmds_CXX='`$ECHO "X$archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' ! archive_cmds_F77='`$ECHO "X$archive_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' ! archive_cmds_FC='`$ECHO "X$archive_cmds_FC" | $Xsed -e "$delay_single_quote_subst"`' archive_expsym_cmds_CXX='`$ECHO "X$archive_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' archive_expsym_cmds_F77='`$ECHO "X$archive_expsym_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' archive_expsym_cmds_FC='`$ECHO "X$archive_expsym_cmds_FC" | $Xsed -e "$delay_single_quote_subst"`' --- 186652,186660 ---- old_archive_from_expsyms_cmds_CXX='`$ECHO "X$old_archive_from_expsyms_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds_F77='`$ECHO "X$old_archive_from_expsyms_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds_FC='`$ECHO "X$old_archive_from_expsyms_cmds_FC" | $Xsed -e "$delay_single_quote_subst"`' ! archive_cmds_CXX='`$ECHO "X$archive_cmds_CXX" "$LDFLAGS" | $Xsed -e "$delay_single_quote_subst"`' ! archive_cmds_F77='`$ECHO "X$archive_cmds_F77" "$LDFLAGS" | $Xsed -e "$delay_single_quote_subst"`' ! archive_cmds_FC='`$ECHO "X$archive_cmds_FC" "$LDFLAGS" | $Xsed -e "$delay_single_quote_subst"`' archive_expsym_cmds_CXX='`$ECHO "X$archive_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' archive_expsym_cmds_F77='`$ECHO "X$archive_expsym_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' archive_expsym_cmds_FC='`$ECHO "X$archive_expsym_cmds_FC" | $Xsed -e "$delay_single_quote_subst"`' *************** *** 186733,186741 **** predep_objects_CXX='`$ECHO "X$predep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' predep_objects_F77='`$ECHO "X$predep_objects_F77" | $Xsed -e "$delay_single_quote_subst"`' predep_objects_FC='`$ECHO "X$predep_objects_FC" | $Xsed -e "$delay_single_quote_subst"`' ! postdep_objects_CXX='`$ECHO "X$postdep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' ! postdep_objects_F77='`$ECHO "X$postdep_objects_F77" | $Xsed -e "$delay_single_quote_subst"`' ! postdep_objects_FC='`$ECHO "X$postdep_objects_FC" | $Xsed -e "$delay_single_quote_subst"`' predeps_CXX='`$ECHO "X$predeps_CXX" | $Xsed -e "$delay_single_quote_subst"`' predeps_F77='`$ECHO "X$predeps_F77" | $Xsed -e "$delay_single_quote_subst"`' predeps_FC='`$ECHO "X$predeps_FC" | $Xsed -e "$delay_single_quote_subst"`' --- 186733,186741 ---- predep_objects_CXX='`$ECHO "X$predep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' predep_objects_F77='`$ECHO "X$predep_objects_F77" | $Xsed -e "$delay_single_quote_subst"`' predep_objects_FC='`$ECHO "X$predep_objects_FC" | $Xsed -e "$delay_single_quote_subst"`' ! postdep_objects_CXX='`$ECHO "X$postdep_objects_CXX" | grep symtab | $Xsed -e "$delay_single_quote_subst"`' ! postdep_objects_F77='`$ECHO "X$postdep_objects_F77" | grep symtab | $Xsed -e "$delay_single_quote_subst"`' ! postdep_objects_FC='`$ECHO "X$postdep_objects_FC" | grep symtab | $Xsed -e "$delay_single_quote_subst"`' predeps_CXX='`$ECHO "X$predeps_CXX" | $Xsed -e "$delay_single_quote_subst"`' predeps_F77='`$ECHO "X$predeps_F77" | $Xsed -e "$delay_single_quote_subst"`' predeps_FC='`$ECHO "X$predeps_FC" | $Xsed -e "$delay_single_quote_subst"`' *************** *** 188446,188452 **** # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects ! postdep_objects=$lt_postdep_objects predeps=$lt_predeps postdeps=$lt_postdeps --- 188446,188452 ---- # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects ! postdep_objects= predeps=$lt_predeps postdeps=$lt_postdeps *************** *** 188831,188837 **** # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects_CXX ! postdep_objects=$lt_postdep_objects_CXX predeps=$lt_predeps_CXX postdeps=$lt_postdeps_CXX --- 188831,188837 ---- # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects_CXX ! postdep_objects= predeps=$lt_predeps_CXX postdeps=$lt_postdeps_CXX *************** *** 188984,188990 **** # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects_F77 ! postdep_objects=$lt_postdep_objects_F77 predeps=$lt_predeps_F77 postdeps=$lt_postdeps_F77 --- 188984,188990 ---- # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects_F77 ! postdep_objects= predeps=$lt_predeps_F77 postdeps=$lt_postdeps_F77 *************** *** 189137,189143 **** # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects_FC ! postdep_objects=$lt_postdep_objects_FC predeps=$lt_predeps_FC postdeps=$lt_postdeps_FC --- 189137,189143 ---- # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects_FC ! postdep_objects= predeps=$lt_predeps_FC postdeps=$lt_postdeps_FC Only in openmpi-1.4.4-mod: configure.org diff -crB openmpi-1.4.4/opal/asm/Makefile.in openmpi-1.4.4-mod/opal/asm/Makefile.in *** openmpi-1.4.4/opal/asm/Makefile.in 2011-09-27 22:29:01.000000000 +0530 --- openmpi-1.4.4-mod/opal/asm/Makefile.in 2011-11-30 17:32:00.000000000 +0530 *************** *** 990,996 **** rm -f "$${dir}/so_locations"; \ done libasm.la: $(libasm_la_OBJECTS) $(libasm_la_DEPENDENCIES) ! $(LINK) $(libasm_la_OBJECTS) $(libasm_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) --- 990,997 ---- rm -f "$${dir}/so_locations"; \ done libasm.la: $(libasm_la_OBJECTS) $(libasm_la_DEPENDENCIES) ! opencc $(LDFLAGS) -shared -o libasm.so .libs/*.o ! # $(LINK) $(libasm_la_OBJECTS) $(libasm_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) diff -crB openmpi-1.4.4/opal/Makefile.in openmpi-1.4.4-mod/opal/Makefile.in *** openmpi-1.4.4/opal/Makefile.in 2011-09-27 22:29:00.000000000 +0530 --- openmpi-1.4.4-mod/opal/Makefile.in 2011-11-30 17:27:29.000000000 +0530 *************** *** 1223,1229 **** dss/dss_size.c dss/dss_unpack.c dss/dss_open_close.c libopen_pal_la_LIBADD = \ $(LIBLTDL) \ - asm/libasm.la \ event/libevent.la \ mca/base/libmca_base.la \ util/libopalutil.la \ --- 1223,1228 ---- *************** *** 1450,1456 **** dss/dss_open_close.lo: dss/$(am__dirstamp) \ dss/$(DEPDIR)/$(am__dirstamp) libopen-pal.la: $(libopen_pal_la_OBJECTS) $(libopen_pal_la_DEPENDENCIES) ! $(libopen_pal_la_LINK) -rpath $(libdir) $(libopen_pal_la_OBJECTS) $(libopen_pal_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) --- 1449,1455 ---- dss/dss_open_close.lo: dss/$(am__dirstamp) \ dss/$(DEPDIR)/$(am__dirstamp) libopen-pal.la: $(libopen_pal_la_OBJECTS) $(libopen_pal_la_DEPENDENCIES) ! $(libopen_pal_la_LINK) -rpath $(libdir) $(libopen_pal_la_OBJECTS) $(libopen_pal_la_LIBADD) $(LIBS) -L../../ mostlyclean-compile: -rm -f *.$(OBJEXT) diff -crB openmpi-1.4.4/opal/tools/wrappers/Makefile.in openmpi-1.4.4-mod/opal/tools/wrappers/Makefile.in *** openmpi-1.4.4/opal/tools/wrappers/Makefile.in 2011-09-27 22:29:31.000000000 +0530 --- openmpi-1.4.4-mod/opal/tools/wrappers/Makefile.in 2011-11-30 17:35:27.000000000 +0530 *************** *** 1031,1037 **** done opal_wrapper$(EXEEXT): $(opal_wrapper_OBJECTS) $(opal_wrapper_DEPENDENCIES) @rm -f opal_wrapper$(EXEEXT) ! $(LINK) $(opal_wrapper_OBJECTS) $(opal_wrapper_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) --- 1031,1037 ---- done opal_wrapper$(EXEEXT): $(opal_wrapper_OBJECTS) $(opal_wrapper_DEPENDENCIES) @rm -f opal_wrapper$(EXEEXT) ! $(LINK) $(opal_wrapper_OBJECTS) $(opal_wrapper_LDADD) $(LIBS) -L../../asm -lasm mostlyclean-compile: -rm -f *.$(OBJEXT)