Placement of element and material dynamic libraries in Linux

For developers writing C++, Fortran, Java, code who have questions or comments to make.

Moderators: silvia, selimgunay, Moderators

Post Reply
denavit
Posts: 15
Joined: Mon Nov 13, 2006 1:33 pm
Location: University of Tennessee, Knoxville

Placement of element and material dynamic libraries in Linux

Post by denavit »

Could you comment on the permissible locations for element and material dynamic libraries in Linux.

In the source code, it appears that two functions search for the .so file. The first, stat, appears to only look in the current directory. The second, dlopen, appears to look in LD_LIBRARY_PATH then a couple other places.

It is easy to add the folder where I put my .so files to LD_LIBRARY_PATH.

I like to be able to call OpenSees from the folder where my .tcl files are (not the same as where OpenSees and my .so files are). However, doing this causes stat not to be able to find my .so files.

Thanks,
Mark
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Post by fmk »

if you have not already done so, just comment out or remove this section of the code in OpenSees/SRC/api/packages.cpp

[code]
// Attempt to get the file attributes
intStat = stat(localLibName, &stFileInfo);
if(intStat != 0) {
opserr << "packages.cpp - NO FILE EXISTS: - trying OpenSees" << localLibName << endln;
int res = httpGET_File("opensees.berkeley.edu", localLibName, 80, localLibName);
if (res != 0) {
opserr << "packages.cpp - NO FILE EXISTS: " << localLibName << endln;
return -1;
}
}
[/code]
Post Reply