help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: distributed octave


From: Mark P. Esplin
Subject: Re: distributed octave
Date: Tue, 11 Nov 2003 10:24:14 -0500
User-agent: KMail/1.5

        I have been looking into setting up a small cluster.  How much speed up 
has 
been possible with the parallel version of octave?  I am sure it depends on 
the application, but are there some rules of thumb that tell how well it will 
perform?
                             Thanks,

                                   Mark Esplin

On Monday 10 November 2003 11:41 am, Jason Tillett wrote:
> Thank you JD,
>
> You were right. I had not installed gperf.
> Also the header file you attached was required (mine was empty).
>
> Here some other little gotcha that might assist others.
>
> 1. Need to add /usr/local/lib/octave-2.1.45 to /etc/ld.so.conf and run
> ldconfig.
> 2. ./configure of mpi_pil... fails with out-of-box redhat 9 lam-6.5.8-4
> binary rpm.
> 3. I removed the lam binary rpm and installed the redhat lam src rpm but
> the make fails.
> 4. I used lam-7.0.2 from lam-mpi.org. No problem
>
> Thank you very much for your help.
> Jason
> ----- Original Message -----
> From: "JD Cole" <address@hidden>
> To: "Jason Tillett" <address@hidden>
> Cc: <address@hidden>
> Sent: Friday, November 07, 2003 5:13 AM
> Subject: Re: distributed octave
>
> > Jason,
> >     I tried recompiling the "pre-patched" source, also under RedHat 9,
> > and succeeded. So here are my thoughts:
> > (1) The build_parallel source tries to apply the patch a specifically
> > dated CVS tree. (I.e. I grab the CVS source ats of a certain date and
> > patch that.) It's possible that there is a problem with my script, or as
> > your inquiry has brought to light, there may be some changes in CVS
> > which have causes a problem. (In the future it would be best if JWE
> > could tag major Octave releases in CVS so they could be used as
> > synchronization points.;-))
> >
> > (2) My best guess as to why you couldn't "make" the pre-patched sources
> > is that you don't have gperf installed (you can get that here:
>
> ftp://rpmfind.net/linux/redhat/9/en/os/i386/RedHat/RPMS/gperf-2.7.2-9.i386.
>r pm
>
> > or, alternatively, it should be on one of your RedHat CDs), ./configure
> > looks for gperf prior to compilation time. Generally the file
> > oct-gperf.h is included in the Octave source, but since I changed
> > octave.gperf, I forgot to add it to my distribution, sorry about that. I
> > have attached the generated file if you would prefer not to install
> > gperf (above).
> >
> > (3) In addition to (2), don't forget to ./configure w/ the --enable-dl
> > and --enable-shared flags. These are key. (I've changed this on the web
> > site, again my apologies.)
> >
> > If this doesn't help, please try to include more details about WHY the
> > make command failed. I'm happy to help out.
> >
> > Best,
> >
> > JDoct
> >
> > Jason Tillett wrote:
> > >Has anyone successfully built a distributed octave binary (for mpi)
> > >using  http://www.transientresearch.com/d-octave/index.php?menu=Download
> > >
> > >I am trying to build on Redhat 9.
> > >
> > >I am unable to get the ./build_parallel_sources to complete
> > >and when I try to build the pre-patched source tree I get
> > >through configure but am unable to make.
> > >
> > >thank you
> > >--------------------------------------
>
> ---------------------------------------------------------------------------
>- ----
>
> > /* ANSI-C code produced by gperf version 2.7.2 */
> > /* Command-line: gperf -t -C -D -E -G -L ANSI-C -H octave_kw_hash -N
>
> octave_kw_lookup octave.gperf  */
>
> > enum octave_kw_id
> > {
> >   all_va_args_kw,
> >   break_kw,
> >   case_kw,
> >   catch_kw,
> >   continue_kw,
> >   do_kw,
> >   else_kw,
> >   elseif_kw,
> >   end_kw,
> >   end_try_catch_kw,
> >   end_unwind_protect_kw,
> >   endfor_kw,
> >   endfunction_kw,
> >   endif_kw,
> >   endswitch_kw,
> >   endwhile_kw,
> >   endparallel_kw,
> >   for_kw,
> >   function_kw,
> >   global_kw,
> >   gplot_kw,
> >   gsplot_kw,
> >   if_kw,
> >   magic_file_kw,
> >   magic_line_kw,
> >   otherwise_kw,
> >   replot_kw,
> >   return_kw,
> >   static_kw,
> >   switch_kw,
> >   try_kw,
> >   until_kw,
> >   unwind_protect_kw,
> >   unwind_protect_cleanup_kw,
> >   varargin_kw,
> >   varargout_kw,
> >   while_kw,
> >   parallel_kw,
> >   parallelsection_kw
> > };
> >
> > struct octave_kw { const char *name; int tok; octave_kw_id kw_id; };
> > enum
> >   {
> >     TOTAL_KEYWORDS = 40,
> >     MIN_WORD_LENGTH = 2,
> >     MAX_WORD_LENGTH = 22,
> >     MIN_HASH_VALUE = 2,
> >     MAX_HASH_VALUE = 78
> >   };
> >
> > /* maximum key range = 77, duplicates = 1 */
> >
> > #ifdef __GNUC__
> > __inline
> > #else
> > #ifdef __cplusplus
> > inline
> > #endif
> > #endif
> > static unsigned int
> > octave_kw_hash (register const char *str, register unsigned int len)
> > {
> >   static const unsigned char asso_values[] =
> >     {
> >       79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
> >       79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
> >       79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
> >       79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
> >       79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
> >       79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
> >       79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
> >       79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
> >       79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
> >       79, 79, 79, 79, 79,  5, 79, 25, 10, 35,
> >        0,  0, 25, 25, 15,  0, 79,  0, 15, 79,
> >       45,  0,  0, 79, 10,  0, 35,  0, 10,  0,
> >       79, 10, 79, 79, 79, 79, 79, 79, 79, 79,
> >       79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
> >       79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
> >       79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
> >       79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
> >       79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
> >       79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
> >       79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
> >       79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
> >       79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
> >       79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
> >       79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
> >       79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
> >       79, 79, 79, 79, 79, 79
> >     };
> >   return len + asso_values[(unsigned char)str[len - 1]] +
>
> asso_values[(unsigned char)str[0]];
>
> > }
> >
> > static const struct octave_kw wordlist[] =
> >   {
> >     {"do", DO, do_kw},
> >     {"end", END, end_kw},
> >     {"else", ELSE, else_kw},
> >     {"while", WHILE, while_kw},
> >     {"endwhile", END, endwhile_kw},
> >     {"otherwise", OTHERWISE, otherwise_kw},
> >     {"break", BREAK, break_kw},
> >     {"endfor", END, endfor_kw},
> >     {"__FILE__", STRING, magic_file_kw},
> >     {"__LINE__", NUM, magic_line_kw},
> >     {"until", UNTIL, until_kw},
> >     {"switch", SWITCH, switch_kw},
> >     {"unwind_protect_cleanup", CLEANUP, unwind_protect_cleanup_kw},
> >     {"parallel", PARALLEL, parallel_kw},
> >     {"endswitch", END, endswitch_kw},
> >     {"endparallel", END, endparallel_kw},
> >     {"if", IF, if_kw},
> >     {"end_try_catch", END, end_try_catch_kw},
> >     {"endif", END, endif_kw},
> >     {"elseif", ELSEIF, elseif_kw},
> >     {"all_va_args", ALL_VA_ARGS, all_va_args_kw},
> >     {"for", FOR, for_kw},
> >     {"case", CASE, case_kw},
> >     {"static", STATIC, static_kw},
> >     {"continue", CONTINUE, continue_kw},
> >     {"persistent", STATIC, static_kw},
> >     {"global", GLOBAL, global_kw},
> >     {"try", TRY, try_kw},
> >     {"unwind_protect", UNWIND, unwind_protect_kw},
> >     {"replot", PLOT, replot_kw},
> >     {"end_unwind_protect", END, end_unwind_protect_kw},
> >     {"varargout", VARARGOUT, varargout_kw},
> >     {"catch", CATCH, catch_kw},
> >     {"endfunction", END, endfunction_kw},
> >     {"parallelsection", PARALLELSECTION, parallelsection_kw},
> >     {"return", FUNC_RET, return_kw},
> >     {"varargin", VARARGIN, varargin_kw},
> >     {"gplot", PLOT, gplot_kw},
> >     {"gsplot", PLOT, gsplot_kw},
> >     {"function", FCN, function_kw}
> >   };
> >
> > static const signed char gperf_lookup[] =
> >   {
> >      -1,  -1,   0,   1,   2,   3,  -1,  -1,   4,   5,
> >      -1,  -1,  -1,  -1,  -1,   6,   7,  -1, -73,  -1,
> >      10,  11,  12,  13,  14,  -1,  15,  16,  17,  -1,
> >      18,  19, -32,  -2,  -1,  -1,  20,  -1,  21,  22,
> >      -1,  23,  -1,  24,  -1,  25,  26,  -1,  27,  28,
> >      -1,  29,  -1,  30,  31,  32,  33,  -1,  -1,  -1,
> >      34,  35,  -1,  36,  -1,  37,  38,  -1,  -1,  -1,
> >      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  39
> >   };
> >
> > #ifdef __GNUC__
> > __inline
> > #endif
> > const struct octave_kw *
> > octave_kw_lookup (register const char *str, register unsigned int len)
> > {
> >   if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
> >     {
> >       register int key = octave_kw_hash (str, len);
> >
> >       if (key <= MAX_HASH_VALUE && key >= 0)
> >         {
> >           register int index = gperf_lookup[key];
> >
> >           if (index >= 0)
> >             {
> >               register const char *s = wordlist[index].name;
> >
> >               if (*str == *s && !strcmp (str + 1, s + 1))
> >                 return &wordlist[index];
> >             }
> >           else if (index < -TOTAL_KEYWORDS)
> >             {
> >               register int offset = - 1 - TOTAL_KEYWORDS - index;
> >               register const struct octave_kw *wordptr =
>
> &wordlist[TOTAL_KEYWORDS + gperf_lookup[offset]];
>
> >               register const struct octave_kw *wordendptr = wordptr
>
> + -gperf_lookup[offset + 1];
>
> >               while (wordptr < wordendptr)
> >                 {
> >                   register const char *s = wordptr->name;
> >
> >                   if (*str == *s && !strcmp (str + 1, s + 1))
> >                     return wordptr;
> >                   wordptr++;
> >                 }
> >             }
> >         }
> >     }
> >   return 0;
> > }
>
> -------------------------------------------------------------
> Octave is freely available under the terms of the GNU GPL.
>
> Octave's home on the web:  http://www.octave.org
> How to fund new projects:  http://www.octave.org/funding.html
> Subscription information:  http://www.octave.org/archive.html
> -------------------------------------------------------------



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]