Re: [Yade-users] [Question #443228]: segmentation fault using two kinds of cohefricmats under cohesive triaxial test

2017-04-19 Thread Seti
Question #443228 on Yade changed:
https://answers.launchpad.net/yade/+question/443228

Seti posted a new comment:
awesome, it is working. Thanks Jan :)

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #443228]: segmentation fault using two kinds of cohefricmats under cohesive triaxial test

2017-04-19 Thread Jan Stránský
Question #443228 on Yade changed:
https://answers.launchpad.net/yade/+question/443228

Jan Stránský proposed the following answer:
Ok, I have found the problem.

> Apart from the wall using the frictmat

the problem is that FrictMat is actually not used:

>for b in O.bodies:
> if random.random() < 0.5:
>  b.mat = mat1
> else:
>  b.mat = mat2

here you set materials of all bodies to CohFrictMat. Than between Box an
Sphere, ScGeom is created, but Ip2_CohFrictMat when setCohesionNow is
set consideres ScGeom6D, caousing the segmentation fault.

preserve FrictMat on boxes like following
###
for b in O.bodies:
  if not isinstance(b.shape,Sphere): # change material only on spheres
continue
  if random.random() < 0.5:
...
###
and the code should work (works for me)
cheers
Jan

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #443228]: segmentation fault using two kinds of cohefricmats under cohesive triaxial test

2017-04-19 Thread Jan Stránský
Question #443228 on Yade changed:
https://answers.launchpad.net/yade/+question/443228

Jan Stránský posted a new comment:
Strange, I tried it now and also got segmentation fault, too..

below see valgrind output in case it help for somebody. The error occurs
at the beginning of the last O.run command

cheers
Jan

