<commit_before>my $gpath = $ENV{GPT_LOCATION};

if (!defined($gpath))
{
  $gpath = $ENV{GLOBUS_LOCATION};
}

if (!defined($gpath))
{
   die "GPT_LOCATION or GLOBUS_LOCATION needs to be set before running this script"
}

@INC = (@INC, "$gpath/lib/perl");

require Grid::GPT::Setup;

my $metadata = new Grid::GPT::Setup(package_name => "globus_gram_job_manager_setup");

my $globusdir = $ENV{GLOBUS_LOCATION};
my $setupdir = "$globusdir/setup/globus/";
my $jm_conf = "$globusdir/etc/globus-job-manager.conf";
my $jm_service = "$globusdir/etc/grid-services/jobmanager";
my $hostname = `$globusdir/bin/globus-hostname`;
my $cg_results = `$globusdir/sbin/config.guess`;
my $need_print = 1;

if ( ! -f "$jm_conf" )
{
   print "Creating job manager configuration file...\n";

   if ( ! open(CONF, ">$jm_conf") )
   {
      print STDERR "open failed for $jm_conf\n";
   }
   else
   {

      $need_print=0;

      chomp($hostname);
      chomp($cg_results);
      ($cpu, $manuf, $os) = split(/-/, $cg_results);

      print CONF "-home $globusdir\n";
      print CONF "-e $globusdir/libexec\n";
      print CONF "-globus-gatekeeper-host $hostname\n";
      print CONF "-globus-host-cputype $cpu\n";
      print CONF "-globus-host-manufacturer $manuf\n";
      print CONF "-globus-host-osname $os\n";
      print CONF "-globus-host-osversion \n";
      print CONF "-save-logfile on_errors\n";
      close(CONF);
      print "Done\n";

   }
}

if ( ( -d "$globusdir/etc/grid-services" ) &&
     ( ! -f "$jm_service" ) )
{
   print "Creating grid service jobmanager...\n";
  
   if ( ! open(SERVICE, ">$jm_service") )
   {
      print STDERR "open failed for $jm_service\n";
   }
   else
   {
      #service arguments must be on the same line
      print SERVICE "jobmanager stderr_log,local_cred - ".
                    "$globusdir/libexec/globus-job-manager ".
                    "globus-job-manager ".
                    "-conf $globusdir/etc/globus-job-manager.conf ".
                    "-type fork -rdn jobmanager -machine-type unknown ".
                    "-publish-jobs\n";

      $need_print=0;
      close(SERVICE);
      print "Done\n";<commit_msg>The format of the contents of the service file has been changed.  The service name has been removed as the first argument in the file.<commit_after>my $gpath = $ENV{GPT_LOCATION};

if (!defined($gpath))
{
  $gpath = $ENV{GLOBUS_LOCATION};
}

if (!defined($gpath))
{
   die "GPT_LOCATION or GLOBUS_LOCATION needs to be set before running this script"
}

@INC = (@INC, "$gpath/lib/perl");

require Grid::GPT::Setup;

my $metadata = new Grid::GPT::Setup(package_name => "globus_gram_job_manager_setup");

my $globusdir = $ENV{GLOBUS_LOCATION};
my $setupdir = "$globusdir/setup/globus/";
my $jm_conf = "$globusdir/etc/globus-job-manager.conf";
my $jm_service = "$globusdir/etc/grid-services/jobmanager";
my $hostname = `$globusdir/bin/globus-hostname`;
my $cg_results = `$globusdir/sbin/config.guess`;
my $need_print = 1;

if ( ! -f "$jm_conf" )
{
   print "Creating job manager configuration file...\n";

   if ( ! open(CONF, ">$jm_conf") )
   {
      print STDERR "open failed for $jm_conf\n";
   }
   else
   {

      $need_print=0;

      chomp($hostname);
      chomp($cg_results);
      ($cpu, $manuf, $os) = split(/-/, $cg_results);

      print CONF "-home $globusdir\n";
      print CONF "-e $globusdir/libexec\n";
      print CONF "-globus-gatekeeper-host $hostname\n";
      print CONF "-globus-host-cputype $cpu\n";
      print CONF "-globus-host-manufacturer $manuf\n";
      print CONF "-globus-host-osname $os\n";
      print CONF "-globus-host-osversion \n";
      print CONF "-save-logfile on_errors\n";
      close(CONF);
      print "Done\n";

   }
}

if ( ( -d "$globusdir/etc/grid-services" ) &&
     ( ! -f "$jm_service" ) )
{
   print "Creating grid service jobmanager...\n";
  
   if ( ! open(SERVICE, ">$jm_service") )
   {
      print STDERR "open failed for $jm_service\n";
   }
   else
   {
      #service arguments must be on the same line
      print SERVICE "stderr_log,local_cred - ".
                    "$globusdir/libexec/globus-job-manager ".
                    "globus-job-manager ".
                    "-conf $globusdir/etc/globus-job-manager.conf ".
                    "-type fork -rdn jobmanager -machine-type unknown ".
                    "-publish-jobs\n";

      $need_print=0;
      close(SERVICE);
      print "Done\n";
{'fraction_non_alphanumeric': 0.15663196016296968, 'fraction_numerical': 0.001358080579447714, 'mean_word_length': 2.6251025430680888, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2402992', 'n_tokens_mistral': 1620, 'n_tokens_neox': 1567, 'n_words': 344}