region command makes problem on parallel

Dear Lammps users,
I am using the region command in my input file. The simulation works fine with one processor. But when I try running them on parallel (even with 2 processor) I get “segmentation fault”. However, I tried the same files on another cluster (with 12 processor) and it works with no error. Is there any way to solve this issue?

And some other times when I use region command, I get the error “Use of region with undefined lattice”. This is while I use read_data command to read the system from a data file and I don’t want to create a box in my input script!

I would be appreciated if you could give me some hints about the issues
Many Thanks
Fatima

Dear Lammps users,
I am using the region command in my input file. The simulation works fine
with one processor. But when I try running them on parallel (even with 2
processor) I get "segmentation fault". However, I tried the same files on
another cluster (with 12 processor) and it works with no error. Is there any
way to solve this issue?

impossible to say. what are the respective lammps versions.
there were some issues with mpi tasks having no atoms that
were fixed recently. a segmentation fault is a "generic" error.
you have to either debug it yourself (i explained to the list how
to do it a couple of times already) or have to provide a simple(!)
input that reproduces it.

And some other times when I use region command, I get the error "Use of
region with undefined lattice". This is while I use read_data command to
read the system from a data file and I don't want to create a box in my
input script!

you don't have to define a box. but you need to define a lattice,
if you define a region in lattice coordinates. otherwise you have
to the the region command to use box units. default is lattice
units. please re-read the documentation on the region command.

cheers,
   axel.

Dear Axel,

Thanks for your reply. I use some commands as follows

1 region onsurf1 block INF INF INF INF 10 32 units box move NULL NULL v_dz
2 region onsurf2 block INF INF INF INF -8 0 units box move NULL NULL v_dz
3 region onsurf3 block INF INF INF INF 61 68 units box move NULL NULL v_dz
4 region onsurf4 block INF INF INF INF -43 -36 units box move NULL NULL v_dz
5 region onsurf union 4 onsurf1 onsurf2 onsurf3 onsurf4 units box
6 group atomonSurf region onsurf

The problem occurs at line 6, the first group command after the regions. It seems that problem happens due to partitioning atoms and the way I have defined my regions (l added lines 2-4 since the region is not periodic and I didn’t want to miss some atoms there, am I safe to remove them?). Should define the region other way to avoid the problem?

Thanks again for your helpful comments
Fatima

Dear Axel,
Thanks for your reply. I use some commands as follows
1 region onsurf1 block INF INF INF INF 10 32 units box move
NULL NULL v_dz
2 region onsurf2 block INF INF INF INF -8 0 units box move
NULL NULL v_dz
3 region onsurf3 block INF INF INF INF 61 68 units box move
NULL NULL v_dz
4 region onsurf4 block INF INF INF INF -43 -36 units box
move NULL NULL v_dz
5 region onsurf union 4 onsurf1 onsurf2 onsurf3 onsurf4
units box
6 group atomonSurf region onsurf
The problem occurs at line 6, the first group command after the regions. It
seems that problem happens due to partitioning atoms and the way I have
defined my regions (l added lines 2-4 since the region is not periodic and I
didn't want to miss some atoms there, am I safe to remove them?). Should
define the region other way to avoid the problem?

all region statements except for the last have units box.
as the manual says, default is units lattice.

axel.

Dear Axel,
I found out the the segmentation fault occurs due to “move” keyword in the region commands. Without it I can run the job on parallel. Is there anyway to solve this issue?
Thanks
Fatima

Dear Axel,
I found out the the segmentation fault occurs due to "move" keyword in the
region commands. Without it I can run the job on parallel. Is there anyway
to solve this issue?

why do we have to repeat this over and over again???

please produce a complete and simple input that reproduces it
and somebody can debug it. if you cannot do that, you have to
debug and fix it on your own.

axel.

The only problem I found with the lines below is when you
don't have the variable dz defined. LAMMPS should catch
this error, but it doesn't (on the group command, it does on the run).

I will
post a patch, but for now must make sure your script defines
the dz variable you use. If that is not the issue, then
please post an entire simple small script which crashes.

Steve