- support for sun grid engine prior to v.6.0 in qsubwrapper and mert-moses

- changed temporary scripts to csh (because my sge runs them in csh regardless of my wishes)
- added a two tests + sample data for the full chain: train-mert-decode-eval
  (a parallel and a serial version)
- cleanup of other tests
- Makefile rules for running single tests in foreground or background


git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@899 1f5c12ca-751b-0410-a591-d2e778427230
This commit is contained in:
bojar 2006-10-18 10:36:39 +00:00
parent 69d378e67d
commit e2518b7799
20 changed files with 12242 additions and 304 deletions

View File

@ -129,7 +129,7 @@ tests:
done
## All tests passed
## Run just one test
## Run just one test in the background
tests/%.test.run: tests/%.test
export SCRIPTS_ROOTDIR=`pwd`; \
ts=`date '+%Y%m%d-%H%M%N'`; \
@ -141,4 +141,17 @@ tests/%.test.run: tests/%.test
( nohup ../$$test > log 2>&1 & ) || exit 1; \
echo "Observe tests/$$test.$$ts/log"; \
cd ..
## Run just one test in the foreground
tests/%.test.runfg: tests/%.test
export SCRIPTS_ROOTDIR=`pwd`; \
ts=`date '+%Y%m%d-%H%M%N'`; \
cd tests; \
test=$*.test; \
mkdir $$test.$$ts; \
cd $$test.$$ts; \
echo "Running $$test in tests/$$test.$$ts"; \
../$$test 2>&1 | tee log ; \
echo "Log saved to tests/$$test.$$ts/log"; \
cd ..

View File

