From 9e7257978c1310234424c7ec49915b7383da8b4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Santos=20Costa?= Date: Tue, 9 Sep 2014 23:55:47 -0500 Subject: [PATCH] cleanup --- library/dialect/swi/fli/swi.c | 2 -- library/lammpi/yap_mpi.c | 2 +- library/lineutils.yap | 4 ++-- library/mpi/examples/demo1.pl | 1 + library/mpi/examples/demo1_mpe.pl | 4 ++++ library/mpi/examples/demo2.pl | 2 ++ library/sockets.yap | 2 ++ 7 files changed, 12 insertions(+), 5 deletions(-) diff --git a/library/dialect/swi/fli/swi.c b/library/dialect/swi/fli/swi.c index a5a8fc84c..9ab8e555a 100755 --- a/library/dialect/swi/fli/swi.c +++ b/library/dialect/swi/fli/swi.c @@ -3143,7 +3143,6 @@ FILE *Yap_FileDescriptorFromStream(Term t) X_API int PL_raise(int sig) { - CACHE_REGS Yap_signal(YAP_INT_SIGNAL); return 1; } @@ -3152,7 +3151,6 @@ int raiseSignal(PL_local_data_t *ld, int sig) { #if THREADS - CACHE_REGS if (sig == SIG_THREAD_SIGNAL) { Yap_signal(YAP_ITI_SIGNAL); return TRUE; diff --git a/library/lammpi/yap_mpi.c b/library/lammpi/yap_mpi.c index f32625114..5d8c2ef0c 100644 --- a/library/lammpi/yap_mpi.c +++ b/library/lammpi/yap_mpi.c @@ -1025,7 +1025,7 @@ init_mpi(void) { YAP_UserCPredicate( "mpi_test_rcv", mpi_test_recv,3); // mpi_test(+Handle,-Status,-Data). YAP_UserCPredicate( "mpi_bcast", mpi_bcast,2); // mpi_bcast(Root,Term) YAP_UserCPredicate( "mpi_bcast2", mpi_bcast2,2); // mpi_bcast2(Root,Term) - YAP_UserCPredicate( "mpi_bcast2", mpi_bcast3,3); // mpi_bcast2(Root,Term,Tag) + YAP_UserCPredicate( "mpi_bcast3", mpi_bcast3,3); // mpi_bcast3(Root,Term,Tag) YAP_UserCPredicate( "mpi_ibcast", mpi_ibcast2,2); // mpi_ibcast(Root,Term) YAP_UserCPredicate( "mpi_ibcast", mpi_ibcast3,3); // mpi_ibcast(Root,Term,Tag) YAP_UserCPredicate( "mpi_barrier", mpi_barrier,0); // mpi_barrier/0 diff --git a/library/lineutils.yap b/library/lineutils.yap index c6f56d7f0..7ed41428f 100644 --- a/library/lineutils.yap +++ b/library/lineutils.yap @@ -11,7 +11,7 @@ copy_line/2, filter/3, file_filter/3, - file_filter_with_init/5, + file_filter_with_initialization/5, process/2 ]). @@ -142,7 +142,7 @@ file_filter(Inp, Out, Command) :- close(StreamInp), close(StreamOut). -file_filter_with_init(Inp, Out, Command, FormatString, Parameters) :- +file_filter_with_initialization(Inp, Out, Command, FormatString, Parameters) :- open(Inp, read, StreamInp), open(Out, write, StreamOut), format(StreamOut, FormatString, Parameters), diff --git a/library/mpi/examples/demo1.pl b/library/mpi/examples/demo1.pl index 6caf2716f..66b4442d2 100644 --- a/library/mpi/examples/demo1.pl +++ b/library/mpi/examples/demo1.pl @@ -2,6 +2,7 @@ %% konstant@let.rug.nl, Thu Jan 24 2002 %% +:- use_module(library(mpi)). % make the `floor' operator return integer values :- set_prolog_flag(language, iso). diff --git a/library/mpi/examples/demo1_mpe.pl b/library/mpi/examples/demo1_mpe.pl index b8cffd4af..30bb36051 100644 --- a/library/mpi/examples/demo1_mpe.pl +++ b/library/mpi/examples/demo1_mpe.pl @@ -6,6 +6,10 @@ %% %% This file is in the Public Domain. +:- use_module(library(mpi)). +:- use_module(library(mpe)). + + %% demo1_mpe.pl is the same as demo1.pl, except %% that MPE is used to log MPI activity. diff --git a/library/mpi/examples/demo2.pl b/library/mpi/examples/demo2.pl index 825bbf97f..36f4a7907 100644 --- a/library/mpi/examples/demo2.pl +++ b/library/mpi/examples/demo2.pl @@ -2,6 +2,8 @@ %% konstant@let.rug.nl, Tue Feb 12 2002 %% +:- use_module(library(mpi)). + %% %% This the calculation that needs to be performed, in this case %% the sum of [From..To] diff --git a/library/sockets.yap b/library/sockets.yap index 824bc431b..be72c9137 100644 --- a/library/sockets.yap +++ b/library/sockets.yap @@ -103,3 +103,5 @@ peer_to_client(ip(A,B,C,D), Client) :- maplist(atom_number, Parts, Numbers), Numbers = [A,B,C,D]. +socket_select(_,_,_,_,_) :- + format( user_error, "Unsupported in this version, please use wait_for_input/3~n", []).