[bolt-discuss] Error ABT_mutex_lock: 20

Halim Amer aamer at anl.gov
Thu Mar 16 10:40:58 CDT 2017


Hi Carlos,

Thanks for reporting this. We will look into this issue and keep you posted.

Halim
www.mcs.anl.gov/~aamer

On 3/16/17 9:17 AM, Carlos Henrique Rebollo wrote:
> Hello,
>
> I Have compiled llvm 3.9.1 bolt 1.0a1 and argobots 1.0a1
>
> And tried use in simple task code.
>
> And I have get this on execution.
>
> [mutex.c:172] ABT_mutex_lock: 20
> Segmentation fault (core dumped)
>
> Worked with gcc and icc.
>
>
> Best wishes,
>
> Carlos Rebollo.
>
> gdb information
>
> Core was generated by `./a.out'.
> Program terminated with signal 11, Segmentation fault.
> #0  0x00007f64ca2426c2 in ABT_mutex_create ()
>    from /usr/local/llvm-bolt-argobots/lib/../lib/libabt.so.0
> (gdb) where
> #0  0x00007f64ca2426c2 in ABT_mutex_create ()
>    from /usr/local/llvm-bolt-argobots/lib/../lib/libabt.so.0
> #1  0x00007f64caa75300 in __kmp_do_serial_initialize ()
>     at
> /usr/local/src/llvm/projects/openmp/runtime/src/abt/kmp_abt_runtime.c:139
> #2  0x00007f64caa75a5a in __kmp_do_middle_initialize ()
>     at
> /usr/local/src/llvm/projects/openmp/runtime/src/abt/kmp_abt_runtime.c:363
> #3  0x00007f64caa75ddb in __kmp_middle_initialize ()
>     at
> /usr/local/src/llvm/projects/openmp/runtime/src/abt/kmp_abt_runtime.c:470
> #4  0x00007f64caa99362 in __kmp_api_omp_get_num_procs ()
>     at
> /usr/local/src/llvm/projects/openmp/runtime/src/abt/kmp_abt_ftn_entry.h:444
> #5  0x0000000000400b09 in main ()
>
> code
>
> #include <stdio.h>
> #include <stdlib.h>
> #include <omp.h>
> #include <unistd.h>
>
>
> int main(){
>         int i=0,j=0,res;
>         int mprocs=0;
>         int *pprocs;
>         pprocs=malloc(sizeof(int)*omp_get_num_procs());
>         for(i=0;i<omp_get_num_procs();i++)
>                 pprocs[i]=0;
>         #pragma omp parallel private(res)
>         {
>                 res=0;
>                 #pragma omp for private(i,j) nowait
>                 for(i=0;i<omp_get_num_procs()*10;i++){
>                         for(j=0;j<omp_get_thread_num()*100;j++)
>                         {
>                                 res=res+1;
>                                 //printf("for %i,%i res=%i thread
> %i\n",i,j,res,omp_get_thread_num());
>                         }
>                 }
>                 printf("res=%i thread %i\n",res,omp_get_thread_num());
>                 #pragma omp single
>                 {
>                         printf("Processo %i dentro single total %i\n",
> omp_get_thread_num(),omp_get_num_threads());
>                         for(i=0;i<omp_get_num_procs()*10;i++){
>                         #pragma omp task
>                         {
>                                 pprocs[omp_get_thread_num()]++;
>                                 if( omp_get_num_threads() > mprocs )
> mprocs=omp_get_num_threads();
>
>                                 printf("Processo %i dentro task total
> %i\n",
> omp_get_thread_num(),omp_get_num_threads());
>                         }
>                         }
>                 }
>         }
>         for(i=0;i<omp_get_num_procs();i++)
>                 printf("%i process %i itens\n",i,pprocs[i]);
>         printf("quantidade de processos %i\n",mprocs);
>         free(pprocs); pprocs=NULL;
>         return 0;
> }
>
>
> _______________________________________________
> discuss mailing list
> discuss at lists.bolt-omp.org
> https://lists.bolt-omp.org/mailman/listinfo/discuss


More information about the discuss mailing list