mpiexec on FreeBSD

Pete Wyckoff pw at osc.edu
Wed Apr 24 23:39:45 EDT 2002


brooks at aero.org said:
> I've got a cluster up with OpenPBS and Maui running FreeBSD.  I'd like
> to use mpiexec, but it's got some portability issues.  I think I've got
> a handle on most of them, here's my list:

Great!

> The strlcpy and strlcat functions defined in util.[ch] have prototypes
> which are incompatable with the standard prototypes[0].  The lowest
> effort solution would be to rename them to something else (I got things
> working be prepepending bogo to them).  The better solution would be to
> fix the prototypes and add a test to the configure script to only use
> them when the OS doesn't provide them.

I was working gradually towards getting rid of those functions,
actually.  In my local tree is an auto-growing string thing instead.
Recommend you keep your bogo-hack until the strl* are entirely expunged.

> getopt.h is non-standard.  unistd.h should be used instead (it appears
> to include getopt.h anyway.)

That wasn't even used.  Deleted.

> In the function prepare_master_port(void), the sockaddr_in struct must
> be zeroed before it is used or things get odd and inconsistant.

Oops, of course.  Bug fixed.

> In runtests.pl, I recommend adding this line to the scripts:
> #PBS -S /bin/sh
> which will insure you always use /bin/sh even on systems configured with
> --disable-shell-invoke.

I stuck another config variable at the top of the perl script since I
suspect it would be rather complex to try to probe the pbs config to
figure it out.  You can set $fixed_shell = "/bin/sh" and it always adds
this line now (and turns off the shell tests which aren't in the CVS
yet).

> I also discovered that this line inserts a
> resionable substitute for the echo command which is non-portable (not
> all echos support -e):
> print TMP 'perl -e \'$blah = join("\n",(1..' . $testlines . ')); print $blah . "\n"\'';

The echo thing isn't too pretty as well as being non-portable, but the
perl is kinda scary too.  How about "seq 1 5" instead?  Comes with
sh-utils here in linux-land.  Although I suppose the contents don't
matter, just the count of lines.  Another possibility then is
"yes foo | head -5".  Your guidance would be appreciated.

> At this point some what less then half the test pass, but I can run
> applications.

That's a start.  Many of the tests are exotic uses anyway, and they're
still nowhere near exhaustive.  Thanks for fixing these things.  It will
be a while until the next release comes out (paper deadlines plus
vacation), but I'll remember to let you know then, and we can work to
fix the other broken tests.

		-- Pete



More information about the mpiexec mailing list