@ -52,6 +52,8 @@ my $nbest=undef;
my $nbestflag=0;
my $qsubname="MOSES";
my $inputtype=0;
my $old_sge = 0; # assume old Sun Grid Engine (<6.0) where qsub does not
# implement -sync and -b
#######################
# Command line options processing
@ -68,7 +70,8 @@ sub init(){
'qsub-prefix=s'=> \$qsubname,
'queue-parameters=s'=> \$queueparameters,
'inputtype=i'=> \$inputtype,
'config=s'=>\$cfgfile
'config=s'=>\$cfgfile,
'old-sge' => \$old_sge,
) or exit(1);
chomp($nbestfile=`basename $orinbestfile`) if defined $orinbestfile;
@ -107,6 +110,7 @@ sub usage(){
print STDERR "* -jobs <N> number of required jobs\n";
print STDERR " -qsub-prefix <string> name for sumbitte jobs\n";
print STDERR " -queue-parameters <string> specific requirements for queue\n";
print STDERR " -old-sge Assume Sun Grid Engine < 6.0\n";
print STDERR " -debug debug\n";
print STDERR " -version print version of the script\n";
print STDERR " -help this help\n";
@ -163,25 +167,25 @@ usage() if $help;
if (!defined $orifile || !defined $mosescmd || ! defined $cfgfile) {
print STDERR "Please specify -input-file, -decoder and -config\n";
usage();
exit 1;
}
#checking if inputfile exists
if (! -e ${orifile} ){
print STDERR "Inputfile ($orifile) does not exists\n";
usage();
exit 1;
}
#checking if decoder exists
if (! -e $mosescmd) {
print STDERR "Decoder ($mosescmd) does not exists\n";
usage();
exit 1;
}
#checking if configfile exists
if (! -e $cfgfile) {
print STDERR "Configuration file ($cfgfile) does not exists\n";
usage();
exit 1;
}
@ -263,15 +267,13 @@ my @sgepids =();
my $failure=0;
foreach my $idx (@idxlist){
print STDERR "qsub $queueparameters -b yes -j yes -o $qsubout$idx -e $qsuberr$idx -N $qsubname$idx ${jobscript}${idx}.bash\n" if $dbg;
$cmd="qsub $queueparameters -b yes -j yes -o $qsubout$idx -e $qsuberr$idx -N $qsubname$idx ${jobscript}${idx}.bash >& ${jobscript}${idx}.log";
$cmd="qsub $queueparameters -j y -o $qsubout$idx -e $qsuberr$idx -N $qsubname$idx ${jobscript}${idx}.bash >& ${jobscript}${idx}.log";
safesystem($cmd) or die;
my ($res,$id);
open (IN,"${jobscript}${idx}.log");
open (IN,"${jobscript}${idx}.log")
or die "Can't read id of job ${jobscript}${idx}.log";
chomp($res=<IN>);
split(/\s+/,$res);
$id=$_[2];
@ -283,10 +285,50 @@ foreach my $idx (@idxlist){
#waiting until all jobs have finished
my $hj = "-hold_jid " . join(" -hold_jid ", @sgepids);
$cmd="qsub $queueparameters -sync yes $hj -j yes -o /dev/null -e /dev/null -N $qsubname.W -b yes /bin/ls >& $qsubname.W.log";
safesystem($cmd) or kill_all_and_quit();
if ($old_sge) {
# we need to implement our own waiting script
safesystem("echo 'date' > sync_workaround_script.sh") or kill_all_and_quit();
$failure=&check_exit_status();
my $pwd = `pwd`; chomp $pwd;
my $checkpointfile = "sync_workaround_checkpoint";
# delete previous checkpoint, if left from previous runs
safesystem("rm -f $checkpointfile") or kill_all_and_quit();
# start the 'hold' job, i.e. the job that will wait
$cmd="qsub -cwd $queueparameters $hj -o $checkpointfile -e /dev/null -N $qsubname.W $pwd/sync_workaround_script.sh >& $qsubname.W.log";
safesystem($cmd) or kill_all_and_quit();
# and wait for checkpoint file to appear
my $nr=0;
while (!-e $checkpointfile) {
sleep(10);
$nr++;
print STDERR "w" if $nr % 3 == 0;
}
print STDERR "End of waiting.\n";
safesystem("rm -f $checkpointfile sync_workaround_script.sh")
or kill_all_and_quit();
my $failure = 1;
my $nr = 0;
while ($nr < 60 && $failure) {
$nr ++;
$failure=&check_exit_status();
if (!$failure) {
$failure = ! check_translation();
}
last if !$failure;
print STDERR "Extra wait ($nr) for possibly unfinished processes.\n";
sleep 10;
}
} else {
# use the -sync option for qsub
$cmd="qsub $queueparameters -sync y $hj -j y -o /dev/null -e /dev/null -N $qsubname.W -b y /bin/ls >& $qsubname.W.log";
safesystem($cmd) or kill_all_and_quit();
$failure=&check_exit_status();
}
kill_all_and_quit() if $failure;
@ -378,7 +420,7 @@ sub kill_all_and_quit(){
}
print STDERR "Translation was not performed correctly\n";
print STDERR "Any of the submitted jobs died not correctly\n";
print STDERR "or some of the submitted jobs died.\n";
print STDERR "qdel function was called for all submitted jobs\n";
exit(1);
@ -402,9 +444,10 @@ sub check_translation(){
print STDERR "Split ($idx) were not entirely translated\n";
print STDERR "outputN=$outputN inputN=$inputN\n";
print STDERR "outputfile=${testfile}.$splitpfx$idx.trans inputfile=${testfile}.$splitpfx$idx\n";
exit(1);
return 0;
}
}
return 1;
}
sub remove_temporary_files(){
@ -432,6 +475,7 @@ sub safesystem {
elsif ($? & 127) {
printf STDERR "Execution of: @_\n died with signal %d, %s coredump\n",
($? & 127), ($? & 128) ? 'with' : 'without';
exit 1;
}
else {
my $exitcode = $? >> 8;

View File

@ -25,6 +25,7 @@ my $cmd="";
my $cmdout="";
my $cmderr="";
my $parameters="";
my $old_sge = 0; # assume grid engine < 6.0
sub init(){
use Getopt::Long qw(:config pass_through);
@ -35,7 +36,8 @@ sub init(){
'command=s'=> \$cmd,
'stdout=s'=> \$cmdout,
'stderr=s'=> \$cmderr,
'queue-parameter=s'=> \$queueparameters
'queue-parameter=s'=> \$queueparameters,
'old-sge' => \$old_sge,
) or exit(1);
$parameters="@ARGV";
@ -61,6 +63,7 @@ sub usage(){
print STDERR "-stderr <file> file to save stderr of cmd (optional)\n";
print STDERR "-qsub-prefix <string> name for sumbitted jobs (optional)\n";
print STDERR "-queue-parameters <string> parameter for the queue (optional)\n";
print STDERR "-old-sge ... assume Sun Grid Engine < 6.0\n";
print STDERR "-debug debug\n";
print STDERR "-version print version of the script\n";
print STDERR "-help this help\n";
@ -80,15 +83,15 @@ sub print_parameters(){
#script creation
sub preparing_script(){
my $scriptheader="\#\! /bin/bash\n\n";
my $scriptheader="\#\!/bin/csh\n\n";
$scriptheader.="uname -a\n\n";
$scriptheader.="cd $workingdir\n\n";
open (OUT, "> ${jobscript}.bash");
open (OUT, "> ${jobscript}.csh");
print OUT $scriptheader;
print OUT "($cmd $parameters > $tmpdir/cmdout$$) 2> $tmpdir/cmderr$$\n\n";
print OUT "($cmd $parameters > $tmpdir/cmdout$$ ) >& $tmpdir/cmderr$$\n\n";
print OUT "echo exit status \$\?\n\n";
if ($cmdout){
@ -111,7 +114,7 @@ sub preparing_script(){
close(OUT);
#setting permissions of each script
chmod(oct(755),"${jobscript}.bash");
chmod(oct(755),"${jobscript}.csh");
}
#######################
@ -125,14 +128,15 @@ safesystem("mkdir -p $tmpdir") or die;
preparing_script();
my $qsubcmd="qsub $queueparameters -b yes -sync yes -o $qsubout -e $qsuberr -N $qsubname ${jobscript}.bash >& ${jobscript}.log";
my $maysync = $old_sge ? "" : "-sync y";
print STDERR "$qsubcmd\n";
# submit the main job
my $qsubcmd="qsub $queueparameters $maysync -o $qsubout -e $qsuberr -N $qsubname ${jobscript}.csh >& ${jobscript}.log";
safesystem($qsubcmd) or die;
#getting id of submitted job
my $res;
open (IN,"${jobscript}.log");
open (IN,"${jobscript}.log") or die "Can't read main job id: ${jobscript}.log";
chomp($res=<IN>);
split(/\s+/,$res);
my $id=$_[2];
@ -141,17 +145,45 @@ close(IN);
print SDTERR " res:$res\n";
print SDTERR " id:$id\n";
if ($old_sge) {
# need to workaround -sync, add another job that will wait for the main one
# prepare a fake waiting script
my $syncscript = "${jobscript}.sync_workaround_script.sh";
safesystem("echo 'date' > $syncscript") or die;
my $checkpointfile = "${jobscript}.sync_workaround_checkpoint";
# ensure checkpoint does not exist
safesystem("rm -f $checkpointfile") or die;
# start the 'hold' job, i.e. the job that will wait
$cmd="qsub -cwd $queueparameters -hold_jid $id -o $checkpointfile -e /dev/null -N $qsubname.W $syncscript >& $qsubname.W.log";
safesystem($cmd) or die;
# and wait for checkpoint file to appear
my $nr=0;
while (!-e $checkpointfile) {
sleep(10);
$nr++;
print STDERR "w" if $nr % 3 == 0;
}
safesystem("rm -f $checkpointfile $syncscript") or die();
print STDERR "End of waiting workaround.\n";
}
my $failure=&check_exit_status();
print STDERR "check_exit_status returned $failure\n";
&kill_all_and_quit() if $failure;
&remove_temporary_files();
&remove_temporary_files() if !$dbg;
sub check_exit_status(){
my $failure=0;
print STDERR "check_exit_status of submitted job $id\n";
open(IN,"$qsubout");
open(IN,"$qsubout") or die "Can't read $qsubout";
while (<IN>){
$failure=1 if (/exit status 1/);
}
@ -173,7 +205,7 @@ sub kill_all_and_quit(){
sub remove_temporary_files(){
#removing temporary files
unlink("${jobscript}.bash");
unlink("${jobscript}.csh");
unlink("${jobscript}.log");
unlink("$qsubout");
unlink("$qsuberr");

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,100 +0,0 @@
<s> i declare resumed the session of the european parliament adjourned on thursday , 28 march 1996 . </s>
<s> ladies and gentlemen , on behalf of the house let me welcome a delegation from the grand committee of the finnish parliament , i.e. , the european affairs committee of the finnish parliament , led by its chairman , mr erkki tuomioja . i bid you a warm welcome ! </s>
<s> we are pleased at this visit , which reflects the increasingly close cooperation between us and the national parliaments in the union , and i wish our finnish colleagues a pleasant stay in strasbourg and , of course , useful and interesting discussions in this house ! </s>
<s> the minutes of the sitting of thursday , 28 march 1996 have been distributed . </s>
<s> are there any comments ? </s>
<s> mr president , on behalf of my fellow-members from the committee on agriculture i should like to ask you to change a few things in the voting about the bse resolution . obviously one or two things have gone wrong . </s>
<s> points 16 and 17 now contradict one another whereas the voting showed otherwise . </s>
<s> i shall be passing on to you some comments which you could perhaps take up with regard to the voting . </s>
<s> i will have to look into that , mrs oomen-ruijten . </s>
<s> i cannot say anything at this stage . </s>
<s> we will consider the matter . </s>
<s> mr president , it concerns the speech made last week by mr fischler on bse and reported in the minutes . </s>
<s> perhaps the commission or you could clarify a point for me . it would appear that a speech made at the weekend by mr fischler indicates a change of his position . </s>
<s> i welcome this change because he has said that he will eat british beef and that the ban was imposed specifically for economic and political reasons . </s>
<s> could somebody clarify that he has actually said this please , mr president , because it is a change of views . </s>
<s> mr sturdy , i cannot see what that has to do with the minutes . </s>
<s> mr president , on exactly the same point as mr sturdy has raised . </s>
<s> if commission fischler has made this statement , then he has said that it is not a matter of public health . </s>
<s> if it is not a matter of public health , he has no legal base , if he has no legal base then he may very well face legal action from the people his statement has damaged . </s>
<s> mr smith , the same applies to your point ; it has nothing to do with the minutes . </s>
<s> mr president , again on bse . if mr fischler has changed his views does this mean the commission has ? </s>
<s> this was actually referred to in the minutes . </s>
<s> he said that any funding would also go towards supporting workers who had directly lost their jobs . </s>
<s> so far nothing has come of this in any scheme that has been put forward . </s>
<s> does this mean the commission has changed its view on supporting workers who have lost their jobs through this scare ? </s>
<s> i note that there are no comments on the minutes . </s>
<s> ( parliament approved the minutes ) </s>
<s> mr president , since our last meeting in strasbourg there was a report from the news agency afp on 26 march that thirteen irregularly employed workers were identified in a police blitz on the building site of our new hemicycle . </s>
<s> eight of these workers were undeclared and five others were citizens of one member state employed by a building contractor in another member state who were drawing unemployment benefit in france . </s>
<s> now that is clearly a fraud on the french taxpayer as well as a fraud on the european citizens . </s>
<s> can we ask the bureau to look into this fact . </s>
<s> when the european parliament , that so frequently insists on workers' rights and proper social protection , is building a hemicycle , it should make sure that the contracts concerning those employed in the buildings should provide for full social protection and full payment . </s>
<s> can we ask you as president to make sure that is happening with the taxpayers' money for which we are collectively responsible . </s>
<s> mr tomlinson , would you please give me the documents concerned . </s>
<s> then i will look into the matter , both in the presidency and with the other organizations in question . </s>
<s> you yourself know best how difficult and complicated the legal situation is between parliament and the firms contracted to build the hemicycle . </s>
<s> after all , we have in you an expert who is in any case closely concerned with these matters . </s>
<s> mr president , i should like to deal very briefly with two matters . </s>
<s> first , since we condemned at the time eta's terrorist murders and kidnappings , today we can give you the news that the hostage who beats all records in spain - almost a year's captivity , 342 days , - has been freed , not , it is true , by the forces of public order , but he is at liberty . </s>
<s> and i should be very pleased - and so , i think , would all members , particularly the spanish members and perhaps still more those who are distinguished by being spanish basques - if you would send a message to the hostage's family to congratulate them on his freedom . </s>
<s> secondly i should like to point out , before the agenda is settled , that the importance of the bombardment of lebanese territory by the state of israel will make it necessary to ask for a statement from the council . </s>
<s> these indiscriminate and unfair bombardments not only infringe human rights but may also pose a threat to the independence and integrity of the state of lebanon , which is guaranteed by international law and by resolution 245 of the united nations security council . </s>
<s> thank you ! </s>
<s> the next item is the order of business . </s>
<s> the final version of the draft agenda as drawn up by the conference of presidents at its meeting of 11 april 1996 pursuant to rule 95 of the rules of procedure has been distributed . no amendments have been proposed . </s>
<s> mr president , i should like to ask a question . </s>
<s> we were too late to hand it in , but it has been discussed with a number of members . </s>
<s> it is the following . </s>
<s> i think that in view of present events in the middle east , we ought to ask whether the council can make a statement on wednesday afternoon about the way things are going . we note that the situation is changing every day . </s>
<s> we see that the french government has sent a mediator . </s>
<s> we hear nothing from the presidency . </s>
<s> nor have we heard anything , unfortunately , from the commission . </s>
<s> that is reason enough for us to be put in the picture . </s>
<s> i should like to ask you to see whether it is possible for the italian presidency to do that on wednesday afternoon . </s>
<s> we recognize that the agenda is very full . </s>
<s> i might suggest that , at least as far as the epp group is concerned , we could perhaps take this question up on wednesday afternoon and then omit the chernobyl question , otherwise i think we shall not get through . </s>
<s> then we could deal with chernobyl some time later . </s>
<s> i offer that as a suggestion , mr president . </s>
<s> if you would like to arrange things some other way so that we do not need to take chernobyl off the agenda that would suit us just as well . </s>
<s> mr president , my group is certainly of the view that what is happening in the middle east is very significant and that we cannot let this week with parliament in full session pass without any response or discussion . </s>
<s> could we leave it to you , mr president , to see whether the council is prepared to make a statement on the middle east and what is happening in the lebanon ? </s>
<s> could we then look to you to see what is possible . </s>
<s> i am reluctant , as i know many of my colleagues are , to remove chernobyl from the agenda , as suggested by mrs oomen-ruijten . </s>
<s> however , it would be possible for us to come back to the issue of chernobyl which does not have such immediacy although it is the tenth anniversary . </s>
<s> we could take this in two weeks' time , whereas the issue of lebanon is crucial at this moment . </s>
<s> perhaps , mr president , we could ask you to look at this with the council and see what would be possible . </s>
<s> mr president , i am glad to support mrs oomen-ruijten's suggestion , supported by mrs green - with one slight reservation . </s>
<s> i think that as a matter of courtesy we should naturally ask the council whether it is ready to make a statement . </s>
<s> but politically i am not concerned about a question of courtesy ; i am concerned about asking the council presidency to come here to explain why it not playing any part in this crisis either . </s>
<s> i understand the french government's motives for trying to mediate . </s>
<s> i hope the council has taken the decision that mr hervé de charette should try to mediate on behalf of the union , but all the indications are that it has not and that the french government is working independently here . </s>
<s> that is no problem for me ; i think it is a good initiative , but again europe is absent . </s>
<s> that was previously the case in the crisis between turkey and greece , and then mr holbrooke rightly said : ' europe is sleeping through the night' . </s>
<s> it should not happen again , mr president . </s>
<s> my group wants the italian presidency to come here and explain what its role is . </s>
<s> mr president , ladies and gentlemen , i think it is important that we should discuss the situation in the middle east this week . </s>
<s> we all agree on that . </s>
<s> but i think it is equally important that we discuss chernobyl this week . </s>
<s> i cannot support this proposal . </s>
<s> the whole world is talking about the tenth anniversary . </s>
<s> a major conference was held in vienna . </s>
<s> there was a tribunal . </s>
<s> and then we say we will postpone it to whenever . </s>
<s> i really think it would show parliament in a poor light if we do not discuss it on wednesday . </s>
<s> we must not turn it into a competition between chernobyl and the proposal to ask the council to report on the situation in the middle east this week and to debate on it , and then put chernobyl in second place ! </s>
<s> there are various other options . </s>
<s> we can listen to the council on the subject on wednesday morning , but please not just in a week's time . </s>
<s> at a time when the whole world is discussing chernobyl and the effects of that disaster , we in this parliament cannot say , we shall hold back and say nothing about it ! </s>
<s> mr president , i have already given you the reasons why the council should make a statement about the bombardment of lebanon . </s>
<s> in discussing the euro-mediterranean conference , to which we gave the greatest prominence , we cannot then wash our hands of it and leave it to the european powers to take diplomatic steps in the middle east outside the necessary agreement within the union . </s>
<s> that would be a bad sign for the intergovernmental conference and for the future of the european union . </s>
<s> but i think , like mrs roth , that we cannot make the subject of chernobyl and the subject of the middle east compete in the 'free market for news items' . </s>
<s> we must seek out the opportunity to discuss both subjects . </s>
<s> mr president , like previous colleagues , i believe it to be absolutely essential that the council make a statement on wednesday about the middle east situation , particularly in southern lebanon . </s>
<s> what is happening there is worrying and distressing because the whole peace process that has been under way for several months could be threatened . </s>
<s> and the most important task is to stop the fighting and give priority to diplomatic moves , wherever they come from , provided they finally lead to the silencing of the rockets and guns and some real progress towards peace and stability in the region . </s>
<s> we should also remember lebanon itself , which has been ravaged for many years , under the domination of one foreign power while part of its territory is occupied by another . </s>
<s> so it is surely our duty to make a statement on the subject : we are witnessing events which , i am convinced , should persuade us to find a slot in wednesday's agenda for such a statement and the subsequent debate . </s>
<s> ladies and gentlemen , this is one of the cases where there is no satisfactory solution because someone is bound to be disappointed and any decision is bound to be to the detriment of someone's interests . </s>
<s> let me describe the situation to you as i see it . </s>

View File

@ -1,100 +0,0 @@
<s> declaro reanudado el período de sesiones del parlamento europeo , interrumpido el 28 de marzo de 1996 . </s>
<s> deseo dar la bienvenida a los miembros de una delegación de la " gran comisión " , es decir , la comisión de asuntos europeos , del parlamento finlandés , dirigida por su presidente , el sr. erkki tuomioja , delegación que acaba de llegar a la tribuna de invitados . </s>
<s> nos alegramos de esta visita , que se enmarca en la cooperación cada vez más estrecha entre nosotros y los parlamentos nacionales de la unión . deseo que nuestros colegas finlandeses tengan una agradable estancia en estrasburgo y también , naturalmente , que tengamos ocasión de hablar en esta asamblea de manera provechosa e interesante . </s>
<s> el acta de la sesión del jueves 28 de marzo de 1996 ha sido distribuida . </s>
<s> ¿ hay alguna observación ? </s>
<s> señor presidente , en nombre de los miembros de la comisión de agricultura quisiera rogarle que se introdujeran algunas correcciones en la resolución sobre la eeb . por lo visto se han cometido algunos errores . </s>
<s> los puntos 16 y 17 se contradicen , mientras que la votación había reflejado otra cosa . </s>
<s> le entregaré las observaciones realizadas al respecto . quizás pueda incluirlas en la votación . </s>
<s> primero debo aclararlo , señora oomen-ruijten . </s>
<s> así , de momento , no puedo pronunciarme . </s>
<s> deberemos examinar la cuestión . </s>
<s> señor presidente , me referiré al discurso que el sr. fischler pronunció la semana pasada en relación con la encefalopatía espongiforme bovina , que se reseñó en el acta . </s>
<s> quizá la comisión o usted mismo pudieran aclararme una cuestión : por lo visto el sr. fischler pronunció un discurso este fin de semana en el que parecía haber cambiado de actitud . </s>
<s> me alegra que así sea , pues el sr. fischler dijo que iba a comer carne de bovino británico y que la prohibición se debía concretamente a motivos económicos y políticos . </s>
<s> agradecería que alguien me pudiera confirmar que eso es lo que ha dicho el sr. fischler , pues representa un cambio de actitud . </s>
<s> señoría , no consigo ver qué tiene que ver eso con el acta . </s>
<s> señor presidente , me referiré exactamente a la misma cuestión que el sr. sturdy . </s>
<s> si el comisario fischler ha hecho esta declaración , entonces lo que ha dicho es que no se trata de una cuestión de salud pública . </s>
<s> si no se trata de una cuestión de salud pública , entonces el sr. fischler carece de base jurídica , y si carece de base jurídica entonces es muy posible que le lleven ante los tribunales las personas que ha dañado con su declaración . </s>
<s> señor smith , le digo lo mismo , que eso no tiene nada que ver con el acta . </s>
<s> señor presidente , yo también voy a referirme a la eeb . si el sr. fischler ha cambiado de opinión , ¿ quiere decir eso que también la comisión ha cambiado de opinión ? </s>
<s> la cuestión se mencionó en el acta . </s>
<s> el sr. fischler dijo que los fondos que se destinasen a gran bretaña serían también para apoyar a los trabajadores que han perdido directamente sus puestos de trabajo . </s>
<s> hasta ahora no se ha recibido ningún fondo proveniente de ese plan . </s>
<s> ¿ quiere decir eso que la comisión ha cambiado de parecer y no va a apoyar a los trabajadores que han perdido sus puestos de trabajo como consecuencia del pánico desencadenado ? </s>
<s> constato que no hay ninguna observación al acta . </s>
<s> ( el acta queda aprobada ) </s>
<s> señor presidente , después de nuestra última reunión en estrasburgo , el 26 de marzo hubo una noticia de la agencia afp según la cual 13 empleados en situación irregular fueron identificados en una incursión efectuada por la policía en las obras de edificación de nuestro nuevo hemiciclo . </s>
<s> ocho de esos trabajadores no habían sido declarados y otros cinco eran ciudadanos de un estado miembro empleados por un aparejador de obras en otro estado miembro , que percibían un subsidio de desempleo en francia . </s>
<s> es evidente que esto constituye un fraude para los contribuyentes franceses y también para los ciudadanos europeos . </s>
<s> ¿ podemos pedir a la mesa que se ocupe de esta cuestión ? </s>
<s> cuando el parlamento europeo , que tan frecuentemente insiste en los derechos de los trabajadores y en la debida protección social , está construyendo un hemiciclo , debería cerciorarse de que los contratos de las personas que trabajan en las obras prevén la debida remuneración y la plena protección social . </s>
<s> ¿ podemos pedirle a usted , como presidente , que averigüe si eso está sucediendo con el dinero de los contribuyentes del que todos somos responsables a título colectivo ? </s>
<s> señoría , déme esos documentos , por favor . </s>
<s> examinaré el asunto tanto con la mesa como con todas las organizaciones afectadas . </s>
<s> usted sabe perfectamente lo difícil y complicada que es la situación jurídica entre el parlamento y las empresas que tienen la contrata de la construcción del edificio . </s>
<s> en cualquier caso , en usted tenemos un experto que se ocupa con rigor de estas cuestiones . </s>
<s> señor presidente , quiero tratar muy brevemente de dos cuestiones . </s>
<s> en primer lugar , y puesto que hemos denunciado en su día los atentados terroristas y los secuestros de eta , hoy podemos darles la noticia de que el secuestrado que bate todos los récords en españa -casi un año de secuestro , 342 días - ha sido liberado . cierto que no por las fuerzas de orden público , pero está en libertad . </s>
<s> y a me gustaría -y creo que a todos los diputados , especialmente los diputados españoles , y quizá más todavía los que tienen la singularidad de ser españoles vascos - , que usted se dirigiera a la familia del secuestrado para felicitarle por su puesta en libertad . </s>
<s> en segundo lugar , quiero hacerle notar , antes de la fijación del orden del día , que la importancia que tienen los bombardeos del estado de israel en territorio libanés exigiría pedir una declaración del consejo . </s>
<s> con esos bombardeos indiscriminados e injustos no solamente se conculcan los derechos humanos , sino que puede ponerse también en peligro la independencia y la integridad del estado del líbano , que está garantizada por el derecho internacional y por la resolución 245 del consejo de seguridad de las naciones unidas . </s>
<s> muchas gracias . </s>
<s> procedemos a continuación a la fijación del orden de los trabajos . </s>
<s> se ha distribuido el proyecto definitivo de orden del día establecido , de conformidad con el artículo 95 del reglamento , por la conferencia de presidentes en la reunión del 11 de abril de 1996 , al cual no se han propuesto las siguientes modificaciones . </s>
<s> señor presidente , quisiera plantear una pregunta . </s>
<s> hemos llegado demasiado tarde para presentarla , pero ya hemos hablado de ello con varios diputados . </s>
<s> se trata de lo siguiente . </s>
<s> debido a los acontecimientos que están teniendo lugar en estos momentos en oriente medio , creo que deberíamos preguntar al consejo si el miércoles por la tarde no puede emitir una declaración sobre la situación . </s>
<s> constatamos que la situación cambia día a día . </s>
<s> vemos que el gobierno francés ha enviado a un mediador . </s>
<s> por desgracia , todavía no hemos oído nada de la comisión europea . </s>
<s> razón de más para ponernos al día . </s>
<s> pediría que se considerara la posibilidad de que lo hiciera la presidencia italiana el miércoles por la tarde . </s>
<s> somos conscientes de que el orden del día es muy apretado . </s>
<s> y podría decir como sugerencia que nosotros , por lo menos el grupo del ppe , estaríamos dispuestos a incluir esta cuestión el miércoles por la tarde y suprimir la cuestión de chernóbil , porque creo que de otro modo no nos dará tiempo de acabar . </s>
<s> en tal caso podríamos tratar chernóbil un poco más tarde . </s>
<s> es una sugerencia , señor presidente , que le hago a usted . </s>
<s> si cree usted poder solucionarlo de otro modo , sin necesidad de suprimir la cuestión de chernóbil del orden del día , mejor que mejor . </s>
<s> señor presidente , no hace falta decir que mi grupo opina que lo que está sucediendo en el oriente medio es importantísimo y que no podemos dejar pasar esta semana , en la que el parlamento está reunido , sin manifestar nuestra reacción o discutir la cuestión . </s>
<s> señor presidente , ¿ podría encargarse de averiguar si el consejo está dispuesto a hacer una declaración sobre el oriente medio y sobre lo que está sucediendo en el líbano ? </s>
<s> ¿ podemos confiar en que averigüe usted lo que se pueda hacer ? </s>
<s> me cuesta mucho trabajo , como a muchos de mis colegas , acceder a que desaparezca chernóbil del orden del día , según ha sugerido la sra. oomen-ruijten . </s>
<s> ahora bien , ¿ no podríamos ocuparnos más adelante de la cuestión de chernóbil , que no es de una urgencia tan inmediata a pesar de que se trata de su décimo aniversario ? </s>
<s> podríamos ocuparnos de la cuestión dentro de dos semanas , mientras que la cuestión del líbano reviste importancia capital en estos precisos momentos . </s>
<s> señor presidente , quizá pudiera discutir usted esta cuestión con el consejo y ver lo que cabe hacer . </s>
<s> señor presidente , me sumo a la sugerencia de la sra. oomen-ruijten , tal como la ha apoyado la sra. green , es decir , con una observación . </s>
<s> pienso que por educación hemos de preguntar al consejo si está dispuesto a hacer una declaración . </s>
<s> pero , en lo que respecta a la política , no me interesan las preguntas educadas ; lo que me interesa es que la presidencia del consejo venga aquí a explicar por qué en esta crisis también está del todo ausente . </s>
<s> comprendo las razones del gobierno francés para intentar mediar . </s>
<s> espero que el consejo haya decidido que el sr. hervé de charette intente mediar en nombre de la unión , pero todo parece indicar que ocurre lo contrario , que el gobierno francés actúa por su lado en esta cuestión . </s>
<s> eso me parece bien ; me parece una buena iniciativa , pero una vez más , europa está ausente . </s>
<s> este ya fue el caso en la crisis entre turquía y grecia , y entonces el sr. holbrooke dijo con razón : europe is sleeping through the night . </s>
<s> que no vuelva a repetirse , señor presidente . </s>
<s> mi grupo exige que la presidencia italiana haga acto de presencia y explique cuál es su papel . </s>
<s> señor presidente , señorías , me parece importante que hablemos esta semana de la situación en oriente medio . </s>
<s> en esto estamos todos de acuerdo . </s>
<s> pero me parece igualmente importante y necesario que hablemos esta semana de chernóbil . </s>
<s> no puedo entender esta propuesta . </s>
<s> el mundo entero habla del décimo aniversario . </s>
<s> se ha celebrado en viena una gran conferencia . </s>
<s> hubo un tribunal . </s>
<s> y nosotros decimos que aplazamos la cuestión hasta una fecha no determinada . </s>
<s> verdaderamente , considero que no tratar el tema el miércoles es un testimonio de pobreza por parte del parlamento . </s>
<s> no debemos permitir que la pugna entre la propuesta al consejo de que informe esta semana sobre la situación en oriente medio y que debata el tema con nosotros y la cuestión de chernóbil lugar a un aplazamiento de esta última . </s>
<s> existen otras posibilidades . </s>
<s> podemos escuchar al consejo sobre este punto el miércoles por la mañana , pero , por favor , no dentro de una semana . </s>
<s> en el momento en que el mundo entero habla de chernóbil y de las repercusiones de esta catástrofe , nosotros no podemos , como parlamento , retraernos y no decir nada en absoluto . </s>
<s> señor presidente , yo ya le he dado las razones para que el consejo haga una declaración sobre los bombardeos del líbano . </s>
<s> cuando estamos hablando de la conferencia euromediterránea , a la que hemos dado el máximo relieve , no podemos desentendernos luego y dejar que las diplomacias de las potencias europeas intervengan en oriente próximo al margen de la necesaria concertación en el seno de la unión . </s>
<s> sería una mala señal para la conferencia intergubernamental y para el futuro de la unión europea . </s>
<s> pero opino , como la sra. roth , que no se puede hacer competir en el " libre mercado de los temas de la actualidad " el tema de chernóbil y el tema de oriente próximo . </s>
<s> hay que buscar la posibilidad de discutir sobre los dos temas . </s>
<s> señor presidente , tal como han dicho los colegas que se han expresado antes de , creo que es totalmente indispensable que el miércoles el consejo haga una declaración relativa a la situación en oriente medio y , en particular , en el sur del líbano . </s>
<s> lo que ocurre allí nos preocupa y angustia , en la medida en que peligra todo el proceso de paz iniciado ahora hace unos cuantos meses . </s>
<s> lo que importa ante todo es que cesen los combates y , por lo tanto , que se prioridad a las iniciativas diplomáticas , vengan de donde vengan , siempre que con estos esfuerzos se obtenga algún resultado , esto es , que los misiles y los cañones enmudezcan y que se progrese de verdad en el camino hacia la paz y la estabilidad en la región . </s>
<s> asimismo debemos ocuparnos del líbano , que es un estado asolado desde hace años , bajo dominio de una potencia extranjera y , al mismo tiempo , con una parte de su territorio ocupado por otra potencia extranjera . </s>
<s> debemos pues pronunciarnos al respecto , ya que estamos ante un tema de actualidad que , estoy convencido de ello , debe hacer que encontremos un hueco en nuestro orden del día del miércoles para situar esta declaración y el debate subsiguiente . </s>
<s> señorías , estamos ante uno de esos casos para los que no existe solución satisfactoria porque siempre va en perjuicio de alguien y la decisión atenta siempre contra los intereses de alguien . </s>
<s> les expondré la situación desde mi punto de vista . </s>

View File

@ -0,0 +1,93 @@
#!/bin/bash
function die() {
echo "$@"
exit 1
}
[ -d $WORKSPACE ] || die "Missing $WORKSPACE"
echo "Workspace: $WORKSPACE"
echo "This test is expected to take an hour."
MOSES=$WORKSPACE/moses-cmd/src/moses
[ -x $MOSES ] || die "Missing $MOSES"
export SCRIPTS_ROOTDIR=$WORKSPACE/scripts
cp -r ../cs-en-sample ./corpus || die "Missing "`pwd`"/../cs-en-sample"
echo "Copied cs-en-sample files"
mv corpus/test.* ./ || die "Missing corpus/test.*"
cp corpus/train.cs ./dev.src || die "Missing corpus/train.cs"
cp corpus/train.en ./dev.ref || die "Missing corpus/train.en"
echo "Test and 'tuning' data ready. Tuning equals training."
bindir=$WORKSPACE/bin
[ -d $bindir ] || die "Please create $WORKSPACE/bin and put GIZA++ and such there"
echo "Starting training script."
$SCRIPTS_ROOTDIR/training/train-factored-phrase-model.perl \
--bin-dir=$bindir \
--f cs --e en \
--translation-factors 0-0 \
--decoding-steps t0 \
--first-step 1 \
--last-step 9 \
--corpus corpus/train \
--root . \
--parallel \
--lm 0:3:`pwd`/corpus/lm.en.gz \
|| die "Failed to train the model"
echo "Finished moses.ini, merting."
$SCRIPTS_ROOTDIR/training/mert-moses.pl \
--working-dir=mert-tuning \
`pwd`/dev.src \
`pwd`/dev.ref \
$MOSES \
`pwd`/model/moses.ini \
--decoder-flags="-dl 6 " \
|| die "Merting failed"
# Typical parallelization flags
# --jobs=10 \
# --old-sge \
# --queue-flags=" "
echo "Finished merting, filtering phrases for test data."
$SCRIPTS_ROOTDIR/training/filter-model-given-input.pl \
filtered-opt \
mert-tuning/moses.ini \
test.src \
|| die "Failed to filter phrases for test data."
echo "Finished filtering. Deconding test set."
$MOSES \
-dl 6 \
-f filtered-opt/moses.ini \
-i test.src \
> test.opt \
|| die "Decoding of test set failed."
$SCRIPTS_ROOTDIR/generic/multi-bleu.perl test.ref \
< test.opt > test.opt.bleu \
|| die "Final scoring failed"
# Typical parallel decoding:
# $SCRIPTS_ROOTDIR/generic/moses-parallel.pl \
# -decoder $MOSES \
# -jobs 10 \
# -queue-parameters " " \
# -old-sge \
# -inputfile ./test.src \
# -config ./filtered-opt/moses.ini \
# > test.opt.out
echo "Success."

View File

@ -1,24 +0,0 @@
#!/bin/bash
[ -d $WORKSPACE ] || exit 1
echo "Workspace: $WORKSPACE"
MOSESCMD=$WORKSPACE/moses-cmd/src/moses
DATADIR=/export/ws06osmt/example/met-parallel
export SCRIPTS_ROOTDIR=$WORKSPACE/scripts
[ -e $MOSESCMD ] || exit 1
echo "Moses: $MOSESCMD"
cp $DATADIR/moses.ini ./ || exit 1
cp $DATADIR/dev.input ./ || exit 1
cp $DATADIR/dev.ref ./ || exit 1
echo "Starting mert-moses"
$SCRIPTS_ROOTDIR/training/mert-moses.pl --jobs=10 dev.input dev.ref $MOSESCMD ./moses.ini \
|| exit 1
echo "Success"

View File

@ -1,20 +0,0 @@
#!/bin/bash
[ -d $WORKSPACE ] || exit 1
MOSESCMD=$WORKSPACE/moses-cmd/src/moses
DATADIR=/export/ws06osmt/example/met-parallel
export SCRIPTS_ROOTDIR=$WORKSPACE/scripts
[ -e $MOSESCMD ] || exit 1
cp $DATADIR/moses.ini ./ || exit 1
cp $DATADIR/dev.input ./ || exit 1
cp $DATADIR/dev.ref ./ || exit 1
echo "Starting mert-moses"
$SCRIPTS_ROOTDIR/training/mert-moses.pl dev.input dev.ref $MOSESCMD ./moses.ini \
|| exit 1
echo "Success"

View File

@ -1,23 +0,0 @@
#!/bin/bash
[ -d $WORKSPACE ] || exit 1
echo "Workspace: $WORKSPACE"
export SCRIPTS_ROOTDIR=$WORKSPACE/scripts
cp -r ../epps-sample ./corpus || exit 1
echo "Copied epps-sample files"
echo "Starting training script."
$SCRIPTS_ROOTDIR/training/train-factored-phrase-model.perl \
--f es --e en \
--translation-factors 0-0 \
--decoding-steps t0 \
--first-step 3 \
--last-step 3 \
--corpus corpus \
--root corpus \
|| exit 1
echo "Success."

View File

@ -1,19 +1,28 @@
#!/bin/bash
[ -d $WORKSPACE ] || exit 1
function die() {
echo "$@"
exit 1
}
[ -d $WORKSPACE ] || die "Failed to find workspace: $WORKSPACE"
echo "Workspace: $WORKSPACE"
bindir=$WORKSPACE/bin
[ -d $bindir ] || die "Please create $WORKSPACE/bin and put GIZA++ and such there"
export SCRIPTS_ROOTDIR=$WORKSPACE/scripts
echo "fake" > lm0.3gr
echo "fake" > lm0.4gr
mkdir model || exit 1
mkdir model || die "Can't create blank model"
echo "Starting training script."
$SCRIPTS_ROOTDIR/training/train-factored-phrase-model.perl \
--bin-dir $bindir \
--f src --e tgt \
--lm 0:3:lm0.3gr \
--lm 0:4:lm0.4gr \
@ -21,6 +30,6 @@ $SCRIPTS_ROOTDIR/training/train-factored-phrase-model.perl \
--translation-factors 0-0+1-1 \
--generation-factors 0-0+0-1+0,1-2 \
--first-step 9 \
|| exit 1
|| die "Creation of moses.ini failed"
echo "Success"

View File

@ -38,6 +38,7 @@ while (<INI>) {
my $suffix = ($fn =~ /\.gz$/ ? ".gz" : "");
$fn = fixpath($fn);
$fn = ensure_relative_to_origin($fn, $ini);
-e $fn || die "File $fn not found";
safesystem("wiseln $fn ./$section.$cnt{$section}$suffix") or die;
$_ = "$a $b $c ./$section.$cnt{$section}$suffix\n";
}
@ -47,6 +48,7 @@ while (<INI>) {
$cnt{$section}++;
my $suffix = ($fn =~ /\.gz$/ ? ".gz" : "");
$fn = fixpath($fn);
-e $fn || die "File $fn not found";
safesystem("wiseln $fn ./$section.$cnt{$section}$suffix") or die;
$_ = "$a $b $c ./$section.$cnt{$section}$suffix\n";
}
@ -57,6 +59,7 @@ while (<INI>) {
my $suffix = ($fn =~ /\.gz$/ ? ".gz" : "");
$fn = fixpath($fn);
$fn = ensure_relative_to_origin($fn, $ini);
-e $fn || die "File $fn not found";
safesystem("wiseln $fn ./$section.$cnt{$section}$suffix") or die;
$_ = "./$section.$cnt{$section}$suffix\n";
}

View File

@ -121,6 +121,7 @@ my $filtercmd = undef; # path to filter-model-given-input.pl
my $SCORENBESTCMD = undef;
my $qsubwrapper = undef;
my $moses_parallel_cmd = undef;
my $old_sge = 0; # assume sge<6.0
use strict;
@ -153,6 +154,7 @@ GetOptions(
"scorenbestcmd=s" => \$SCORENBESTCMD, # path to score-nbest.py
"qsubwrapper=s" => \$qsubwrapper, # allow to override the default location
"mosesparallelcmd=s" => \$moses_parallel_cmd, # allow to override the default location
"old-sge" => \$old_sge, #passed to moses-parallel
"filter-phrase-table!" => \$___FILTER_PHRASE_TABLE, # allow (disallow)filtering of phrase tables
) or exit(1);
@ -200,6 +202,7 @@ Options:
--cmertdir=STRING ... where is cmert installed
--pythonpath=STRING ... where is python executable
--scorenbestcmd=STRING ... path to score-nbest.py
--old-sge ... passed to moses-parallel, assume Sun Grid Engine < 6.0
--inputtype=[0|1] ... Handle different input types (0 for text, 1 for confusion network, default is 0)
--no-filter-phrase-table ... disallow filtering of phrase tables
(useful if binary phrase tables are available)
@ -261,6 +264,9 @@ die "File not found: $___DEV_F (interpreted as $input_abs)."
$___DEV_F = $input_abs;
# Option to pass to qsubwrapper and moses-parallel
my $pass_old_sge = $old_sge ? "-old-sge" : "";
my $decoder_abs = ensure_full_path($___DECODER);
die "File not found: $___DECODER (interpreted as $decoder_abs)."
if ! -x $decoder_abs;
@ -437,12 +443,14 @@ if ($continue) {
# dump_triples($use_triples);
}
if ($___FILTER_PHRASE_TABLE){
# filter the phrase tables wih respect to input, use --decoder-flags
print "filtering the phrase tables... ".`date`;
my $cmd = "$filtercmd ./filtered $___CONFIG $___DEV_F";
if (defined $___JOBS) {
safesystem("$qsubwrapper -command='$cmd' -queue-parameter=\"$queue_flags\"" ) or die "Failed to submit filtering of tables to the queue (via $qsubwrapper)";
safesystem("$qsubwrapper $pass_old_sge -command='$cmd' -queue-parameter=\"$queue_flags\" -stdout=filterphrases.out -stderr=filterphrases.err" )
or die "Failed to submit filtering of tables to the queue (via $qsubwrapper)";
} else {
safesystem($cmd) or die "Failed to filter the tables.";
}
@ -509,7 +517,7 @@ while(1) {
print STDERR "Scoring the nbestlist.\n";
my $cmd = "export PYTHONPATH=$pythonpath ; gunzip -dc run*.best*.out.gz | sort -n -t \"|\" -k 1,1 | $SCORENBESTCMD $EFF_NORM $EFF_REF_LEN ".join(" ", @references)." ./";
if (defined $___JOBS) {
safesystem("$qsubwrapper -command='$cmd' -queue-parameter=\"$queue_flags\"") or die "Failed to submit scoring nbestlist to queue (via $qsubwrapper)";
safesystem("$qsubwrapper $pass_old_sge -command='$cmd' -queue-parameter=\"$queue_flags\" -stdout=scorenbest.out -stderr=scorenbest.err") or die "Failed to submit scoring nbestlist to queue (via $qsubwrapper)";
} else {
safesystem($cmd) or die "Failed to score nbestlist";
}
@ -585,7 +593,7 @@ while(1) {
print STDERR "Starting cmert.\n";
if (defined $___JOBS) {
safesystem("$qsubwrapper -command='$cmd' -stderr=cmert.log -queue-parameter=\"$queue_flags\"") or die "Failed to start cmert (via qsubwrapper $qsubwrapper)";
safesystem("$qsubwrapper $pass_old_sge -command='$cmd' -stderr=cmert.log -queue-parameter=\"$queue_flags\"") or die "Failed to start cmert (via qsubwrapper $qsubwrapper)";
} else {
safesystem("$cmd 2> cmert.log") or die "Failed to run cmert";
}
@ -729,7 +737,7 @@ sub run_decoder {
# run the decoder
my $decoder_cmd;
if (defined $___JOBS) {
$decoder_cmd = "$moses_parallel_cmd -qsub-prefix mert$run -queue-parameters \"$queue_flags\" $parameters $decoder_config -n-best-file $filename -n-best-size $___N_BEST_LIST_SIZE -input-file $___DEV_F -jobs $___JOBS -decoder $___DECODER > run$run.out";
$decoder_cmd = "$moses_parallel_cmd $pass_old_sge -qsub-prefix mert$run -queue-parameters \"$queue_flags\" $parameters $decoder_config -n-best-file $filename -n-best-size $___N_BEST_LIST_SIZE -input-file $___DEV_F -jobs $___JOBS -decoder $___DECODER > run$run.out";
} else {
$decoder_cmd = "$___DECODER $parameters $decoder_config -n-best-list $filename $___N_BEST_LIST_SIZE -i $___DEV_F > run$run.out";
}

View File

@ -15,8 +15,14 @@ my($_ROOT_DIR,$_CORPUS_DIR,$_GIZA_E2F,$_GIZA_F2E,$_MODEL_DIR,$_CORPUS,$_CORPUS_C
my $debug = 0; # debug this script, do not delete any files in debug mode
# the following line is set installation time by 'make release'. BEWARE!
my $BINDIR = "/THIS/PATH/IS/REPLACED/BY/MAKE/RELEASE";
$_HELP = 1
unless &GetOptions('root-dir=s' => \$_ROOT_DIR,
'bin-dir=s' => \$BINDIR, # allow to override default bindir path
'corpus-dir=s' => \$_CORPUS_DIR,
'corpus=s' => \$_CORPUS,
'corpus-compression=s' => \$_CORPUS_COMPRESSION,
@ -79,9 +85,6 @@ if (!defined $SCRIPTS_ROOTDIR) {
}
print STDERR "Using SCRIPTS_ROOTDIR: $SCRIPTS_ROOTDIR\n";
# the following line is set installation time by 'make release'. BEWARE!
my $BINDIR = "/THIS/PATH/IS/REPLACED/BY/MAKE/RELEASE";
# supporting binaries from other packages
my $GIZA = "$BINDIR/GIZA++";
my $SNT2COOC = "$BINDIR/snt2cooc.out";