Back to index

nordugrid-arc-nox  1.1.0~rc6
ExecutionTarget.cpp
Go to the documentation of this file.
00001 // -*- indent-tabs-mode: nil -*-
00002 
00003 #ifdef HAVE_CONFIG_H
00004 #include <config.h>
00005 #endif
00006 
00007 #include <arc/ArcConfig.h>
00008 #include <arc/Logger.h>
00009 #include <arc/XMLNode.h>
00010 #include <arc/client/ClientInterface.h>
00011 #include <arc/client/ExecutionTarget.h>
00012 #include <arc/client/Submitter.h>
00013 #include <arc/UserConfig.h>
00014 
00015 namespace Arc {
00016 
00017   ExecutionTarget::ExecutionTarget()
00018     : Latitude(0),
00019       Longitude(0),
00020       DowntimeStarts(-1),
00021       DowntimeEnds(-1),
00022       MaxWallTime(-1),
00023       MaxTotalWallTime(-1),
00024       MinWallTime(-1),
00025       DefaultWallTime(-1),
00026       MaxCPUTime(-1),
00027       MaxTotalCPUTime(-1),
00028       MinCPUTime(-1),
00029       DefaultCPUTime(-1),
00030       MaxTotalJobs(-1),
00031       MaxRunningJobs(-1),
00032       MaxWaitingJobs(-1),
00033       MaxPreLRMSWaitingJobs(-1),
00034       MaxUserRunningJobs(-1),
00035       MaxSlotsPerJob(-1),
00036       MaxStageInStreams(-1),
00037       MaxStageOutStreams(-1),
00038       MaxMainMemory(-1),
00039       MaxVirtualMemory(-1),
00040       MaxDiskSpace(-1),
00041       Preemption(false),
00042       TotalJobs(-1),
00043       RunningJobs(-1),
00044       LocalRunningJobs(-1),
00045       WaitingJobs(-1),
00046       LocalWaitingJobs(-1),
00047       SuspendedJobs(-1),
00048       LocalSuspendedJobs(-1),
00049       StagingJobs(-1),
00050       PreLRMSWaitingJobs(-1),
00051       EstimatedAverageWaitingTime(-1),
00052       EstimatedWorstWaitingTime(-1),
00053       FreeSlots(-1),
00054       UsedSlots(-1),
00055       RequestedSlots(-1),
00056       Reservation(false),
00057       BulkSubmission(false),
00058       TotalPhysicalCPUs(-1),
00059       TotalLogicalCPUs(-1),
00060       TotalSlots(-1),
00061       Homogeneous(true),
00062       WorkingAreaShared(true),
00063       WorkingAreaTotal(-1),
00064       WorkingAreaFree(-1),
00065       WorkingAreaLifeTime(-1),
00066       CacheTotal(-1),
00067       CacheFree(-1),
00068       VirtualMachine(false),
00069       CPUClockSpeed(-1),
00070       MainMemorySize(-1),
00071       ConnectivityIn(false),
00072       ConnectivityOut(false) {}
00073 
00074   ExecutionTarget::ExecutionTarget(const ExecutionTarget& target) {
00075     Copy(target);
00076   }
00077 
00078   ExecutionTarget::ExecutionTarget(const long int addrptr) {
00079     Copy(*(ExecutionTarget*)addrptr);
00080   }
00081 
00082   ExecutionTarget& ExecutionTarget::operator=(const ExecutionTarget& target) {
00083     Copy(target);
00084     return *this;
00085   }
00086 
00087   ExecutionTarget::~ExecutionTarget() {}
00088 
00089   void ExecutionTarget::Copy(const ExecutionTarget& target) {
00090 
00091     // Attributes from 5.3 Location
00092 
00093     Address = target.Address;
00094     Place = target.Place;
00095     Country = target.Country;
00096     PostCode = target.PostCode;
00097     Latitude = target.Latitude;
00098     Longitude = target.Longitude;
00099 
00100     // Attributes from 5.5.1 Admin Domain
00101 
00102     DomainName = target.DomainName;
00103     Owner = target.Owner;
00104 
00105     // Attributes from 6.1 Computing Service
00106 
00107     ServiceName = target.ServiceName;
00108     ServiceType = target.ServiceType;
00109 
00110     // Attributes from 6.2 Computing Endpoint
00111 
00112     url = target.url;
00113     Capability = target.Capability;
00114     Technology = target.Technology;
00115     InterfaceName = target.InterfaceName;
00116     InterfaceVersion = target.InterfaceVersion;
00117     InterfaceExtension = target.InterfaceExtension;
00118     SupportedProfile = target.SupportedProfile;
00119     Implementor = target.Implementor;
00120     Implementation = target.Implementation;
00121     QualityLevel = target.QualityLevel;
00122     HealthState = target.HealthState;
00123     HealthStateInfo = target.HealthStateInfo;
00124     ServingState = target.ServingState;
00125     IssuerCA = target.IssuerCA;
00126     TrustedCA = target.TrustedCA;
00127     DowntimeStarts = target.DowntimeStarts;
00128     DowntimeEnds = target.DowntimeEnds;
00129     Staging = target.Staging;
00130     JobDescriptions = target.JobDescriptions;
00131 
00132     // Attributes from 6.3 Computing Share
00133 
00134     ComputingShareName = target.ComputingShareName;
00135     MaxWallTime = target.MaxWallTime;
00136     MaxTotalWallTime = target.MaxTotalWallTime;
00137     MinWallTime = target.MinWallTime;
00138     DefaultWallTime = target.DefaultWallTime;
00139     MaxCPUTime = target.MaxCPUTime;
00140     MaxTotalCPUTime = target.MaxTotalCPUTime;
00141     MinCPUTime = target.MinCPUTime;
00142     DefaultCPUTime = target.DefaultCPUTime;
00143     MaxTotalJobs = target.MaxTotalJobs;
00144     MaxRunningJobs = target.MaxRunningJobs;
00145     MaxWaitingJobs = target.MaxWaitingJobs;
00146     MaxPreLRMSWaitingJobs = target.MaxPreLRMSWaitingJobs;
00147     MaxUserRunningJobs = target.MaxUserRunningJobs;
00148     MaxSlotsPerJob = target.MaxSlotsPerJob;
00149     MaxStageInStreams = target.MaxStageInStreams;
00150     MaxStageOutStreams = target.MaxStageOutStreams;
00151     SchedulingPolicy = target.SchedulingPolicy;
00152     MaxMainMemory = target.MaxMainMemory;
00153     MaxVirtualMemory = target.MaxVirtualMemory;
00154     MaxDiskSpace = target.MaxDiskSpace;
00155     DefaultStorageService = target.DefaultStorageService;
00156     Preemption = target.Preemption;
00157     TotalJobs = target.TotalJobs;
00158     RunningJobs = target.RunningJobs;
00159     LocalRunningJobs = target.LocalRunningJobs;
00160     WaitingJobs = target.WaitingJobs;
00161     LocalWaitingJobs = target.LocalWaitingJobs;
00162     SuspendedJobs = target.SuspendedJobs;
00163     LocalSuspendedJobs = target.LocalSuspendedJobs;
00164     StagingJobs = target.StagingJobs;
00165     PreLRMSWaitingJobs = target.PreLRMSWaitingJobs;
00166     EstimatedAverageWaitingTime = target.EstimatedAverageWaitingTime;
00167     EstimatedWorstWaitingTime = target.EstimatedWorstWaitingTime;
00168     FreeSlots = target.FreeSlots;
00169     FreeSlotsWithDuration = target.FreeSlotsWithDuration;
00170     UsedSlots = target.UsedSlots;
00171     RequestedSlots = target.RequestedSlots;
00172     ReservationPolicy = target.ReservationPolicy;
00173 
00174     // Attributes from 6.4 Computing Manager
00175 
00176     ManagerProductName = target.ManagerProductName;
00177     ManagerProductVersion = target.ManagerProductVersion;
00178     Reservation = target.Reservation;
00179     BulkSubmission = target.BulkSubmission;
00180     TotalPhysicalCPUs = target.TotalPhysicalCPUs;
00181     TotalLogicalCPUs = target.TotalLogicalCPUs;
00182     TotalSlots = target.TotalSlots;
00183     Homogeneous = target.Homogeneous;
00184     NetworkInfo = target.NetworkInfo;
00185     WorkingAreaShared = target.WorkingAreaShared;
00186     WorkingAreaTotal = target.WorkingAreaTotal;
00187     WorkingAreaFree = target.WorkingAreaFree;
00188     WorkingAreaLifeTime = target.WorkingAreaLifeTime;
00189     CacheTotal = target.CacheTotal;
00190     CacheFree = target.CacheFree;
00191 
00192     // Attributes from 6.5 Benchmark
00193 
00194     Benchmarks = target.Benchmarks;
00195 
00196     // Attributes from 6.6 Execution Environment
00197 
00198     Platform = target.Platform;
00199     VirtualMachine = target.VirtualMachine;
00200     CPUVendor = target.CPUVendor;
00201     CPUModel = target.CPUModel;
00202     CPUVersion = target.CPUVersion;
00203     CPUClockSpeed = target.CPUClockSpeed;
00204     MainMemorySize = target.MainMemorySize;
00205     OperatingSystem = target.OperatingSystem;
00206     ConnectivityIn = target.ConnectivityIn;
00207     ConnectivityOut = target.ConnectivityOut;
00208 
00209     // Attributes from 6.7 Application Environment
00210 
00211     ApplicationEnvironments = target.ApplicationEnvironments;
00212 
00213     // Other
00214 
00215     GridFlavour = target.GridFlavour;
00216     Cluster = target.Cluster;
00217   }
00218 
00219   Submitter* ExecutionTarget::GetSubmitter(const UserConfig& ucfg) const {
00220     return (const_cast<ExecutionTarget*>(this))->loader.load(GridFlavour, ucfg);
00221   }
00222 
00223   void ExecutionTarget::Update(const JobDescription& jobdesc) {
00224 
00225     //WorkingAreaFree
00226     if (jobdesc.Resources.DiskSpaceRequirement.DiskSpace) {
00227       WorkingAreaFree -= (int)(jobdesc.Resources.DiskSpaceRequirement.DiskSpace / 10E9);
00228       if (WorkingAreaFree < 0)
00229         WorkingAreaFree = 0;
00230     }
00231 
00232     // FreeSlotsWithDuration
00233     if (!FreeSlotsWithDuration.empty()) {
00234       std::map<Period, int>::iterator cpuit, cpuit2;
00235       cpuit = FreeSlotsWithDuration.lower_bound((unsigned int)jobdesc.Resources.TotalCPUTime.range);
00236       if (cpuit != FreeSlotsWithDuration.end()) {
00237         if (jobdesc.Resources.SlotRequirement.NumberOfSlots >= cpuit->second)
00238           cpuit->second = 0;
00239         else
00240           for (cpuit2 = FreeSlotsWithDuration.begin();
00241                cpuit2 != FreeSlotsWithDuration.end(); cpuit2++) {
00242             if (cpuit2->first <= cpuit->first)
00243               cpuit2->second -= jobdesc.Resources.SlotRequirement.NumberOfSlots;
00244             else if (cpuit2->second >= cpuit->second) {
00245               cpuit2->second = cpuit->second;
00246               Period oldkey = cpuit->first;
00247               cpuit++;
00248               FreeSlotsWithDuration.erase(oldkey);
00249             }
00250           }
00251 
00252         if (cpuit->second == 0)
00253           FreeSlotsWithDuration.erase(cpuit->first);
00254 
00255         if (FreeSlotsWithDuration.empty()) {
00256           if (MaxWallTime != -1)
00257             FreeSlotsWithDuration[MaxWallTime] = 0;
00258           else
00259             FreeSlotsWithDuration[LONG_MAX] = 0;
00260         }
00261       }
00262     }
00263 
00264     //FreeSlots, UsedSlots, WaitingJobs
00265     if (FreeSlots >= abs(jobdesc.Resources.SlotRequirement.NumberOfSlots)) { //The job will start directly
00266       FreeSlots -= abs(jobdesc.Resources.SlotRequirement.NumberOfSlots);
00267       if (UsedSlots != -1)
00268         UsedSlots += abs(jobdesc.Resources.SlotRequirement.NumberOfSlots);
00269     }
00270     else if (WaitingJobs != -1)    //The job will enter the queue (or the cluster doesn't report FreeSlots)
00271       WaitingJobs += abs(jobdesc.Resources.SlotRequirement.NumberOfSlots);
00272 
00273     return;
00274 
00275   }
00276 
00277   void ExecutionTarget::Print(bool longlist) const {
00278 
00279     std::cout << IString("Cluster: %s", DomainName) << std::endl;
00280     if (!HealthState.empty())
00281       std::cout << IString(" Health State: %s", HealthState) << std::endl;
00282 
00283     if (longlist) {
00284 
00285       std::cout << std::endl << IString("Location information:") << std::endl;
00286 
00287       if (!Address.empty())
00288         std::cout << IString(" Address: %s", Address) << std::endl;
00289       if (!Place.empty())
00290         std::cout << IString(" Place: %s", Place) << std::endl;
00291       if (!Country.empty())
00292         std::cout << IString(" Country: %s", Country) << std::endl;
00293       if (!PostCode.empty())
00294         std::cout << IString(" Postal Code: %s", PostCode) << std::endl;
00295       if (Latitude != 0)
00296         std::cout << IString(" Latitude: %f", Latitude) << std::endl;
00297       if (Longitude != 0)
00298         std::cout << IString(" Longitude: %f", Longitude) << std::endl;
00299 
00300       std::cout << std::endl << IString("Domain information:") << std::endl;
00301 
00302       if (!Owner.empty())
00303         std::cout << IString(" Owner: %s", Owner) << std::endl;
00304 
00305       std::cout << std::endl << IString("Service information:") << std::endl;
00306 
00307       if (!ServiceName.empty())
00308         std::cout << IString(" Service Name: %s", ServiceName) << std::endl;
00309       if (!ServiceName.empty())
00310         std::cout << IString(" Service Type: %s", ServiceType) << std::endl;
00311 
00312       std::cout << std::endl << IString("Endpoint information:") << std::endl;
00313 
00314       if (url)
00315         std::cout << IString(" URL: %s", url.str()) << std::endl;
00316       if (!Capability.empty()) {
00317         std::cout << IString(" Capabilities:") << std::endl;
00318         for (std::list<std::string>::const_iterator it = Capability.begin();
00319              it != Capability.end(); it++)
00320           std::cout << "  " << *it << std::endl;
00321       }
00322       if (!Technology.empty())
00323         std::cout << IString(" Technology: %s", Technology) << std::endl;
00324       if (!InterfaceName.empty())
00325         std::cout << IString(" Interface Name: %s", InterfaceName)
00326                   << std::endl;
00327       if (!InterfaceVersion.empty()) {
00328         std::cout << IString(" Interface Versions:") << std::endl;
00329         for (std::list<std::string>::const_iterator it =
00330                InterfaceVersion.begin(); it != InterfaceVersion.end(); it++)
00331           std::cout << "  " << *it << std::endl;
00332       }
00333       if (!InterfaceExtension.empty()) {
00334         std::cout << IString(" Interface Extensions:") << std::endl;
00335         for (std::list<std::string>::const_iterator it =
00336                InterfaceExtension.begin();
00337              it != InterfaceExtension.end(); it++)
00338           std::cout << "  " << *it << std::endl;
00339       }
00340       if (!SupportedProfile.empty()) {
00341         std::cout << IString(" Supported Profiles:") << std::endl;
00342         for (std::list<std::string>::const_iterator it =
00343                SupportedProfile.begin(); it != SupportedProfile.end(); it++)
00344           std::cout << "  " << *it << std::endl;
00345       }
00346       if (!Implementor.empty())
00347         std::cout << IString(" Implementor: %s", Implementor) << std::endl;
00348       if (!Implementation().empty())
00349         std::cout << IString(" Implementation Name: %s", (std::string)Implementation)
00350                   << std::endl;
00351       if (!QualityLevel.empty())
00352         std::cout << IString(" QualityLevel: %s", QualityLevel) << std::endl;
00353       if (!HealthState.empty())
00354         std::cout << IString(" Health State: %s", HealthState) << std::endl;
00355       if (!HealthStateInfo.empty())
00356         std::cout << IString(" Health State Info: %s", HealthStateInfo)
00357                   << std::endl;
00358       if (!ServingState.empty())
00359         std::cout << IString(" Serving State: %s", ServingState) << std::endl;
00360 
00361       if (ApplicationEnvironments.size() > 0) {
00362         std::cout << IString(" Installed application environments:") << std::endl;
00363         for (std::list<ApplicationEnvironment>::const_iterator it = ApplicationEnvironments.begin();
00364              it != ApplicationEnvironments.end(); it++) {
00365           std::cout << "  " << *it << std::endl;
00366         }
00367       }
00368 
00369       if (ConnectivityIn)
00370         std::cout << IString(" Execution environment"
00371                              " supports inbound connections") << std::endl;
00372       else
00373         std::cout << IString(" Execution environment does not"
00374                              " support inbound connections") << std::endl;
00375       if (ConnectivityOut)
00376         std::cout << IString(" Execution environment"
00377                              " supports outbound connections") << std::endl;
00378       else
00379         std::cout << IString(" Execution environment does not"
00380                              " support outbound connections") << std::endl;
00381 
00382       if (!IssuerCA.empty())
00383         std::cout << IString(" Issuer CA: %s", IssuerCA) << std::endl;
00384       if (!TrustedCA.empty()) {
00385         std::cout << IString(" Trusted CAs:") << std::endl;
00386         for (std::list<std::string>::const_iterator it = TrustedCA.begin();
00387              it != TrustedCA.end(); it++)
00388           std::cout << "  " << *it << std::endl;
00389       }
00390       if (DowntimeStarts != -1)
00391         std::cout << IString(" Downtime Starts: %s", DowntimeStarts.str())
00392                   << std::endl;
00393       if (DowntimeEnds != -1)
00394         std::cout << IString(" Downtime Ends: %s", DowntimeEnds.str())
00395                   << std::endl;
00396       if (!Staging.empty())
00397         std::cout << IString(" Staging: %s", Staging) << std::endl;
00398       if (!JobDescriptions.empty()) {
00399         std::cout << IString(" Job Descriptions:") << std::endl;
00400         for (std::list<std::string>::const_iterator it =
00401                JobDescriptions.begin(); it != JobDescriptions.end(); it++)
00402           std::cout << "  " << *it << std::endl;
00403       }
00404 
00405       std::cout << std::endl << IString("Queue information:") << std::endl;
00406 
00407       if (!ComputingShareName.empty())
00408         std::cout << IString(" Mapping Queue: %s", ComputingShareName) << std::endl;
00409       if (MaxWallTime != -1)
00410         std::cout << IString(" Max Wall Time: %s", MaxWallTime.istr())
00411                   << std::endl;
00412       if (MaxTotalWallTime != -1)
00413         std::cout << IString(" Max Total Wall Time: %s",
00414                              MaxTotalWallTime.istr()) << std::endl;
00415       if (MinWallTime != -1)
00416         std::cout << IString(" Min Wall Time: %s", MinWallTime.istr())
00417                   << std::endl;
00418       if (DefaultWallTime != -1)
00419         std::cout << IString(" Default Wall Time: %s",
00420                              DefaultWallTime.istr()) << std::endl;
00421       if (MaxCPUTime != -1)
00422         std::cout << IString(" Max CPU Time: %s", MaxCPUTime.istr())
00423                   << std::endl;
00424       if (MinCPUTime != -1)
00425         std::cout << IString(" Min CPU Time: %s", MinCPUTime.istr())
00426                   << std::endl;
00427       if (DefaultCPUTime != -1)
00428         std::cout << IString(" Default CPU Time: %s",
00429                              DefaultCPUTime.istr()) << std::endl;
00430       if (MaxTotalJobs != -1)
00431         std::cout << IString(" Max Total Jobs: %i", MaxTotalJobs) << std::endl;
00432       if (MaxRunningJobs != -1)
00433         std::cout << IString(" Max Running Jobs: %i", MaxRunningJobs)
00434                   << std::endl;
00435       if (MaxWaitingJobs != -1)
00436         std::cout << IString(" Max Waiting Jobs: %i", MaxWaitingJobs)
00437                   << std::endl;
00438       if (MaxPreLRMSWaitingJobs != -1)
00439         std::cout << IString(" Max Pre LRMS Waiting Jobs: %i",
00440                              MaxPreLRMSWaitingJobs) << std::endl;
00441       if (MaxUserRunningJobs != -1)
00442         std::cout << IString(" Max User Running Jobs: %i", MaxUserRunningJobs)
00443                   << std::endl;
00444       if (MaxSlotsPerJob != -1)
00445         std::cout << IString(" Max Slots Per Job: %i", MaxSlotsPerJob)
00446                   << std::endl;
00447       if (MaxStageInStreams != -1)
00448         std::cout << IString(" Max Stage In Streams: %i", MaxStageInStreams)
00449                   << std::endl;
00450       if (MaxStageOutStreams != -1)
00451         std::cout << IString(" Max Stage Out Streams: %i", MaxStageOutStreams)
00452                   << std::endl;
00453       if (!SchedulingPolicy.empty())
00454         std::cout << IString(" Scheduling Policy: %s", SchedulingPolicy)
00455                   << std::endl;
00456       if (MaxMainMemory != -1)
00457         std::cout << IString(" Max Memory: %i", MaxMainMemory) << std::endl;
00458       if (MaxVirtualMemory != -1)
00459         std::cout << IString(" Max Virtual Memory: %i", MaxVirtualMemory)
00460                   << std::endl;
00461       if (MaxDiskSpace != -1)
00462         std::cout << IString(" Max Disk Space: %i", MaxDiskSpace) << std::endl;
00463       if (DefaultStorageService)
00464         std::cout << IString(" Default Storage Service: %s",
00465                              DefaultStorageService.str()) << std::endl;
00466       if (Preemption)
00467         std::cout << IString(" Supports Preemption") << std::endl;
00468       else
00469         std::cout << IString(" Doesn't Support Preemption") << std::endl;
00470       if (TotalJobs != -1)
00471         std::cout << IString(" Total Jobs: %i", TotalJobs) << std::endl;
00472       if (RunningJobs != -1)
00473         std::cout << IString(" Running Jobs: %i", RunningJobs) << std::endl;
00474       if (LocalRunningJobs != -1)
00475         std::cout << IString(" Local Running Jobs: %i", LocalRunningJobs)
00476                   << std::endl;
00477       if (WaitingJobs != -1)
00478         std::cout << IString(" Waiting Jobs: %i", WaitingJobs) << std::endl;
00479       if (LocalWaitingJobs != -1)
00480         std::cout << IString(" Local Waiting Jobs: %i", LocalWaitingJobs)
00481                   << std::endl;
00482       if (SuspendedJobs != -1)
00483         std::cout << IString(" Suspended Jobs: %i", SuspendedJobs)
00484                   << std::endl;
00485       if (LocalSuspendedJobs != -1)
00486         std::cout << IString(" Local Suspended Jobs: %i", LocalSuspendedJobs)
00487                   << std::endl;
00488       if (StagingJobs != -1)
00489         std::cout << IString(" Staging Jobs: %i", StagingJobs) << std::endl;
00490       if (PreLRMSWaitingJobs != -1)
00491         std::cout << IString(" Pre-LRMS Waiting Jobs: %i", PreLRMSWaitingJobs)
00492                   << std::endl;
00493       if (EstimatedAverageWaitingTime != -1)
00494         std::cout << IString(" Estimated Average Waiting Time: %s",
00495                              EstimatedAverageWaitingTime.istr())
00496                   << std::endl;
00497       if (EstimatedWorstWaitingTime != -1)
00498         std::cout << IString(" Estimated Worst Waiting Time: %s",
00499                              EstimatedWorstWaitingTime.istr())
00500                   << std::endl;
00501       if (FreeSlots != -1)
00502         std::cout << IString(" Free Slots: %i", FreeSlots) << std::endl;
00503       if (!FreeSlotsWithDuration.empty()) {
00504         std::cout << IString(" Free Slots With Duration:") << std::endl;
00505         for (std::map<Period, int>::const_iterator it =
00506                FreeSlotsWithDuration.begin();
00507              it != FreeSlotsWithDuration.end(); it++)
00508           std::cout << IString("  %s: %i", it->first.istr(), it->second)
00509                     << std::endl;
00510       }
00511       if (UsedSlots != -1)
00512         std::cout << IString(" Used Slots: %i", UsedSlots) << std::endl;
00513       if (RequestedSlots != -1)
00514         std::cout << IString(" Requested Slots: %i", RequestedSlots)
00515                   << std::endl;
00516       if (!ReservationPolicy.empty())
00517         std::cout << IString(" Reservation Policy: %s", ReservationPolicy)
00518                   << std::endl;
00519 
00520       std::cout << std::endl << IString("Manager information:") << std::endl;
00521 
00522       if (!ManagerProductName.empty())
00523         std::cout << IString(" Resource Manager: %s", ManagerProductName)
00524                   << std::endl;
00525       if (!ManagerProductVersion.empty())
00526         std::cout << IString(" Resource Manager Version: %s",
00527                              ManagerProductVersion) << std::endl;
00528       if (Reservation)
00529         std::cout << IString(" Supports Advance Reservations") << std::endl;
00530       else
00531         std::cout << IString(" Doesn't Support Advance Reservations")
00532                   << std::endl;
00533       if (BulkSubmission)
00534         std::cout << IString(" Supports Bulk Submission") << std::endl;
00535       else
00536         std::cout << IString(" Doesn't Support Bulk Submission") << std::endl;
00537       if (TotalPhysicalCPUs != -1)
00538         std::cout << IString(" Total Physical CPUs: %i", TotalPhysicalCPUs)
00539                   << std::endl;
00540       if (TotalLogicalCPUs != -1)
00541         std::cout << IString(" Total Logical CPUs: %i", TotalLogicalCPUs)
00542                   << std::endl;
00543       if (TotalSlots != -1)
00544         std::cout << IString(" Total Slots: %i", TotalSlots) << std::endl;
00545       if (Homogeneous)
00546         std::cout << IString(" Homogeneous Resource") << std::endl;
00547       else
00548         std::cout << IString(" Non-homogeneous Resource") << std::endl;
00549       if (!NetworkInfo.empty()) {
00550         std::cout << IString(" Network Information:") << std::endl;
00551         for (std::list<std::string>::const_iterator it = NetworkInfo.begin();
00552              it != NetworkInfo.end(); it++)
00553           std::cout << "  " << *it << std::endl;
00554       }
00555       if (WorkingAreaShared)
00556         std::cout << IString(" Working area is shared among jobs")
00557                   << std::endl;
00558       else
00559         std::cout << IString(" Working area is not shared among jobs")
00560                   << std::endl;
00561       if (WorkingAreaTotal != -1)
00562         std::cout << IString(" Working Area Total Size: %i", WorkingAreaTotal)
00563                   << std::endl;
00564       if (WorkingAreaFree != -1)
00565         std::cout << IString(" Working Area Free Size: %i", WorkingAreaFree)
00566                   << std::endl;
00567       if (WorkingAreaLifeTime != -1)
00568         std::cout << IString(" Working Area Life Time: %s",
00569                              WorkingAreaLifeTime.istr()) << std::endl;
00570       if (CacheTotal != -1)
00571         std::cout << IString(" Cache Area Total Size: %i", CacheTotal)
00572                   << std::endl;
00573       if (CacheFree != -1)
00574         std::cout << IString(" Cache Area Free Size: %i", CacheFree)
00575                   << std::endl;
00576 
00577       // Benchmarks
00578 
00579       if (!Benchmarks.empty()) {
00580         std::cout << IString(" Benchmark Information:") << std::endl;
00581         for (std::map<std::string, double>::const_iterator it =
00582                Benchmarks.begin(); it != Benchmarks.end(); it++)
00583           std::cout << "  " << it->first << ": " << it->second << std::endl;
00584       }
00585 
00586       std::cout << std::endl << IString("Execution Environment information:")
00587                 << std::endl;
00588 
00589       if (!Platform.empty())
00590         std::cout << IString(" Platform: %s", Platform) << std::endl;
00591       if (VirtualMachine)
00592         std::cout << IString(" Execution environment is a virtual machine")
00593                   << std::endl;
00594       else
00595         std::cout << IString(" Execution environment is a physical machine")
00596                   << std::endl;
00597       if (!CPUVendor.empty())
00598         std::cout << IString(" CPU Vendor: %s", CPUVendor) << std::endl;
00599       if (!CPUModel.empty())
00600         std::cout << IString(" CPU Model: %s", CPUModel) << std::endl;
00601       if (!CPUVersion.empty())
00602         std::cout << IString(" CPU Version: %s", CPUVersion) << std::endl;
00603       if (CPUClockSpeed != -1)
00604         std::cout << IString(" CPU Clock Speed: %i", CPUClockSpeed)
00605                   << std::endl;
00606       if (MainMemorySize != -1)
00607         std::cout << IString(" Main Memory Size: %i", MainMemorySize)
00608                   << std::endl;
00609 
00610       if (!OperatingSystem.getFamily().empty())
00611         std::cout << IString(" OS Family: %s", OperatingSystem.getFamily()) << std::endl;
00612       if (!OperatingSystem.getName().empty())
00613         std::cout << IString(" OS Name: %s", OperatingSystem.getName()) << std::endl;
00614       if (!OperatingSystem.getVersion().empty())
00615         std::cout << IString(" OS Version: %s", OperatingSystem.getVersion()) << std::endl;
00616     } // end if long
00617 
00618     std::cout << std::endl;
00619 
00620   } // end print
00621 
00622 
00623 
00624 } // namespace Arc