Commit b8d1ca52 authored by myron's avatar myron

corrected the loading of shared libraries

parent 07fe423c
......@@ -146,7 +146,7 @@ void * getLibNameHandle( const char *dirname, const char *prefix) {
printf(" spulciando %s , %s \n",dir->d_name , prefix);
if( strstr( dir->d_name, prefix )!=NULL ) {
if( strncmp( dir->d_name, prefix, strlen( prefix) )==0 ) {
closedir(d);
// closedir(d);
memcpy( fname , dir->d_name, strlen( dir->d_name)+1 );
sprintf(fname2,"%s/%s" , dirname , fname );
lib_handle = dlopen(fname2, RTLD_LAZY);
......@@ -5539,7 +5539,13 @@ void CCspace_preprocess_chunk(CCspace * self , int sn, int ntok, int ntokt ,
if (self->params.verbosity>1)
printf(" chiamo paganin packet %d\n", sn);
int mystart = self->reading_infos.tot_proj_num_list[ num_previous_projs + pstart] + self->reading_infos. proj_num_offset_list[sn_nb] ;
// int mystart = self->reading_infos.tot_proj_num_list[ num_previous_projs + pstart] + self->reading_infos. proj_num_offset_list[sn_nb] ;
int mystart = 0;
if( pend>pstart) {
mystart = self->reading_infos.tot_proj_num_list[ num_previous_projs + pstart] + self->reading_infos. proj_num_offset_list[sn_nb] ;
}
Paganin( self, Rawptr,
Pos0, Pos1, Size0, Size1,
pos_s [2*sn_nb +0], pos_s [2*sn_nb +1],
......@@ -6254,7 +6260,11 @@ void CCspace_InterleavedReadingPreProcessing_chunk(CCspace * self ,int sn,int
Rawptr = self-> rawdatatokens->datatokens[ntok] ;
if (self->params.verbosity>1) printf(" chiamo paganin packet %d\n", sn);
int mystart = self->reading_infos.tot_proj_num_list[ num_previous_projs + pstart] + self->reading_infos. proj_num_offset_list[sn_nb] ;
int mystart = 0;
if( pend>pstart) {
mystart = self->reading_infos.tot_proj_num_list[ num_previous_projs + pstart] + self->reading_infos. proj_num_offset_list[sn_nb] ;
}
Paganin( self, Rawptr + num_myprojs_reduced_forAllThreads*ibunch*Size0*Size1 ,
Pos0, Pos1, Size0, Size1,
......
......@@ -1291,7 +1291,7 @@ static PyMethodDef Cspace_methods[]={
/* }; */
static PyMethodDef Cspace_functions[] = {
{"Cspace", Cspace_new, METH_VARARGS, NULL },
{"Cspace", (PyCFunction) Cspace_new, METH_VARARGS, NULL },
{ NULL, NULL}
};
......@@ -1333,7 +1333,7 @@ static PyTypeObject MyCspacetype = {
.tp_doc = "Cspace",
.tp_basicsize = sizeof(Cspace),
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
.tp_new = Cspace_new,
.tp_new = (newfunc) Cspace_new,
.tp_dealloc = (destructor) Cspace_dealloc,
.tp_methods = Cspace_methods
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment