espressomd-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ESPResSo] Pressure calculation


From: Torsten Stuehn
Subject: Re: [ESPResSo] Pressure calculation
Date: Wed, 30 Jan 2008 20:06:41 +0100
User-agent: Thunderbird 1.5.0.10 (X11/20070221)

The bug has been fixed in the newest CVS version.

For those of you who do not want to (or can not) upgrade to the
newest cvs version, here is what you have to change in your code:

find the following lines in pressure.h, in routine calc_bonded_force() [around line 300, change 
"i" to "(*i)" 4 times]:

---------------------------------------------------- snip 
-------------------------------------------------
     /* since it is not clear at the moment how to handle a many body 
interaction here, I skip it */
   case BONDED_IA_ANGLE:
     i++; force[0] = force[1] = force[2] = 0; break;
   case BONDED_IA_DIHEDRAL:
     i+=2; force[0] = force[1] = force[2] = 0; break;

#ifdef TABULATED
   case BONDED_IA_TABULATED:
     // printf("BONDED TAB, Particle: %d, P2: %d TYPE_TAB: 
%d\n",p1->p.identity,p2->p.identity,iparams->p.tab.type);
     switch(iaparams->p.tab.type) {
       case TAB_BOND_LENGTH:
          calc_tab_bond_force(p1, p2, iaparams, dx, force); break;
       case TAB_BOND_ANGLE:
         i++; force[0] = force[1] = force[2] = 0; break;
       case TAB_BOND_DIHEDRAL:
         i+=2; force[0] = force[1] = force[2] = 0; break;
---------------------------------------------------- snip 
-------------------------------------------------

and replace them with:

---------------------------------------------------- snip 
-------------------------------------------------
     /* since it is not clear at the moment how to handle a many body 
interaction here, I skip it */
   case BONDED_IA_ANGLE:
     (*i)++; force[0] = force[1] = force[2] = 0; break;
   case BONDED_IA_DIHEDRAL:
     (*i)+=2; force[0] = force[1] = force[2] = 0; break;

#ifdef TABULATED
   case BONDED_IA_TABULATED:
     // printf("BONDED TAB, Particle: %d, P2: %d TYPE_TAB: 
%d\n",p1->p.identity,p2->p.identity,iparams->p.tab.type);
     switch(iaparams->p.tab.type) {
       case TAB_BOND_LENGTH:
          calc_tab_bond_force(p1, p2, iaparams, dx, force); break;
       case TAB_BOND_ANGLE:
         (*i)++; force[0] = force[1] = force[2] = 0; break;
       case TAB_BOND_DIHEDRAL:
         (*i)+=2; force[0] = force[1] = force[2] = 0; break;
---------------------------------------------------- snip 
-------------------------------------------------

This will solve your problem.

Torsten.


Yelash, Dr. Leonid wrote:
Hi Christine and other Espresso-Users,

we also have similar problem in both the mpi and the fake versions:

FAKE VERSION:

add_bonded_virials: WARNING: Bond type 136622228 , atom 9 unhandled, Atom 2: 25
/remote/home/sokrates/yelash/Espresso-2.0.5e-nompi/obj-Pentium_4_64-pc-linux/Espresso:
 line 45: 11147 Segmentation fault      $ESPRESSO

MPI VERSION RUN ON 1 CPU:

add_bonded_virials: WARNING: Bond type 137329180 , atom 23 unhandled, Atom 2: 25
add_bonded_virials: WARNING: Bond type 89 , atom 24 unhandled, Atom 2: 25
add_bonded_virials: WARNING: Bond type 137328856 , atom 26 unhandled, Atom 2: 25
p0_11474:  p4_error: interrupt SIGSEGV: 11

Regards,
Leonid

_______________________________________
From: address@hidden address@hidden On Behalf Of Ben Reynwar address@hidden
Sent: Monday, January 28, 2008 5:29 PM
To: Christine Peter
Cc: address@hidden
Subject: Re: [ESPResSo] Pressure calculation

Hi Christine and all,
I'm the one that moved stuff into calc_bonded_force.  It was to avoid 
duplicating code for the pressure tensor and pressure calculations, but it's 
entirely possible I screwed something up.  Unfortunately if I did, I don't know 
where.
Ben

On 1/28/08, Christine Peter <address@hidden<mailto:address@hidden>> wrote:
Hi all,

I have a problem with the pressure calculation in Espresso.
After Torstens email from last week about the bug in the pressure
calculation with tabulated bonded potentials I checked out the latest
release. This release gives idential results to my old runs if I do not
execute the analyze pressure command, so everything I observe seems to
be related to the pressure calculation:

As soon as I execute analyze pressure I get a segmentation fault with
the preceding error message:

add_bonded_virials: WARNING: Bond type 9277 , atom 8925 unhandled, Atom
2: 8926


It seems that at some point while looping through the atoms  and the
bonds in add_bonded_virials a pointer goes astray. But I could not
identify why at this atom and at this bond. My system has 1323 molecules
with 9 atoms each. Each molecule has 8 bonds, 7 angles and 6 dihedral
angles. Some of the bonds and angles are tabulated. The error occurs
sort of unmotivated it seems.

The debugger has just helped to identify that the error occurs in pressure.h
at
356      p2 = local_particles[p1->bl.e[i++]];

Could it be that it has sth to do with the change in pressure.h where
parts from add_bonded_virials have been taken out and are now executed
in calc_bonded_force (I do not know who mad that change) ?

BTW: The error is not caused by Torsten's change to calculate the
pressure for tabulated bonds, if I take that out I still get the
segmentation fault.

Has anybody observed anything similar?

Cheers,
Christine.


--
Christine Peter
MPI for Polymer Research
Ackermannweg 10
55128 Mainz / Germany

Tel. +49-6131-379267
email: address@hidden<mailto:address@hidden>

_______________________________________________
ESPResSo mailing list
address@hidden<mailto:address@hidden>
https://fias.uni-frankfurt.de/mailman/listinfo/espresso

This email was Anti Virus checked by Astaro Security Gateway. 
http://www.astaro.com



_______________________________________________
ESPResSo mailing list
address@hidden
https://fias.uni-frankfurt.de/mailman/listinfo/espresso

This email was Anti Virus checked by Astaro Security Gateway. 
http://www.astaro.com




--
Dr. Torsten Stühn
MPI für Polymerforschung
Ackermannweg 10
55128 Mainz / Germany

Tel.  +49-(0)6131-379268
Fax +49-(0)6131-379100 EMail address@hidden

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]