Re: [OMPI users] Question - OTF file

2010-03-26 Thread Matthias Jurenz
Hello Arthur,

the files which you obtained look good to me and you did the correct approach 
to get these files. Did you get any error message from Vampir?
Do the trace work with the OTF tools 'otfdump' or 'otfprofile'?

Matthias

On Thursday 25 March 2010 04:16:21 Arthur Trojanowski wrote:
> Hello
> My name is Arthur Trojanowski I just tested Vampir software.
> I have installed the MPI version 1.4
> I would like to know how to generate the correct OTF file in VampirTrace
> I have written a small C program with support for MPI
> To compile the program I use the command:
> mpicc-vt -vt:inst gnu -vt:verbose -o new.out new.c
> Generates a file new.out. When I start it up:
> mpiexec -np 6 new.out
> creates a small OTF file a.otf and several files a.0.def.z, 
> a.1.events.z, a.2.events.z etc.
> Vampir will not open this OTF file
> Can you tell me what I am doing wrong.
> If you need any additional information about this error, please contact 
> with me
> Greets
> Arthur


[OMPI users] Segmentation fault (11)

2010-03-26 Thread Jean Potsam
Dear All,
  I am having a problem with openmpi . I have installed openmpi 1.4 
and blcr 0.8.1
 
I have written a small mpi application as follows below:
 
###
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include
#include  
#include 
 
#define BUFFER_SIZE PIPE_BUF
 
char * getprocessid() 
{
    FILE * read_fp;
    char buffer[BUFSIZ + 1];
    int chars_read;
    char * buffer_data="12345";
    memset(buffer, '\0', sizeof(buffer));
  read_fp = popen("uname -a", "r");
 /*
  ...
 */ 
 return buffer_data;
}
 
int main(int argc, char ** argv)
{
  MPI_Status status;
 int rank;
   int size;
char * thedata;
    MPI_Init(&argc, &argv);
    MPI_Comm_size(MPI_COMM_WORLD,&size);
    MPI_Comm_rank(MPI_COMM_WORLD,&rank);
 thedata=getprocessid();
 printf(" the data is %s", thedata);
    MPI_Finalize();
}

 
I get the following result:
 
###
jean@sunn32:~$ mpicc pipetest2.c -o pipetest2
jean@sunn32:~$ mpirun -np 1 -am ft-enable-cr -mca btl ^openib  pipetest2
[sun32:19211] *** Process received signal ***
[sun32:19211] Signal: Segmentation fault (11)
[sun32:19211] Signal code: Address not mapped (1)
[sun32:19211] Failing at address: 0x4
[sun32:19211] [ 0] [0xb7f3c40c]
[sun32:19211] [ 1] /lib/libc.so.6(cfree+0x3b) [0xb796868b]
[sun32:19211] [ 2] /usr/local/blcr/lib/libcr.so.0(cri_info_free+0x2a) 
[0xb7a5925a]
[sun32:19211] [ 3] /usr/local/blcr/lib/libcr.so.0 [0xb7a5ac72]
[sun32:19211] [ 4] /lib/libc.so.6(__libc_fork+0x186) [0xb7991266]
[sun32:19211] [ 5] /lib/libc.so.6(_IO_proc_open+0x7e) [0xb7958b6e]
[sun32:19211] [ 6] /lib/libc.so.6(popen+0x6c) [0xb7958dfc]
[sun32:19211] [ 7] pipetest2(getprocessid+0x42) [0x8048836]
[sun32:19211] [ 8] pipetest2(main+0x4d) [0x8048897]
[sun32:19211] [ 9] /lib/libc.so.6(__libc_start_main+0xe5) [0xb7912455]
[sun32:19211] [10] pipetest2 [0x8048761]
[sun32:19211] *** End of error message ***
#
 
 
However, If I compile the application using gcc, it works fine. The problem 
arises with:
  read_fp = popen("uname -a", "r");
 
Does anyone has an idea how to resolve this problem?
 
Many thanks 
 
Jean