| Author |
Message |
|
| uffe |
Posted: Sat Jun 16, 2007 1:20 pm |
|
|
|
User
Joined: 02 Mar 2005
Posts: 365
Location: Sweden
|
I noticed that Erlang HiPE suddenly scores so badly on the shootout
benchmarks that it's not even included in the overall listing
(errors and timeouts on too many tests, I guess)
Does anyone feel like investigating the cause?
BR,
Ulf W
_______________________________________________
erlang-questions mailing list
erlang-questions@erlang.org
http://www.erlang.org/mailman/listinfo/erlang-questions
Post recived from mailinglist |
|
|
| Back to top |
|
| pergu |
Posted: Sat Jun 16, 2007 2:13 pm |
|
|
|
User
Joined: 01 Mar 2005
Posts: 37
Location: Uppsala Sweden
|
Ulf Wiger wrote:
> I noticed that Erlang HiPE suddenly scores so badly on the shootout
> benchmarks that it's not even included in the overall listing
> (errors and timeouts on too many tests, I guess)
>
> Does anyone feel like investigating the cause?
>
> BR,
> Ulf W
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@erlang.org
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
It seems that they get the following error message in most programs that
no longer works:
{error_logger,{{2007,5,13},{10,36,42}},supervisor_report,[{supervisor,{<0.21.0>,user_sup}},{errorContext,child_terminated},{reason,ebadf},{offender,[{pid,<0.22.0>},{mod,user_sup}]}]}
{error_logger,{{2007,5,13},{10,36,42}},"** Generic server ~p terminating
\n** Last message in was ~p~n** When Server state == ~p~n** Reason for
termination == ~n**
~p~n",[<0.21.0>,{'EXIT',<0.22.0>,ebadf},{state,user_sup,undefined,<0.22.0>,{<0.21.0>,user_sup}},ebadf]}
{error_logger,{{2007,5,13},{10,36,42}},crash_report,[[{pid,<0.21.0>},{registered_name,[]},{error_info,ebadf},{initial_call,{gen,init_it,[gen_server,<0.9.0>,<0.9.0>,supervisor_bridge,[user_sup,[],self],[]]}},{ancestors,[kernel_sup,<0.8.0>]},{messages,[]},{links,[<0.9.0>]},{dictionary,[]},{trap_exit,true},{status,running},{heap_size,233},{stack_size,21},{reductions,192}],[]]}
{error_logger,{{2007,5,13},{10,36,42}},supervisor_report,[{supervisor,{local,kernel_sup}},{errorContext,child_terminated},{reason,ebadf},{offender,[{pid,<0.21.0>},{name,user},{mfa,{user_sup,start,[]}},{restart_type,temporary},{shutdown,2000},{child_type,supervisor}]}]}
_______________________________________________
erlang-questions mailing list
erlang-questions@erlang.org
http://www.erlang.org/mailman/listinfo/erlang-questions
Post recived from mailinglist |
|
|
| Back to top |
|
| uffe |
Posted: Sat Jun 16, 2007 2:54 pm |
|
|
|
User
Joined: 02 Mar 2005
Posts: 365
Location: Sweden
|
ebadf
The file is not opened for reading.
...according to the OTP docs.
It would seem like a build problem on the AMD.
On gentoo (Intel), the same programs run without fault.
/U
2007/6/16, Per Gustafsson <per.gustafsson@it.uu.se>:
> Ulf Wiger wrote:
> > I noticed that Erlang HiPE suddenly scores so badly on the shootout
> > benchmarks that it's not even included in the overall listing
> > (errors and timeouts on too many tests, I guess)
> >
> > Does anyone feel like investigating the cause?
> >
> > BR,
> > Ulf W
> > _______________________________________________
> > erlang-questions mailing list
> > erlang-questions@erlang.org
> > http://www.erlang.org/mailman/listinfo/erlang-questions
> >
> It seems that they get the following error message in most programs that
> no longer works:
>
> {error_logger,{{2007,5,13},{10,36,42}},supervisor_report,[{supervisor,{<0.21.0>,user_sup}},{errorContext,child_terminated},{reason,ebadf},{offender,[{pid,<0.22.0>},{mod,user_sup}]}]}
> {error_logger,{{2007,5,13},{10,36,42}},"** Generic server ~p terminating
> \n** Last message in was ~p~n** When Server state == ~p~n** Reason for
> termination == ~n**
> ~p~n",[<0.21.0>,{'EXIT',<0.22.0>,ebadf},{state,user_sup,undefined,<0.22.0>,{<0.21.0>,user_sup}},ebadf]}
> {error_logger,{{2007,5,13},{10,36,42}},crash_report,[[{pid,<0.21.0>},{registered_name,[]},{error_info,ebadf},{initial_call,{gen,init_it,[gen_server,<0.9.0>,<0.9.0>,supervisor_bridge,[user_sup,[],self],[]]}},{ancestors,[kernel_sup,<0.8.0>]},{messages,[]},{links,[<0.9.0>]},{dictionary,[]},{trap_exit,true},{status,running},{heap_size,233},{stack_size,21},{reductions,192}],[]]}
> {error_logger,{{2007,5,13},{10,36,42}},supervisor_report,[{supervisor,{local,kernel_sup}},{errorContext,child_terminated},{reason,ebadf},{offender,[{pid,<0.21.0>},{name,user},{mfa,{user_sup,start,[]}},{restart_type,temporary},{shutdown,2000},{child_type,supervisor}]}]}
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@erlang.org
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
_______________________________________________
erlang-questions mailing list
erlang-questions@erlang.org
http://www.erlang.org/mailman/listinfo/erlang-questions
Post recived from mailinglist |
|
|
| Back to top |
|
| axel |
Posted: Sun Jun 17, 2007 10:31 am |
|
|
|
User
Joined: 03 Mar 2005
Posts: 271
|
On 2007-06-16 15:13, Ulf Wiger wrote:
> I noticed that Erlang HiPE suddenly scores so badly on the shootout
> benchmarks that it's not even included in the overall listing
when i look at
http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=all
(which i think might be the overall listing) erlang hipe is about #20.
is this what you are referring to?
bengt
--
Those were the days...
EPO guidelines 1978: "If the contribution to the known art resides
solely in a computer program then the subject matter is not
patentable in whatever manner it may be presented in the claims."
_______________________________________________
erlang-questions mailing list
erlang-questions@erlang.org
http://www.erlang.org/mailman/listinfo/erlang-questions
Post recived from mailinglist |
|
|
| Back to top |
|
| uffe |
Posted: Sun Jun 17, 2007 2:01 pm |
|
|
|
User
Joined: 02 Mar 2005
Posts: 365
Location: Sweden
|
|
| Back to top |
|
| Guest |
Posted: Sun Jun 17, 2007 2:28 pm |
|
|
|
Guest
|
|
| Back to top |
|
| Guest |
Posted: Sun Jun 17, 2007 4:48 pm |
|
|
|
Guest
|
| Seems to work OK on Mac OS |
|
|
| Back to top |
|
| axel |
Posted: Mon Jun 18, 2007 8:23 am |
|
|
|
User
Joined: 03 Mar 2005
Posts: 271
|
|
| Back to top |
|
| uwiger |
Posted: Mon Jun 18, 2007 4:54 pm |
|
|
|
User
Joined: 03 Jul 2006
Posts: 604
Location: Sweden
|
Now it seems ok again. It was problably just som
problem with the build on the AMD.
BR,
Ulf W
BTW, I made minor optimizations of the n-body
benchmark (Erlang Hipe #3), and then started
looking at the Mandelbrot. Requiring the program
to output one byte at a time is cruel and unusual
punishment for the lowly Erlang programmer.
Couldn't we introduce a BIF, erlang:put_chars(IoList),
(or possibly put_chars(stdout | stderr, IoList))
which simply writes the given bytes to stdout?
This would be similar to erlang:display(Term), but
without the auto-formatting of erlang terms, and
without the trailing newline.
I understand that there are great advantages to
using the standard IO subsystem, but it seems a bit
rude to not have raw output for those who want
that, and nothing else.
BR,
Ulf W
> -----Original Message-----
> From: erlang-questions-bounces@erlang.org
> [mailto:erlang-questions-bounces@erlang.org] On Behalf Of
> Bengt Kleberg
> Sent: den 18 juni 2007 10:19
> To: Erlang Questions
> Subject: Re: [erlang-questions] what's happened in the shootout
>
> On 2007-06-17 16:25, Mike McNally wrote:
> >> No, I was looking at this:
> >>
> >>
> http://shootout.alioth.debian.org/debian/benchmark.php?test=all&lang=
> >> all
> >>
> >> BR,
> >> Ulf W
> >
> > It seems to be failing many of the benchmarks.
>
> where can i see this?
> is it on
> http://shootout.alioth.debian.org/debian/benchmark.php?test=al
l&lang=all
> as mentioned above?
>
>
> bengt
> --
> Those were the days...
> EPO guidelines 1978: "If the contribution to the known art resides
> solely in a computer program then the subject matter is not
> patentable in whatever manner it may be presented in the claims."
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@erlang.org
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
_______________________________________________
erlang-questions mailing list
erlang-questions@erlang.org
http://www.erlang.org/mailman/listinfo/erlang-questions
Post recived from mailinglist |
|
|
| Back to top |
|
| uwiger |
Posted: Mon Jun 18, 2007 5:55 pm |
|
|
|
User
Joined: 03 Jul 2006
Posts: 604
Location: Sweden
|
|
| Back to top |
|
| uwiger |
Posted: Mon Jun 18, 2007 6:54 pm |
|
|
|
User
Joined: 03 Jul 2006
Posts: 604
Location: Sweden
|
Klacke wrote:
>
> We already have such an efficent BIF:
>
> -module(out).
> -compile(export_all).
>
> outp() ->
> P = open_port({fd, 1, 1}, [out]).
>
> test() ->
> P = outp(),
> port_command(P, "Hi there \r\n"),
> port_command(P, <<"Hi there again\r\n">>),
> port_command(P, ["And ", <<"hello">>, "again", "\r\n"]).
Yeah, I noticed after some experimentation.
Do you think programs like this one would be
accepted in the shootout?
-module(sumcol).
-export([main/1]).
-export([start/0]).
%% get the program argument, which is how many test iterations to run
%% for this test, we ignore this parameter
main(_Args) ->
user ! {self(), wait_ready},
receive
ready ->
halt()
end.
%% callback function for custom user process
start() ->
spawn(fun() ->
process_flag(priority,high),
register(user, self()),
read_in(open_port({fd,0,1}, [{line,80},eof]), 0)
end).
read_in(Port, Sum) ->
receive
{Port, {data, {Eol, Str}}} when Eol==eol; Eol==noeol->
read_in(Port, Sum + list_to_integer(Str));
{Port, eof} ->
ready(Port, Sum)
end.
ready(Port, Sum) ->
port_command(Port, [integer_to_list(Sum), "\n"]),
erlang:port_close(Port),
receive
{From, wait_ready} ->
From ! ready
end.
It runs circles around the posted version that uses
the io module, _and_ uses less memory.
(Original)
ws73032> time erl -boot start_clean -noshell -run sumcol0 main 1000 < sum-in.txt
2907096
3.55u 0.18s 0:03.82 97.6%
(My version)
ws73032> time erl -boot start_clean -user sumcol -run sumcol main 1000 < sum-in.txt
2907096
0.34u 0.11s 0:00.63 71.4%
It does say that "Programs should use built-in line-oriented I/O functions rather than custom-code", but arguably, this program does exactly that.
/Uffe
> -----Original Message-----
> From: Claes Wikstr |
|
|
| Back to top |
|
| uwiger |
Posted: Mon Jun 18, 2007 6:54 pm |
|
|
|
User
Joined: 03 Jul 2006
Posts: 604
Location: Sweden
|
I wrote:
>
> BTW, I noticed that many tests in the shootout have command
> lines that look like this:
>
> /usr/local/bin/erl -noinput -noshell -run nbody main %A
>
> It's not obvious from the documentation, but the flags
> -nouser, -noinput,
Gahh, emacs fingers in Outlook again!
It's not obvious from the documentation, but the flags
-nouser, -noinput, -user U, -noshell, -oldshell -master Node
all override each other such that only the last one on the
command line is considered.
Here's the relevant code in user_sup.erl:
get_user() ->
Flags = init:get_arguments(),
check_flags(Flags, {user_drv, start, []}).
check_flags([{nouser, []} |T], _) -> check_flags(T, nouser);
check_flags([{user, [User]} | T], _) ->
check_flags(T, {list_to_atom(User), start, []});
check_flags([{noshell, []} | T], _) -> check_flags(T, {user, start,
[]});
check_flags([{oldshell, []} | T], _) -> check_flags(T, {user, start,
[]});
check_flags([{noinput, []} | T], _) -> check_flags(T, {user, start_out,
[]});
check_flags([{master, [Node]} | T], _) ->
check_flags(T, {master, list_to_atom(Node)});
check_flags([_H | T], User) -> check_flags(T, User);
check_flags([], User) -> User.
BR,
Ulf W
_______________________________________________
erlang-questions mailing list
erlang-questions@erlang.org
http://www.erlang.org/mailman/listinfo/erlang-questions
Post recived from mailinglist |
|
|
| Back to top |
|
| klacke |
Posted: Mon Jun 18, 2007 7:24 pm |
|
|
|
User
Joined: 28 Feb 2005
Posts: 138
|
Ulf Wiger (TN/EAB) wrote:
>
> Couldn't we introduce a BIF, erlang:put_chars(IoList),
> (or possibly put_chars(stdout | stderr, IoList))
> which simply writes the given bytes to stdout?
>
We already have such an efficent BIF:
-module(out).
-compile(export_all).
outp() ->
P = open_port({fd, 1, 1}, [out]).
test() ->
P = outp(),
port_command(P, "Hi there \r\n"),
port_command(P, <<"Hi there again\r\n">>),
port_command(P, ["And ", <<"hello">>, "again", "\r\n"]).
/klacke
_______________________________________________
erlang-questions mailing list
erlang-questions@erlang.org
http://www.erlang.org/mailman/listinfo/erlang-questions
Post recived from mailinglist |
|
|
| Back to top |
|
| axel |
Posted: Tue Jun 19, 2007 1:02 pm |
|
|
|
User
Joined: 03 Mar 2005
Posts: 271
|
On 2007-06-18 18:44, Ulf Wiger (TN/EAB) wrote:
> BTW, I made minor optimizations of the n-body
> benchmark (Erlang Hipe #3), and then started
> looking at the Mandelbrot. Requiring the program
> to output one byte at a time is cruel and unusual
> punishment for the lowly Erlang programmer.
after spending some time with the shootout i came to the conclusion that
this might be intentional.
it could just have been me, of course.
> Couldn't we introduce a BIF, erlang:put_chars(IoList),
> (or possibly put_chars(stdout | stderr, IoList))
> which simply writes the given bytes to stdout?
>
> This would be similar to erlang:display(Term), but
> without the auto-formatting of erlang terms, and
> without the trailing newline.
>
> I understand that there are great advantages to
> using the standard IO subsystem, but it seems a bit
> rude to not have raw output for those who want
there is a file:read/2 and file:write/2. they are both used for raw io.
they are currently of limited use since it is not possible to use them
with stdin/stdout/stderr. i suggest that it would be better to add this
possibility (stdin/stdout/stderr), that to ask for a new bif.
imho.
bengt
--
Those were the days...
EPO guidelines 1978: "If the contribution to the known art resides
solely in a computer program then the subject matter is not
patentable in whatever manner it may be presented in the claims."
_______________________________________________
erlang-questions mailing list
erlang-questions@erlang.org
http://www.erlang.org/mailman/listinfo/erlang-questions
Post recived from mailinglist |
|
|
| Back to top |
|
| axel |
Posted: Tue Jun 19, 2007 1:05 pm |
|
|
|
User
Joined: 03 Mar 2005
Posts: 271
|
...deleted
> Do you think programs like this one would be
> accepted in the shootout?
>
> -module(sumcol).
> -export([main/1]).
> -export([start/0]).
>
> %% get the program argument, which is how many test iterations to run
> %% for this test, we ignore this parameter
> main(_Args) ->
> user ! {self(), wait_ready},
> receive
> ready ->
> halt()
> end.
>
> %% callback function for custom user process
> start() ->
> spawn(fun() ->
> process_flag(priority,high),
> register(user, self()),
> read_in(open_port({fd,0,1}, [{line,80},eof]), 0)
> end).
>
> read_in(Port, Sum) ->
> receive
> {Port, {data, {Eol, Str}}} when Eol==eol; Eol==noeol->
> read_in(Port, Sum + list_to_integer(Str));
> {Port, eof} ->
> ready(Port, Sum)
> end.
>
> ready(Port, Sum) ->
> port_command(Port, [integer_to_list(Sum), "\n"]),
> erlang:port_close(Port),
> receive
> {From, wait_ready} ->
> From ! ready
> end.
...deleted
>
> It does say that "Programs should use built-in line-oriented I/O functions rather than custom-code", but arguably, this program does exactly that.
you are allowed to suggest the change, but i would not expect it to get
admitted.
bengt
--
Those were the days...
EPO guidelines 1978: "If the contribution to the known art resides
solely in a computer program then the subject matter is not
patentable in whatever manner it may be presented in the claims."
_______________________________________________
erlang-questions mailing list
erlang-questions@erlang.org
http://www.erlang.org/mailman/listinfo/erlang-questions
Post recived from mailinglist |
|
|
| Back to top |
|
|
|
All times are GMT
Page 1 of 2
Goto page 1, 2 Next
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|
|