On Saturday, November 9, 2002, at 05:00 PM, xmpi-request_at_[hidden]
wrote:
> Hi
>
> I'm the current developer on XMPI (although no progress has been made
> lately :( ).
>
> I'm still contemplating what to do with XMPI (porting it to GTK / QT is
> a continual topic of discussion), but have yet to find a really good
> way
> to make it fairly easy to add new GUI front ends. In the mean time,
> hacking at the code is probably the best way to figure out what is
> going
> on (design docs? What design docs? :).
>
> Anyway, we are always happy to accept patches / suggestions / etc.
>
> Brian
>
I find the XMPI code easy to follow and understand. The file name
scheme is pretty clear.
However, until a few days ago I didn't pay much attention to libxmpi. I
though it was an independent subset of xmpi. Now I realize that most of
what I need is there, and that xmpi uses it. Besides, xmpi is not
really written in as an OOP, and this project should be my fist serious
work in this area.
So I decide to create a new GUI instead of porting the xmpi GUI, and
linking it to libxmpi. I quickly found out that libxmpi has some Motif
in it.
Here is my teste case:
1. Using xmpi, I create a aschema file to run the cpi application that
comes with LAM. I save it as pi.xmpi.
2. I created the following program to try to read it:
///////////////////////////////
#include <stdio.h>
#include "xmpi_sys.h"
int main() {
int result, app_npro;
_gps *app_procs;
char *aschema = "pi.xmpi";
result = xmpi_sys_init();
printf("Start = %d\n", result);
result = xmpi_sys_run(aschema, &app_procs, &app_npro);
printf("End = %d\n", result);
return 0;
}
///////////////////////////////
Pretty simple. I can compile it with
hcp -c -o pi.o -I ../xmpi-2.2.3b6/src/xmpi/ pi.cc
but when I try to link it with
hcp -o pi pi.o -lxmpi -L/usr/X11R6/lib -lSM -lICE -lXm -lXt -lX11 -lm
I get
ld: Undefined symbols:
xmpi_error(_WidgetRec*, char const*, bool)
BTW: don't be surprised with "hcp". Under OSX, mpiCC and mpicc are the
same (grr, case preserving but case insensitive). hcp is a wrapper to
mpiCC.
Some kind of error is to be expected, since xmpi_error isn't
implemented.
So my next step was: create a different libxmpi that includes a
different definition of xmpi_error, one that does not need Motif stuff.
I created a xmpi_error.h file with the lines:
///////////////////////////////
#ifndef _XMPI_ERROR_H_
#define _XMPI_ERROR_H_
void xmpi_error(int, const char*, bool DisplaySystem = true);
#endif
///////////////////////////////
and told the two files that included the original xmpi_error.h to
include this one instead. The files are xmpi_asc_parse.cc and
xmpi_sys.lam.cc, in the libxmpi folder.
Next I built this modified library, but didn't install it.
I also created a new xmpi_error.cc file, with a very simple
implementation of the new xmpi_error function:
///////////////////////////////
#include <stdio.h>
#include "modified/xmpi_error.h"
void xmpi_error(int fake_num, char const *error_message, bool
fake_flag) {
printf("%s\n", error_message);
}
///////////////////////////////
Noticed that it includes the modified xmpi_error.h.
Next, I compiled this file with:
hcp -c -o xmpi_error.o -I ../xmpi-2.2.3b6/src/xmpi xmpi_error.cc
and linked everything with
hcp -o pi pi.o ../xmpi-2.2.3b6/src/libxmpi/.libs/libxmpi.a xmpi_error.o
It seems to be working fine. Launching ./pi without lam gives:
Start = 0
Please boot LAM
End = -1
Launching ./pi without the schema file gives:
Start = 0
Application schema "pi.xmpi"
Parsing application
End = -1
Launching ./pi without the cpi program gives:
Start = 0
mpirun: cannot start cpi on n0 (o): No such file or directory
Cannot start "cpi"
End = -1
Finaly, when everything is fine I get:
Start = 0
End = 0
And then it launches cpi as it should.
Sorry to make this post so long and so precise. I just hope it might be
usefull to other newbies like me.
I have a question: is this dependency of libxmpi on Motif a mistake? Or
are there other API functions that dependend more heavily on Motif?
From the API docs, it is not obvious that such a dependence is needed.
Thanks for your answer and help.
Paulo
>
> On Tue, 5 Nov 2002, Paulo Tribolet Abreu wrote:
>
>> Hi all:
>>
>> I'd like to report I started the port of XMPI GUI to wxWindows
>> (www.wxwindows.org). The port is being done on MacOSX, but it should
>> be
>> available to any system running wxWindows (and any MPI implementation
>> that XMPI supports). I am planning to call it wXMPI, but if I am able
>> to integrate it nicely with the XMPI sources, there might be no need
>> for a new name.
>>
>> The port has just started, so this is a good time for tips,
>> suggestions, warnings, etc.
>>
>> The main objective is to reproduce the complete functionality of XMPI,
>> adding localization (multi-language support).
>>
>> I am a newbie in all the areas (OOP, C++, GUI, wxWindows and MPI), but
>> I am already having fun ;-)
>>
>> You can reach me at paulotex at gmx dot net
>>
>> Paulo
>>
>> _______________________________________________
>> This list is archived at
>> http://www.lam-mpi.org/MailArchives/xmpi/
>>
>
> --
> Brian Barrett
> LAM/MPI developer and all around nice guy
> Have a LAM/MPI day: http://www.lam-mpi.org/
>
>
>
|