Thanks Axel,
I have tried the command that you gave me, but the problem is that my account doesn’t have the necessary permissions to install this way. It comes up with the errors:
Loaded plugins: fastestmirror, kernel-module
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in ?
yummain.user_main(sys.argv[1:], exit_code=True)
File "/usr/share/yum-cli/yummain.py", line 309, in user_main
errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line 157, in main
base.getOptionsConfig(args)
File "/usr/share/yum-cli/cli.py", line 201, in getOptionsConfig
(opts, self.cmds) = self.optparser.setupYumConfig(args=args)
File "/usr/share/yum-cli/cli.py", line 1172, in setupYumConfig
cachedir = yum.misc.getCacheDir()
File "/usr/lib/python2.4/site-packages/yum/misc.py", line 544, in getCacheDir
cachedir = tempfile.mkdtemp(prefix=prefix, dir=tmpdir)
File "/usr/lib64/python2.4/tempfile.py", line 328, in mkdtemp
_os.mkdir(file, 0700)
OSError: [Errno 13] Permission denied: '/var/tmp/yum-anemtzow-gkQn6S'
The current system that I am working on is: Linux version 2.6.18-194.3.1.el5 (brewbuilder@norob.fnal.gov) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)) #1 SMP Fri May 7 01:43:09 EDT 2010.
Also, the problematic code is simply one part of a quite large program. For the sake of saving space here is the file which is causing the problem:
[code]//#include “PUProcessesList.hh”
#include “PUAnalysis.hh”
//#include “EventDataDict.h”
#include “G4ProcessManager.hh”
#include “G4ProcessVector.hh”
#include “G4ParticleDefinition.hh”
#include “G4ParticleWithCuts.hh”
#include “G4ParticleTypes.hh”
#include “G4ParticleTable.hh”
#include “G4ios.hh”
#include “Randomize.hh”
#include “globals.hh”
#include “G4HCofThisEvent.hh”
#include “PUHit.hh”
#include “CLHEP/Random/Random.h”
#include “CLHEP/Random/RandGauss.h”
#include “TString.h”
#include “G4UImanager.hh”
#include “ConfigOptions.hh”
#include “G4VPhysicalVolume.hh”
#include “G4PhysicalVolumeStore.hh”
#include “PUPlacement.hh”
#include
#include “TH1F.h”
#include “TFile.h”
#include “TTree.h”
#include “G4Track.hh”
#include “G4Event.hh”
#include “G4Navigator.hh”
#include
PUAnalysis* PUAnalysis::instance = 0;
PUAnalysis::PUAnalysis(G4String filename) : ok(true), ROOTFileName(filename)
{
ConfigOptions *config = ConfigOptions::GetInstance();
if(ROOTFileName == “”){
ROOTFileName = config->GetValue(“output_filename”);
}
if(ROOTFileName.length() < 5 ||
ROOTFileName.substr(ROOTFileName.length()-5) != “.root”){
ROOTFileName.append(".root");
}
std::string::size_type loc = ROOTFileName.find(’/’,0);
if(loc == std::string::npos){
std::string output_dir = config->GetValue(“output_directory”);
ROOTFileName.insert(0,output_dir+"/");
}
Init();
nav = new G4Navigator;
event_threshold = 1keV;
registration_threshold = 1keV;
if(config->GetValue(“event_threshold”) != “”)
event_threshold = atof(config->GetValue(“event_threshold”).c_str())*keV;
if(config->GetValue(“registration_threshold”) != “”)
registration_threshold =
atof(config->GetValue(“registration_threshold”).c_str())*keV;
}
PUAnalysis::~PUAnalysis()
{
if(OutFile->IsOpen()) Finish();
// if(ok) delete EventTree;
delete OutFile;
delete data;
delete nav;
}
PUAnalysis* PUAnalysis::GetInstance(G4String filename)
{
if (instance == 0) instance = new PUAnalysis(filename);
return instance;
}
void PUAnalysis::Init()
{
data = new EventData;
OutFile = new TFile(ROOTFileName.c_str(),“RECREATE”);
if(!OutFile->IsOpen()){
ok=false;
G4cout<<"Error: Unable to open output file "<<ROOTFileName<<G4endl;
}
else{
G4cout<<"Saving output to file "<<ROOTFileName<<G4endl;
EventTree = new TTree(“Events”,“Statistics for each event”);
EventTree->Branch(“particle_data”,“EventData”,&data,32000,1);
}
}
void PUAnalysis::Finish()
{
if(OutFile->IsOpen() && ok){
WriteConfigOptions();
G4cout<<“Saving output to file “<<ROOTFileName<<G4endl;
//EventTree->Write();
OutFile->Write(”*”,TObject::kWriteDelete);
OutFile->Close();
}
}
void PUAnalysis::WriteConfigOptions()
{
OutFile->cd();
ConfigOptions *config = ConfigOptions::GetInstance();
if(config->GetValue(“save_config”) == “true”){
G4cout<<“Saving config options to root file…”<<G4endl;
TTree ConfigTree = new TTree(“ConfigOptions”,“Configuration Options”);
str_str_map ops_map = config->GetOptionsMap();
std::map<std::string, std::string>::iterator ops=ops_map.begin();
while(ops != ops_map.end()){
ConfigTree->Branch((ops -> first).c_str(),
(void)(ops -> second).c_str(),
(ops -> first + “/C”).c_str() );
ops++;
}
ConfigTree->Fill();
}
}
void PUAnalysis::RegisterParticle(const G4Track * ptrack)
{
G4int id = ptrack->GetTrackID();
G4int parid = ptrack->GetParentID();
G4ParticleDefinition *particle = ptrack->GetDefinition();
G4String pname = particle->GetParticleName();
G4String ptype = particle->GetParticleType();
const G4VProcess * proc = ptrack->GetCreatorProcess();
G4String procname = “primary”;
if(proc) procname = proc->GetProcessName();
G4ThreeVector pos = ptrack->GetPosition();
G4VPhysicalVolume *vol = nav->LocateGlobalPointAndSetup(pos);
G4String volname = “unreadable”;
if(vol) volname = vol->GetName();
G4double KE = ptrack->GetKineticEnergy()/keV;
G4double time = ptrack->GetGlobalTime()/s;
if(KE > registration_threshold/keV
|| pname == “neutron”
|| particle->GetPDGLifeTime() > 0) {
data->AddParticle(id,parid,pname,ptype,procname,volname,KE,time,
pos[0]/cm,pos[1]/cm,pos[2]/cm);
}
}
void PUAnalysis::EndEvent(const G4Event *evt)
{
G4ThreeVector active_centroid(0,0,0);
G4HCofThisEvent *HCE = evt->GetHCofThisEvent();
if(!HCE){
G4cout<<“HCofThisEvent is null pointer!!”<<G4endl;
return;
}
EventData::detector_list det=EventData::active;
for(G4int i=0;iGetNumberOfCollections();i++){
HitsCollection hc = (HitsCollection)HCE->GetHC(i);
if(hc->GetName() == “activeDet”)
det = EventData::active;
else if(hc->GetName() == “vetoDet”)
det = EventData::veto;
else if(hc->GetName() == “inactiveDet”)
det = EventData::inactive;
else if(hc->GetName() == “externalDet”)
det = EventData::external;
else
G4cout<<“Warning! Unknown hits collection passed to analysis!”<<G4endl;
for(G4int hitid=0; hitid < hc->entries(); hitid++){
PUHit *hit = (*hc)[hitid];
G4int id=hit->GetID();
G4int parid = hit->GetParentID();
G4double edep=hit->GetEdep()/keV;
G4String volname = “unreadable”;
G4VPhysicalVolume *vol = hit->GetVolume();
if(vol) volname = vol->GetName();
data->AddEdep(id,parid,edep,det,volname);
if(det == EventData::active){
active_centroid += hit->GetPosition() * hit->GetEdep()/keV;
}
}
}
double total_active_edep = std::accumulate(data->edep_active.begin(),
data->edep_active.end(),0.);
double total_veto_edep = std::accumulate(data->edep_veto.begin(),
data->edep_veto.end(),0.);
if(total_active_edep > event_threshold/keV){
data->total_active_edep = total_active_edep;
active_centroid /= total_active_edep;
G4PhysicalVolumeStore* volstore = G4PhysicalVolumeStore::GetInstance();
PUPlacement* active_vol = (PUPlacement*)(volstore->GetVolume(“p_active”));
active_centroid -= active_vol->GetGlobalCenter();
data->total_veto_edep = total_veto_edep;
data->active_centroid_x = active_centroid.getX();
data->active_centroid_y = active_centroid.getY();
data->active_centroid_z = active_centroid.getZ();
EventTree->Fill();
}
else if(total_veto_edep > event_threshold/keV){
data->total_veto_edep = total_veto_edep;
data->total_active_edep = total_active_edep;
EventTree->Fill();
}
}
[/code]
I found by placing cout statements that the error occurs in the Init() section in the middle. It completes the EventTree = new TTree(…) but never finishes Event Tree->Branch(…). I am not the author of the code so I am no expert on the structure of the program, but can assure you that this is working fine on other 32 bit computers. I am currently using ROOT version 5_27 but have also found the same error when I had root 5_26 (both are available on the system in a shared library and are compiled for 64 bit). I am assuming that it is in face a problem with the code that only appears in in 64 bit, however, if it runs on 32 I would like to try a 32 bit install on the computer to confirm this. If you need any other information such as a gdb debug please ask! Also, I am not sure if this is important, but I am accessing this program from another computer. I am using ssh -y username@web.address.com and have been able to run some GEANT4 examples without a problem.
Thanks for the help so far, I really appreciate it.
-umassguy