github.com/DARA-Project/GoDist-Scheduler@v0.0.0-20201030134746-668de4acea0d/examples/sharedIntegerChannel_test/run.sh (about)

     1  #!/bin/bash
     2  dgo='/usr/bin/dgo'
     3  PROCESSES=1
     4  Program=sharedIntegerChannel
     5  SchedulerDir=github.com/DARA-Project/GoDist-Scheduler
     6  export PATH="$PATH:$GOPATH/bin"
     7  
     8  killall GoDist-Scheduler
     9  
    10  if [ $1 == "-k" ];then
    11      exit
    12  fi
    13  
    14  
    15  #do i need to alloc the shared memory here?
    16  
    17  echo INSTALLING THE SCHEDULER
    18  $dgo install $SchedulerDir
    19  
    20  rm DaraSharedMem
    21  dd if=/dev/zero of=./DaraSharedMem bs=400M count=1
    22  chmod 777 DaraSharedMem
    23  exec 666<> ./DaraSharedMem
    24  
    25  echo "GoDist-Scheduler $1 $2 1>s.out 2>s.out &"
    26  GoDist-Scheduler $1 $2 1> s.out 2> s.out &
    27  sleep 2
    28  
    29  
    30  #$1 is either -w (record) or -r (replay)
    31  $dgo build $Program.go
    32  
    33  ##Turn on dara
    34  export GOMAXPROCS=1
    35  export DARAON=true
    36  export DARAPID=1
    37  export DARA_PROFILING=true
    38  ./$Program