#
==7339== Thread 8:
==7339== Invalid write of size 8
==7339==at 0x8E295F0: ScGeom6D::initRotations(State const&, State const&) 
(in /home/honzik/lib/x86_64-linux-gnu/yade-2017.01a/libyade.so)
==7339==by 0x9064E4C: 
Ip2_CohFrictMat_CohFrictMat_CohFrictPhys::go(boost::shared_ptr 
const&, boost::shared_ptr const&, boost::shared_ptr 
const&) (in /home/honzik/lib/x86_64-linux-gnu/yade-2017.01a/libyade.so)
==7339==by 0x927C77B: InteractionLoop::action() [clone ._omp_fn.0] (in 
/home/honzik/lib/x86_64-linux-gnu/yade-2017.01a/libyade.so)
==7339==by 0xDD81CBE: GOMP_parallel (in 
/usr/lib/x86_64-linux-gnu/libgomp.so.1.0.0)
==7339==by 0x927D3BA: InteractionLoop::action() (in 
/home/honzik/lib/x86_64-linux-gnu/yade-2017.01a/libyade.so)
==7339==by 0x8B97BC1: Scene::moveToNextTimeStep() (in 
/home/honzik/lib/x86_64-linux-gnu/yade-2017.01a/libyade.so)
==7339==by 0x8B9B2C2: SimulationFlow::singleAction() (in 
/home/honzik/lib/x86_64-linux-gnu/yade-2017.01a/libyade.so)
==7339==by 0x8A85645: ThreadWorker::callSingleAction() (in 
/home/honzik/lib/x86_64-linux-gnu/yade-2017.01a/libyade.so)
==7339==by 0x8B93B90: ThreadRunner::call() (in 
/home/honzik/lib/x86_64-linux-gnu/yade-2017.01a/libyade.so)
==7339==by 0x8B93E77: ThreadRunner::run() (in 
/home/honzik/lib/x86_64-linux-gnu/yade-2017.01a/libyade.so)
==7339==by 0x8B95A71: boost::detail::thread_data::run() (in /home/honzik/lib/x86_64-linux-gnu/yade-2017.01a/libyade.so)
==7339==by 0xAF0E5D4: ??? (in 
/usr/lib/x86_64-linux-gnu/libboost_thread.so.1.58.0)
==7339==  Address 0x2f87db10 is 0 bytes after a block of size 176 alloc'd
==7339==at 0x4C2E0EF: operator new(unsigned long) (in 
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==7339==by 0x8C3698B: Ig2_Box_Sphere_ScGeom::go(boost::shared_ptr 
const&, boost::shared_ptr const&, State const&, State const&, 
Eigen::Matrix const&, bool const&, 
boost::shared_ptr const&) (in 
/home/honzik/lib/x86_64-linux-gnu/yade-2017.01a/libyade.so)
==7339==by 0x927C624: InteractionLoop::action() [clone ._omp_fn.0] (in 
/home/honzik/lib/x86_64-linux-gnu/yade-2017.01a/libyade.so)
==7339==by 0xDD81CBE: GOMP_parallel (in 
/usr/lib/x86_64-linux-gnu/libgomp.so.1.0.0)
==7339==by 0x927D3BA: InteractionLoop::action() (in 
/home/honzik/lib/x86_64-linux-gnu/yade-2017.01a/libyade.so)
==7339==by 0x8B97BC1: Scene::moveToNextTimeStep() (in 
/home/honzik/lib/x86_64-linux-gnu/yade-2017.01a/libyade.so)
==7339==by 0x8B9B2C2: SimulationFlow::singleAction() (in 
/home/honzik/lib/x86_64-linux-gnu/yade-2017.01a/libyade.so)
==7339==by 0x8A85645: ThreadWorker::callSingleAction() (in 
/home/honzik/lib/x86_64-linux-gnu/yade-2017.01a/libyade.so)
==7339==by 0x8B93B90: ThreadRunner::call() (in 
/home/honzik/lib/x86_64-linux-gnu/yade-2017.01a/libyade.so)
==7339==by 0x8B93E77: ThreadRunner::run() (in 
/home/honzik/lib/x86_64-linux-gnu/yade-2017.01a/libyade.so)
==7339==by 0x8B95A71: boost::detail::thread_data::run() (in /home/honzik/lib/x86_64-linux-gnu/yade-2017.01a/libyade.so)
==7339==by 0xAF0E5D4: ??? (in 
/usr/lib/x86_64-linux-gnu/libboost_thread.so.1.58.0)
==7339== 
==7339== Invalid write of size 8
==7339==at 0x8E295FD: ScGeom6D::initRotations(State const&, State const&) 
(in /home/honzik/lib/x86_64-linux-gnu/yade-2017.01a/libyade.so)
==7339==by 0x9064E4C: 
Ip2_CohFrictMat_CohFrictMat_CohFrictPhys::go(boost::shared_ptr 
const&, boost::shared_ptr const&, boost::shared_ptr 
const&) (in /home/honzik/lib/x86_64-linux-gnu/yade-2017.01a/libyade.so)
==7339==by 0x927C77B: InteractionLoop::action() [clone ._omp_fn.0] (in 
/home/honzik/lib/x86_64-linux-gnu/yade-2017.01a/libyade.so)
==7339==by 0xDD81CBE: GOMP_parallel (in 
/usr/lib/x86_64-linux-gnu/libgomp.so.1.0.0)
==7339==by 0x927D3BA: InteractionLoop::action() (in 
/home/honzik/lib/x86_64-linux-gnu/yade-2017.01a/libyade.so)
==7339==by 0x8B97BC1: Scene::moveToNextTimeStep() (in 
/home/honzik/lib/x86_64-linux-gnu/yade-2017.01a/libyade.so)
==7339==by 0x8B9B2C2: SimulationFlow::singleAction() (in 
/home/honzik/lib/x86_64-linux-gnu/yade-2017.01a/libyade.so)
==7339==by 0x8A85645: ThreadWorker::callSingleAction() (in 
/home/honzik/lib/x86_64-linux-gnu/yade-2017.01a/libyade.so)
==7339==by 0x8B93B90: ThreadRunner::call() (in 
/home/honzik/lib/x86_64-linux-gnu/yade-2017.01a/libyade.so)
==7339==by 0x8B93E77: ThreadRunner::run() (in 
/home/honzik/lib/x86_64-linux-gnu/yade-2017.01a/libyade.so)
==7339==by 0x8B95A71: boost::detail::thread_data::run() (in 

Re: [Yade-users] [Question #443228]: segmentation fault using two kinds of cohefricmats under cohesive triaxial test

2017-04-18 Thread Seti
Question #443228 on Yade changed:
https://answers.launchpad.net/yade/+question/443228

Seti requested more information:
Hi Jan,

I ran  script on Ubuntu 16.04 and had segmentation fault!!!


Regards,
Seti

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #443228]: segmentation fault using two kinds of cohefricmats under cohesive triaxial test

2017-04-18 Thread Seti
Question #443228 on Yade changed:
https://answers.launchpad.net/yade/+question/443228

Seti requested more information:
Hi Jan,

I ran  script on Ubuntu 16.04 and had segmentation fault!!!


Regards,
Seti

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #443228]: segmentation fault using two kinds of cohefricmats under cohesive triaxial test

2017-01-21 Thread Jan Stránský
Question #443228 on Yade changed:
https://answers.launchpad.net/yade/+question/443228

Status: Open => Answered

Jan Stránský proposed the following answer:
Hi Han,
I have tried the your script on Ubuntu 16.04 and got error concerning
interactions, but not segmentation fault..
cheers
Jan

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp