Fw: [opensuse] code failure between different openSUSE versions
As a temporary workaround, you might want to create an opensuse 13.2 virtual
machine under your opensuse 42.2 linux and run your code in that virtual
machine, while you are updating it to run on opensuse 42.2. I get the
impression that you are going to have to rework all of your code in order to
make it run on opensuse 42.2.
----- Original Message -----
From: "Joseph Comfort"
I few years ago, I optained a useful C++ subroutine package, and made some extensions to it. It worked marvelously with my own application codes. It provides an interface from fortran code to generate CERN 'root' files.
Recently, I updated most of my computers from SuSE v13.2 to v42.2. My application code still works just fine on v13.2, but crashes on v42.2 -- either complaining about a missing symbol (savehandler) or just doing core dumps. I need some suggestions and guidance. I am trying this list because the failure came after the OS upgrade.
The code provides an interface to the root libraries. Originally, it could only handle a single x.root file. I added code to have it use multiple files. The base code is a class RootTuple. When an instance is started, its pointer is stored in an array identified by the fortran unit number, via a call to savehandler. When switching files, the code loads the corresponding pointer via loadhandler.
There were/are different versions of the root library on the two OS's. If I use the one from v13.2 on a v42.2 machine, I also have failures. But if I usse the more recent root library version on the v13.2 system, the code works exactly as expected. So the root version does not seem to be the culprit. I have GNU v4.3 compilers on v13.2, and am using v4.5 on v42.2. (A brief test from v5.3 on a v42.2 computer did not seem to change anything.)
Relevant code from a user application and the library package are shown below. The user call to 'rootinit' appears to be handled fine (the file is opened and header information is written). The failure starts with the savehandler call. [out_unit has a value of 44.] My machines are 64-bit.
Was there some change to C++ language, conventions, or defaults between v13.2 and v42.2? What other changes in the OS were there that could affect the codes?
I will appreciate any ideas. Thank you.
From user code: ...... file = 'iotest.root' lenfil = index(file,' ') - 1 call rootinit(file(1:lenfil),'RootTuple','recreate') call savehandler(out_unit) ......
------------
From subroutine code interface.cxx:
#include "interface.h" #include "RootTuple.h"
// Declare global pointer RootTuple *eventHandler; RootTuple* eventHandlers[100];
//Push the current eventHandler to the vector. //Stores location in passed integer. void savehandler(int& id) { eventHandlers[id-1]=eventHandler; }
//Restores an eventhandler from the array. void loadhandler(int& id) { eventHandler = eventHandlers[id-1]; }
void rootinit(const char *filename, const char *treename, const char *fileio, int lfilename, int ltreename, int lfileio) { eventHandler = new RootTuple(strFtoC(filename, lfilename), strFtoC(treename, ltreename), strFtoC(fileio, lfileio)); eventHandler->Initialise(); }//rootinit
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (1)
-
Alec Destry