Skip to content

Commit 8857696

Browse files
author
worker
committed
Merge branch 'master' of https://github.com/cloudozer/BWT
2 parents 85fe60b + df7a17a commit 8857696

4 files changed

Lines changed: 25 additions & 13 deletions

File tree

apps/worker_bwt_app/src/worker_bwt_app_sup.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ start_link() ->
2525
init([]) ->
2626
{ok, { {one_for_one, 5, 10}, [
2727

28-
{worker_bwt, {worker_bwt, start_link, [{master, 'master@45.55.245.10'}]}, permanent, 5000, worker, [worker_bwt]}
28+
{worker_bwt, {worker_bwt, start_link, [{master, 'master@erlangonxen.org'}]}, permanent, 5000, worker, [worker_bwt]}
2929

3030
]} }.
3131

start.sh

Lines changed: 0 additions & 11 deletions
This file was deleted.

start_cluster.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/usr/bin/env escript
2+
%% -*- erlang -*-
3+
%%! -pa ebin deps/lager/ebin deps/goldrush/ebin -setcookie secret_gc -name client@localhost -attached
4+
5+
main([MasterIpStr, WorkersNumStr]) ->
6+
main(["GL000193.1", MasterIpStr, WorkersNumStr]);
7+
8+
main([Chromosome, MasterIpStr, WorkersNumStr]) ->
9+
MasterPid = rpc:call(list_to_atom("master@" ++ MasterIpStr), erlang, whereis,[master]),
10+
WorkersNum = list_to_integer(WorkersNumStr),
11+
process_flag(trap_exit, true),
12+
true = link(MasterPid),
13+
ok = gen_server:call(MasterPid , {run, "bwt_files/SRR770176_1.fastq", Chromosome, WorkersNum}),
14+
receive_cigars().
15+
16+
receive_cigars() ->
17+
receive
18+
{cigar, SeqName, Chromosome, Pos, CigarValue, CigarRate, SeqValue} ->
19+
io:format("~s ~s ~b ~s ~b ~s~n", [SeqName, Chromosome, Pos, CigarValue, CigarRate, SeqValue]),
20+
receive_cigars();
21+
22+
Error -> io:format("Error: ~p~n", [Error])
23+
end.

start_local.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
%%! -pa ebin deps/lager/ebin deps/goldrush/ebin -setcookie secret_gc -name master@localhost -attached
44

55
main([]) ->
6-
master:test_local(),
6+
master:test(),
77
receive stop -> ok end.

0 commit comments

Comments
 (0)