OK, i try my code again, on a new sigle machine with LAM 7.1.1 and it works without any change on code. I run 2 processes and work.
I don't know why this code don't run on my cluster, i will try change this:
gcc -I/opt/lam-7.1.1/include -pthread -ldl -lpthread -L/lib -L/opt/
lam-7.1.1/lib -llammpio -llamf77mpi -lmpi -llam -laio -laio -lutil -lcr -ldl
on my single machine that is different, less linkages.
Fabio
=======================
> As I said before, I don't think the problem is with mpirun or
> asc_schedule, but with our ptmalloc code, which is why it appears to
> work with the latest beta releases for Jeff and I. If there is
> another problem, we would like to know what it is, and generally are
> willing to take patches that fix issues relevant to the community as
> a whole.
>
> Brian
>
> On Feb 2, 2006, at 7:40 PM, fescada wrote:
>
> Sorry for late, but i change my mind, i'm trying another solution.
> I change things in mpirun.c and
> asc_schedule.c so i will not try a new release yet. Can be or can
> not easy put my changes in a new release.
>
> Thank you very much for spend your time.
>
>
>> I just tried your application with the latest SVN HEAD and had no
>> problems with it. I just created 7.1.2b31 right now to ensure that
>> it has all the latest stuff we've done at the HEAD; it's now on the
>> web site:
>>
>> http://www.lam-mpi.org/beta/
>>
>> Can you give your application a whirl with it to see if you run into
>> the same problems?
>>
>>
>> On Jan 15, 2006, at 1:35 PM, fescada wrote:
>>
>>> Tanks for your tip Bogdan, but that i already knows.
>>>
>>> I print MPI_provided and i get 2 = MPI_THREAD_SERIALIZED. OK, it is
>>> good to me, but program not run.
>>>
>>> Do I must use some flag in ./configure to indicate the use of
>>> threads?
>>>
>>> I don't knows why it stop, no deadlock possible.
>>>
>>> Tanks
>>>
>>> Foguer
>>>
>>> ---------- Cabeçalho original -----------
>>>
>>>> Hi all, i write a simple code to teste MPI and Threads, but it
>>>> don't work and i don't have any ideia why. I
>>>> think that my problem is the installation. Regular thread programs
>>>> work. MPI programs without threads work to.
>>>>
>>>> I'm using LAM/MPI 7.1.1
>>>> gcc 3.2.2
>>>> Linux Red Hat e kernel 2.4.29
>>>> on a Intel PC cluster
>>>>
>>>> My installation:
>>>> ./configure --with-boot=rsh --with-rsh=ssh
>>>> make
>>>> make install
>>>>
>>>> mpicc -showme
>>>> gcc -I/opt/lam-7.1.1/include -pthread -ldl -lpthread -L/lib -L/opt/
>>>> lam-7.1.1/lib
>>>> -llammpio -llamf77mpi -lmpi -llam -laio -laio -lutil -lcr -ldl
>>>>
>>>> mpicc mpi_helo_thread.c -o helo_thread
>>>> no error or warning reported
>>>>
>>>> My output is:
>>>> Master call...
>>>> Slave 1.
>>>>
>>>> And stop! I need kill program CTRL+C.
>>>> Any suggestion is welcome.
>>>> Tank you.
>>>>
>>>> Foguer
>>>>
>>>> My source.
>>>>
>>>> #include
>>>> #include
>>>> #include
>>>> #include
>>>>
>>>> void * Hello (void * arg) {
>>>> printf("Hello!\n");
>>>> return 0;
>>>> }
>>>>
>>>> int main (int argc, char ** argv) {
>>>>
>>>> int MPI_provided;
>>>> int my_rank;
>>>> pthread_t pt;
>>>>
>>>> MPI_Init_thread (NULL, NULL, MPI_THREAD_SERIALIZED,
>>>> &MPI_provided);
>>>> MPI_Comm_rank (MPI_COMM_WORLD, &my_rank);
>>>>
>>>> if (my_rank == 0) {
>>>> printf("Master call...\n");
>>>> }
>>>> else {
>>>> printf("Slave %d.\n", my_rank);
>>>> pthread_create(&pt, NULL, Hello, NULL);
>>>> pthread_join(pt, NULL);
>>>> fprintf(stderr, "Joined.\n");
>>>> }
>>>>
>>>> MPI_Barrier(MPI_COMM_WORLD);
>>>> MPI_Finalize();
>>>>
>>>> return 0;
>>>> }
|