[mvapich-discuss] fail to link with mvapich2-1.2p1/mvapich2-1.4rc2

Jonathan Perkins perkinjo at cse.ohio-state.edu
Thu Oct 8 12:39:07 EDT 2009


Hi Manhui.  I just wanted to let you know that we recently applied the
patch that you've sent.  Please let us know if the issue is resolved in
our trunk.

On Tue, Sep 29, 2009 at 02:42:07PM +0100, Manhui Wang wrote:
> I made a mistake in producing the previous uploaded patches, here
> attached is the updated one, which seems to work fine with Molpro.
> 
> Manhui Wang wrote:
> > Dear MVAPICH2 developers,
> >        Following last mail, I tried to see whether it is possible to
> > make some change in Molpro. But it seems to be impossible since Molpro
> > directly calls these functions, which are from yacc or bison libraries.
> > This means these name conflicts with those in yacc or bison libraries. I
> > have made two small patches(see files attached) for mvapich2, with these
> > patches Molpro works fine with Mvapich2. I would be very appreciated if
> > you can  include these changes (probably you will consider more changes
> > to avoid conflicting with other programs, but this works for molpro at
> > least) in the mvapich2 development version at your earliest convenience.
> > So I can test the updated mvapich2 before the final release.
> > 
> > Thank you very much.
> > Manhui
> > 
> > Jonathan Perkins wrote:
> >> On Thu, Sep 24, 2009 at 04:14:08PM +0100, Manhui Wang wrote:
> >>> Dear MVAPICH2 developers,
> >>>       I tried to build Molpro (see http://www.molpro.net/) with MVAPICH2
> >>> 1.2p1 (as well as mvapich2-1.4rc2) library, but failed. The reason is
> >>> that both Molpro and Mvapich use some general function names.  The
> >>> source code of mvapich library (tokens.c parser.c) contains
> >>> some yacc-like parsing code. These three
> >>> functions(yylex yyparse  yyerror) happen to have the same names as those
> >>> in parse files of Molpro. I renamed these three function to those with a
> >>> prefix mvapich_* in MVAPICH source code, and recompiled the mvapich2
> >>> library. Now it works fine.  Could you please slightly change these
> >>> names to avoid potential conflict with other application program in next
> >>> release version? Surely, Molpro could also choose other specific
> >>> function names to avoid such problems.
> >> Thank you for the suggestion.  We'll take a look at this and have it
> >> resolved before our final release.
> >>
> >>> The following is the error message:
> >>>
> >>> /home/sacmw4/soft/mvapich2-1.2p1-install/lib/libmpich.a(parser.o): In
> >>> function `yylex':
> >>> parser.c:(.text+0xbfc): multiple definition of `yylex'
> >>> ../lib/libmolpro.a(licence.o):parse.c:(.text+0x9ccf): first defined here
> >>> ld: Warning: size of symbol `yylex' changed from 3091 in
> >>> ../lib/libmolpro.a(licence.o) to 3336 in
> >>> /home/sacmw4/soft/mvapich2-1.2p1-install/lib/libmpich.a(parser.o)
> >>> /home/sacmw4/soft/mvapich2-1.2p1-install/lib/libmpich.a(tokens.o): In
> >>> function `yyparse':
> >>> tokens.c:(.text+0x0): multiple definition of `yyparse'
> >>> ../lib/libmolpro.a(licence.o):parse.c:(.text+0xdb): first defined here
> >>> ld: Warning: size of symbol `yyparse' changed from 22803 in
> >>> ../lib/libmolpro.a(licence.o) to 3110 in
> >>> /home/sacmw4/soft/mvapich2-1.2p1-install/lib/libmpich.a(tokens.o)
> >>> /home/sacmw4/soft/mvapich2-1.2p1-install/lib/libmpich.a(tokens.o): In
> >>> function `yyerror':
> >>> tokens.c:(.text+0x1e5c): multiple definition of `yyerror'
> >>> ../lib/libmolpro.a(licence.o):parse.c:(.text+0x5edd): first defined here
> >>> ld: Warning: size of symbol `yyerror' changed from 934 in
> >>> ../lib/libmolpro.a(licence.o) to 26 in
> >>> /home/sacmw4/soft/mvapich2-1.2p1-install/lib/libmpich.a(tokens.o)
> >>> failure
> >>> /home/sacmw4/soft/mvapich2-1.2p1-install/lib/libmpich.a(parser.o): In
> >>> function `yylex':
> >>> parser.c:(.text+0xbfc): multiple definition of `yylex'
> >>> ../lib/libmolpro.a(licence.o):parse.c:(.text+0x9ccf): first defined here
> >>> ld: Warning: size of symbol `yylex' changed from 3091 in
> >>> ../lib/libmolpro.a(licence.o) to 3336 in
> >>> /home/sacmw4/soft/mvapich2-1.2p1-install/lib/libmpich.a(parser.o)
> >>> /home/sacmw4/soft/mvapich2-1.2p1-install/lib/libmpich.a(tokens.o): In
> >>> function `yyparse':
> >>> tokens.c:(.text+0x0): multiple definition of `yyparse'
> >>> ../lib/libmolpro.a(licence.o):parse.c:(.text+0xdb): first defined here
> >>> ld: Warning: size of symbol `yyparse' changed from 22803 in
> >>> ../lib/libmolpro.a(licence.o) to 3110 in
> >>> /home/sacmw4/soft/mvapich2-1.2p1-install/lib/libmpich.a(tokens.o)
> >>> /home/sacmw4/soft/mvapich2-1.2p1-install/lib/libmpich.a(tokens.o): In
> >>> function `yyerror':
> >>> tokens.c:(.text+0x1e5c): multiple definition of `yyerror'
> >>> ../lib/libmolpro.a(licence.o):parse.c:(.text+0x5edd): first defined here
> >>>
> >>> Thanks
> >>> Manhui
> >>>
> >>> Yutaka Kubota wrote:
> >>>> Dear MVAPICH2 discussion Mailing list,
> >>>>
> >>>> This is Yutaka Kubota from Cray Japan.
> >>>>
> >>>> I would like to know when will release MVAPICH2 1.4 official version. If
> >>>> this plan was not decided, we will try to use RC2 or RC3 version. We
> >>>> just would like to know this plan is exist or not.
> >>>>
> >>>> Best regards
> >>>>
> >>>> Yutaka Kubota
> >>>>
> >>>>
> >>>> _______________________________________________
> >>>> mvapich-discuss mailing list
> >>>> mvapich-discuss at cse.ohio-state.edu
> >>>> http://mail.cse.ohio-state.edu/mailman/listinfo/mvapich-discuss
> >>> -- 
> >>> -----------
> >>> Manhui  Wang
> >>> School of Chemistry, Cardiff University,
> >>> Main Building, Park Place,
> >>> Cardiff CF10 3AT, UK
> >>> Telephone: +44 (0)29208 76637
> >>> _______________________________________________
> >>> mvapich-discuss mailing list
> >>> mvapich-discuss at cse.ohio-state.edu
> >>> http://mail.cse.ohio-state.edu/mailman/listinfo/mvapich-discuss
> > 
> > 
> > ------------------------------------------------------------------------
> > 
> > _______________________________________________
> > mvapich-discuss mailing list
> > mvapich-discuss at cse.ohio-state.edu
> > http://mail.cse.ohio-state.edu/mailman/listinfo/mvapich-discuss
> 
> -- 
> -----------
> Manhui  Wang
> School of Chemistry, Cardiff University,
> Main Building, Park Place,
> Cardiff CF10 3AT, UK
> Telephone: +44 (0)29208 76637

> diff -crB mvapich2-1.4rc2-orig/src/mpid/ch3/channels/mrail/src/plpa/parser.c mvapich2-1.4rc2/src/mpid/ch3/channels/mrail/src/plpa/parser.c
> *** mvapich2-1.4rc2-orig/src/mpid/ch3/channels/mrail/src/plpa/parser.c	2009-06-01 22:56:18.000000000 +0100
> --- mvapich2-1.4rc2/src/mpid/ch3/channels/mrail/src/plpa/parser.c	2009-09-29 13:20:10.000000000 +0100
> ***************
> *** 551,557 ****
>    * easily add parameters.
>    */
>   #ifndef YY_DECL
> ! #define YY_DECL int yylex YY_PROTO(( void ))
>   #endif
>   
>   /* Code executed at the beginning of each rule, after yytext and yyleng
> --- 551,557 ----
>    * easily add parameters.
>    */
>   #ifndef YY_DECL
> ! #define YY_DECL int mvapich_yylex YY_PROTO(( void ))
>   #endif
>   
>   /* Code executed at the beginning of each rule, after yytext and yyleng
> ***************
> *** 714,720 ****
>   			/* We're scanning a new file or input source.  It's
>   			 * possible that this happened because the user
>   			 * just pointed yyin at a new source and called
> ! 			 * yylex().  If so, then we have to assure
>   			 * consistency between yy_current_buffer and our
>   			 * globals.  Here is the right place to do so, because
>   			 * this is the first action (other than possibly a
> --- 714,720 ----
>   			/* We're scanning a new file or input source.  It's
>   			 * possible that this happened because the user
>   			 * just pointed yyin at a new source and called
> ! 			 * mvapich_yylex().  If so, then we have to assure
>   			 * consistency between yy_current_buffer and our
>   			 * globals.  Here is the right place to do so, because
>   			 * this is the first action (other than possibly a
> ***************
> *** 827,833 ****
>   			"fatal flex scanner internal error--no action found" );
>   	} /* end of action switch */
>   		} /* end of scanning one token */
> ! 	} /* end of yylex */
>   
>   
>   /* yy_get_next_buffer - try to read in a new buffer
> --- 827,833 ----
>   			"fatal flex scanner internal error--no action found" );
>   	} /* end of action switch */
>   		} /* end of scanning one token */
> ! 	} /* end of mvapich_yylex */
>   
>   
>   /* yy_get_next_buffer - try to read in a new buffer
> ***************
> *** 1574,1580 ****
>   #if YY_MAIN
>   int main()
>   	{
> ! 	yylex();
>   	return 0;
>   	}
>   #endif
> --- 1574,1580 ----
>   #if YY_MAIN
>   int main()
>   	{
> ! 	mvapich_yylex();
>   	return 0;
>   	}
>   #endif
> diff -crB mvapich2-1.4rc2-orig/src/mpid/ch3/channels/mrail/src/plpa/tokens.c mvapich2-1.4rc2/src/mpid/ch3/channels/mrail/src/plpa/tokens.c
> *** mvapich2-1.4rc2-orig/src/mpid/ch3/channels/mrail/src/plpa/tokens.c	2009-06-01 22:56:18.000000000 +0100
> --- mvapich2-1.4rc2/src/mpid/ch3/channels/mrail/src/plpa/tokens.c	2009-09-29 13:20:05.000000000 +0100
> ***************
> *** 113,119 ****
>    * Global functions
>    */
>   int token_parse(PLPA_NAME(cpu_set_t) *cpu_set);
> ! void yyerror(char const *s);
>   
>   /*
>    * Local functions
> --- 113,119 ----
>    * Global functions
>    */
>   int token_parse(PLPA_NAME(cpu_set_t) *cpu_set);
> ! void mvapich_yyerror(char const *s);
>   
>   /*
>    * Local functions
> ***************
> *** 495,501 ****
>   #define YYERROR		goto yyerrorlab
>   
>   
> ! /* Like YYERROR except do call yyerror.  This remains here temporarily
>      to ease the transition to the new meaning of YYERROR, for GCC.
>      Once GCC version 2 has supplanted version 1, this can go.  */
>   
> --- 495,501 ----
>   #define YYERROR		goto yyerrorlab
>   
>   
> ! /* Like YYERROR except do call mvapich_yyerror.  This remains here temporarily
>      to ease the transition to the new meaning of YYERROR, for GCC.
>      Once GCC version 2 has supplanted version 1, this can go.  */
>   
> ***************
> *** 515,521 ****
>       }								\
>     else								\
>       { 								\
> !       yyerror ("syntax error: cannot back up");\
>         YYERROR;							\
>       }								\
>   while (0)
> --- 515,521 ----
>       }								\
>     else								\
>       { 								\
> !       mvapich_yyerror ("syntax error: cannot back up");\
>         YYERROR;							\
>       }								\
>   while (0)
> ***************
> *** 534,545 ****
>       (Current).last_column  = (Rhs)[N].last_column)
>   #endif
>   
> ! /* YYLEX -- calling `yylex' with the right arguments.  */
>   
>   #ifdef YYLEX_PARAM
> ! # define YYLEX yylex (YYLEX_PARAM)
>   #else
> ! # define YYLEX yylex ()
>   #endif
>   
>   /* Enable debugging if requested.  */
> --- 534,545 ----
>       (Current).last_column  = (Rhs)[N].last_column)
>   #endif
>   
> ! /* YYLEX -- calling `mvapich_yylex' with the right arguments.  */
>   
>   #ifdef YYLEX_PARAM
> ! # define YYLEX mvapich_yylex (YYLEX_PARAM)
>   #else
> ! # define YYLEX mvapich_yylex ()
>   #endif
>   
>   /* Enable debugging if requested.  */
> ***************
> *** 787,801 ****
>   
>   #ifdef YYPARSE_PARAM
>   # if defined (__STDC__) || defined (__cplusplus)
> ! int yyparse (void *YYPARSE_PARAM);
>   # else
> ! int yyparse ();
>   # endif
>   #else /* ! YYPARSE_PARAM */
>   #if defined (__STDC__) || defined (__cplusplus)
> ! int yyparse (void);
>   #else
> ! int yyparse ();
>   #endif
>   #endif /* ! YYPARSE_PARAM */
>   
> --- 787,801 ----
>   
>   #ifdef YYPARSE_PARAM
>   # if defined (__STDC__) || defined (__cplusplus)
> ! int mvapich_yyparse (void *YYPARSE_PARAM);
>   # else
> ! int mvapich_yyparse ();
>   # endif
>   #else /* ! YYPARSE_PARAM */
>   #if defined (__STDC__) || defined (__cplusplus)
> ! int mvapich_yyparse (void);
>   #else
> ! int mvapich_yyparse ();
>   #endif
>   #endif /* ! YYPARSE_PARAM */
>   
> ***************
> *** 813,835 ****
>   
>   
>   /*----------.
> ! | yyparse.  |
>   `----------*/
>   
>   #ifdef YYPARSE_PARAM
>   # if defined (__STDC__) || defined (__cplusplus)
> ! int yyparse (void *YYPARSE_PARAM)
>   # else
> ! int yyparse (YYPARSE_PARAM)
>     void *YYPARSE_PARAM;
>   # endif
>   #else /* ! YYPARSE_PARAM */
>   #if defined (__STDC__) || defined (__cplusplus)
>   int
> ! yyparse (void)
>   #else
>   int
> ! yyparse ()
>   
>   #endif
>   #endif
> --- 813,835 ----
>   
>   
>   /*----------.
> ! | mvapich_yyparse.  |
>   `----------*/
>   
>   #ifdef YYPARSE_PARAM
>   # if defined (__STDC__) || defined (__cplusplus)
> ! int mvapich_yyparse (void *YYPARSE_PARAM)
>   # else
> ! int mvapich_yyparse (YYPARSE_PARAM)
>     void *YYPARSE_PARAM;
>   # endif
>   #else /* ! YYPARSE_PARAM */
>   #if defined (__STDC__) || defined (__cplusplus)
>   int
> ! mvapich_yyparse (void)
>   #else
>   int
> ! mvapich_yyparse ()
>   
>   #endif
>   #endif
> ***************
> *** 1305,1319 ****
>   			yyprefix = " or ";
>   		      }
>   		}
> ! 	      yyerror (yymsg);
>   	      YYSTACK_FREE (yymsg);
>   	    }
>   	  else
> ! 	    yyerror ("syntax error; also virtual memory exhausted");
>   	}
>         else
>   #endif /* YYERROR_VERBOSE */
> ! 	yyerror ("syntax error");
>       }
>   
>   
> --- 1305,1319 ----
>   			yyprefix = " or ";
>   		      }
>   		}
> ! 	      mvapich_yyerror (yymsg);
>   	      YYSTACK_FREE (yymsg);
>   	    }
>   	  else
> ! 	    mvapich_yyerror ("syntax error; also virtual memory exhausted");
>   	}
>         else
>   #endif /* YYERROR_VERBOSE */
> ! 	mvapich_yyerror ("syntax error");
>       }
>   
>   
> ***************
> *** 1431,1437 ****
>   | yyoverflowlab -- parser overflow comes here.  |
>   `----------------------------------------------*/
>   yyoverflowlab:
> !   yyerror ("parser stack overflow");
>     yyresult = 2;
>     /* Fall through.  */
>   #endif
> --- 1431,1437 ----
>   | yyoverflowlab -- parser overflow comes here.  |
>   `----------------------------------------------*/
>   yyoverflowlab:
> !   mvapich_yyerror ("parser stack overflow");
>     yyresult = 2;
>     /* Fall through.  */
>   #endif
> ***************
> *** 1454,1467 ****
>   
>       PLPA_CPU_ZERO(cpu_set);
>       return_value = cpu_set;
> !     ret = yyparse();
>       if (0 != ret) {
>           return ret;
>       }
>       return 0;
>   }
>   
> ! void yyerror (char const *s)
>   {
>       fprintf(stderr, "ERROR: %s\n", s);
>   }
> --- 1454,1467 ----
>   
>       PLPA_CPU_ZERO(cpu_set);
>       return_value = cpu_set;
> !     ret = mvapich_yyparse();
>       if (0 != ret) {
>           return ret;
>       }
>       return 0;
>   }
>   
> ! void mvapich_yyerror (char const *s)
>   {
>       fprintf(stderr, "ERROR: %s\n", s);
>   }


-- 
Jonathan Perkins
http://www.cse.ohio-state.edu/~perkinjo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : http://mail.cse.ohio-state.edu/pipermail/mvapich-discuss/attachments/20091008/d5c16d89/attachment-0001.bin


More information about the mvapich-discuss mailing list