Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/cloudozer/BWT
Browse files Browse the repository at this point in the history
  • Loading branch information
worker committed Apr 24, 2015
2 parents 85fe60b + df7a17a commit 8857696
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 13 deletions.
2 changes: 1 addition & 1 deletion apps/worker_bwt_app/src/worker_bwt_app_sup.erl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ start_link() ->
init([]) ->
{ok, { {one_for_one, 5, 10}, [

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

]} }.

11 changes: 0 additions & 11 deletions start.sh

This file was deleted.

23 changes: 23 additions & 0 deletions start_cluster.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env escript
%% -*- erlang -*-
%%! -pa ebin deps/lager/ebin deps/goldrush/ebin -setcookie secret_gc -name client@localhost -attached

main([MasterIpStr, WorkersNumStr]) ->
main(["GL000193.1", MasterIpStr, WorkersNumStr]);

main([Chromosome, MasterIpStr, WorkersNumStr]) ->
MasterPid = rpc:call(list_to_atom("master@" ++ MasterIpStr), erlang, whereis,[master]),
WorkersNum = list_to_integer(WorkersNumStr),
process_flag(trap_exit, true),
true = link(MasterPid),
ok = gen_server:call(MasterPid , {run, "bwt_files/SRR770176_1.fastq", Chromosome, WorkersNum}),
receive_cigars().

receive_cigars() ->
receive
{cigar, SeqName, Chromosome, Pos, CigarValue, CigarRate, SeqValue} ->
io:format("~s ~s ~b ~s ~b ~s~n", [SeqName, Chromosome, Pos, CigarValue, CigarRate, SeqValue]),
receive_cigars();

Error -> io:format("Error: ~p~n", [Error])
end.
2 changes: 1 addition & 1 deletion start_local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
%%! -pa ebin deps/lager/ebin deps/goldrush/ebin -setcookie secret_gc -name master@localhost -attached

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

0 comments on commit 8857696

Please sign in to comment.