-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invoke CreateGeometry() from StBFChain #477
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No objection.
No objection to merging this failing code? Hm... interesting 🤔 😄 |
delete [] file; | ||
} else { | ||
LOG_INFO << "StBFChain::Init file for geometry tag " << geom << " has not been found in path" << path << endm; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose, we might want to remove the macro files, if they are not used anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The StarDb/AgMLGeometry macros are still required. Any maker in the chain can request the geometry through GetDatabase("VmcGeometry") at any point in the lifetime of the application (during or after StChain::Init()). When that call is made, the DB looks for macros under StarDb/AgMLGeometry (or AgiGeometry depending on alias settings...).
The initialization of the geometry in StBFChain is only performed when certain makers are in the chain (see line 1015).
#include "StarVMC/StarAgmlLib/StarTGeoStacker.h" | ||
#include "StarVMC/StarGeometry/StarGeo.h" | ||
|
||
extern StBFChain* chain; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dlopen error: /star-sw/.sl79_gcc485/LIB/libStarGeometry.so: undefined symbol: chain
Looks like we've never landed the 205f44a.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, yes! I think that is the reason why half of the tests crashed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now ROOT5 seems to not handle the extern *chain
in bfc.C
.
} else { | ||
LOG_INFO << "StBFChain::Init file for geometry tag " << geom << " has not been found in path" << path << endm; | ||
} | ||
CreateGeometry(DbAlias[i].geometry); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CreateGeometry will not be found if the agml libraries are not loaded, e.g. if the AgML chain option is not specified. We switched to using AgML for the geometry description ~ 2012. Prior to that the geometry was supported from macros translated directly from the AgSTAR geometries (StarDb/AgiGeometry/). Thpse macros also depend on "CreateGeometry"... albeit a much simpler macro.
Maybe this is already known to @klendathu2k and @plexoos , but I figured I would document that I see that the current method of this in DEV does create some (not large) lost memory, according to valgrind in tests I was doing for something else: ==15423== 4 bytes in 1 blocks are definitely lost in loss record 15,244 of 312,718 Where StBFChain.cxx:1039 is the call to CreateGeometry:
Which is clear because the following is the only "force load of" in the output of the job: BFC:INFO - StBFChain::Init force load of /afs/rhic.bnl.gov/star/packages/DEV/StarDb/AgMLGeometry/Geometry.y2021a.C |
Actually it's a larger amount of "definitely lost memory" than I noted in my previous message as I see now several other such messages in the valgrind output, culminating in this biggest definite loss. I guess it may not be a big deal if the loss occurs after the geometry objects are done being used? ==15423== 107,204 (84,100 direct, 23,104 indirect) bytes in 725 blocks are definitely lost in loss record 312,478 of 312,718 |
0567d2c
to
1d765eb
Compare
star-sw/StarVMC/StarAgmlLib/AgPosition.cxx Lines 144 to 146 in fd34a52
star-sw/StarVMC/StarAgmlLib/AgPosition.cxx Lines 165 to 168 in fd34a52
star-sw/StarVMC/StarAgmlLib/AgPosition.cxx Lines 190 to 198 in fd34a52
|
c1b64f6
to
e893ec7
Compare
The code from StarDb/AgMLGeometry/CreateGeometry.h is copied to StarVMC/StarGeometry/CreateGeometry.cxx StarVMC/StarGeometry/CreateGeometry.h
e893ec7
to
69edf6b
Compare
Add function CreateGeometry() to StarGeometry library
The code from StarDb/AgMLGeometry/CreateGeometry.h is copied to
StBFChain: Call compiled CreateGeometry()