Hi Max,
thanks for your suggestions. It (strace) helped me to get it run!!!!!
./oxmpi cpi.ox
Ox version 4.02 (Linux) (C) J.A. Doornik, 1994-2006
Process 0 of 1 on bib2
id: 0 n=1000
id: 0 sum=3141.59
pi=3.1415927369231227, Error=0.0000000833333296
wall clock time = 0.00150895
Ok. I'm using just one computer, because the other is not currently not available, but it works.
I was ask to give a brief summary how I get it work. It will follow soon!!
Regards, Jan.
> -----Ursprüngliche Nachricht-----
> Von: Max Bruche <[log in to unmask]>
> Gesendet: 30.06.06 14:12:29
> An: Jan Meyer <[log in to unmask]>
> CC: [log in to unmask]
> Betreff: Re: oxmpi
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi Jan,
>
> the error messages that Ox produces when something goes wrong in
> loading a shared object are usually not that informative.
>
> One thing that I do to check that the files are all loaded correctly
> is to run strace on this, and then examine the output:
> strace -o strace.out oxl myprogram.
>
> This gives you a strace.out file, which you can have a look at - it
> contains all system calls, which tells you e.g. in what order Ox
> tried to open files in various directories and whether it succeeded
> in doing that or not.
>
> Sometimes, Ox can load files, but cannot resolve symbols, in which
> case you get the same type of message. In that case, it sometimes
> helps to hunt around with nm.
>
> The jd*.h files etc - shouldn't they go into the dev subdirectory,
> the location of which is given in the makefile you have below.
>
> Regards,
>
> Max
>
>
> On Jun 30, 2006, at 1:20 PM, Jan Meyer wrote:
>
> > Dear all,
> >
> > I have a problem concerning "oxmpi". I am using a Gentoo 32-Bit
> > Machine with
> > gcc 3.4.4 and Ox 4.02. I have already installed and tested lam-mpi
> > (open-mpi
> > respectively) with programs written in C. Everything worked fine.
> >
> > I have downloaded the "oxbase.rpm" file and extracted it with rpm2tar.
> > Then I copied the extracted files into the given directories.
> > After changing some permissions I was able to start "oxl
> > myfirst.ox". It
> > worked fine.
> >
> >
> > Then I have installed the "dev" and the "oxmpi" extensions. In
> > order to create
> > a "oxmpi.so" I copied "oxmpi.c" and "oxmpirun.c" into the oxmpi/src/
> > linux
> > folder and did "make -f oxmpi.mak" without any error. After
> > compiling I
> > copied "oxmpi.so" to the /ox-4.00/packages/oxmpi folder.
> > After changing some values in "oxmpirun.mak" I started "make -f
> > oxmpirun.mak":
> >
> > ---------------------------
> > mpicc -o oxmpi oxmpirun.o -Wl,-Bdynamic
> > -Wl,-rpath,/usr/local/lib/ox-4.00/bin /usr/local/lib/ox-4.00/bin/
> > libox.so.4.0.2
> > strip oxmpi
> >
> > --------------------------
> > I also copied "oxmpi" to "/ox-4.00/packages/oxmpi/".
> >
> > After doing this I tried to execute the following code (called cpi-
> > test.ox):
> >
> > -------------------------------------------
> > #include </usr/local/lib/ox-4.00/include/oxstd.h>
> > #include </usr/local/lib/ox-4.00/packages/oxmpi/oxmpi.h>
> >
> > main()
> > {
> > OxMPI_Init();
> >
> > OxMPI_Finalize();
> > }
> > ------------------------------------------
> >
> > I tried to start the programming by:
> >
> > /usr/local/lib/ox-4.00/packages/oxmpi $ oxl cpi-test.ox
> >
> > Ox version 4.02 (Linux) (C) J.A. Doornik, 1994-2006
> > ----------------------------------------------------------------------
> > -------
> > It seems that at least one rank invoked some MPI function before
> > invoking MPI_INIT. The only information that I can give is that it
> > was PID 7885 on host bib2.
> > ----------------------------------------------------------------------
> > -----
> >
> > and then by:
> >
> > /usr/local/lib/ox-4.00/packages/oxmpi $ ./oxmpi cpi-test.ox
> >
> > Ox version 4.02 (Linux) (C) J.A. Doornik, 1994-2006
> > cpi-test.ox Link error: 'oxmpi' cannot load dll
> > cpi-test.ox Link error: 'oxmpi' cannot load dll
> > cpi-test.ox Link error: 'OxMPI_Finalize' undefined function
> > cpi-test.ox Link error: 'OxMPI_Init' undefined function
> >
> >
> > What went wrong? Thank you for your help.
> >
> > Thanks, Jan.
> >
> > P.S. I copied jd*.h, oxtypes.h, oxexport.h
> > into /usr/local/lib/ox-4.00/packages/oxmpi/src/linux/.
> > P.P.S The used makefiles can be found below:
> >
> > #-------------------------------------------------------------------
> > # O X M P I D L L M A K E F I L E
> > #-------------------------------------------------------------------
> >
> > all : compile
> >
> > OXHOME = /usr/local/lib/ox-4.00
> > CC = mpicc
> > CFLAGS = -Wall -O2 -D__cdecl= -c -I$(OXHOME)/dev -DSKIP_MPI_Init
> > LIBNAME = oxmpi.so
> > CPATH = .
> >
> > %.o : $(CPATH)/%.c
> > $(CC) $(CFLAGS) -fPIC $<
> >
> > OBJECTS_SO = oxmpi.o
> >
> > compile : $(OBJECTS_SO)
> > $(CC) -shared -o $(LIBNAME) $^
> >
> >
> > #-------------------------------------------------------------------
> > # O X M P I R U N S T A T I C M A K E F I L E
> > #-------------------------------------------------------------------
> >
> > all : compile link
> >
> > OXHOME = /usr/local/lib/ox-4.00
> > CC = mpicc
> > CFLAGS = -Wall -O2 -D__cdecl= -c -I$(OXHOME)/dev
> > CPATH = .
> > FULLNAME = libox.so.4.0.2
> > #STATLIBS = -Wl,-Bstatic
> > DYNLIBS = -Wl,-Bdynamic -Wl,-rpath,$(OXHOME)/bin $(OXHOME)/bin/$
> > (FULLNAME)
> >
> > %.o : $(CPATH)/%.c
> > $(CC) $(CFLAGS) $<
> >
> > OBJECTS = oxmpirun.o
> >
> > compile : $(OBJECTS)
> >
> > link :
> > $(CC) -o oxmpi $(STATLIBS) $(OBJECTS) $(DYNLIBS)
> > strip oxmpi
> >
> > --
> > -----------------------------------------------------------
> >
> > Jan Meyer
> > Jagdweg 18 b
> > 53115 Bonn
> > Germany
> > -----------------------------------------------------------
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.4 (Darwin)
>
> iD8DBQFEpRUnFZqnobGuJWoRAvvXAJ9M+Aw/tkQo5qMQtJlNOf86Q/2RwgCfYxwS
> NEg4/EJrQ1N0xoc09VIZ5Ts=
> =1V7i
> -----END PGP SIGNATURE-----
______________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193
|