Previous Thread
Next Thread
Print Thread
Issue of goto command in loop
#37878 05/13/20 08:38 AM
Joined: Nov 2019
Posts: 40
A
Forum Member
OP Offline
Forum Member
A
Joined: Nov 2019
Posts: 40
Hello charmm users,

I have an issue when using loop in C42B1 version of Charmm. An example is like following:
* test loop
* 2020/5/12
*
set i = 1
label loop
incr i by 1
if @i .lt. 10 then goto loop
STOP


Program just stopped after comparing two numbers as shown below. The error message printed forrtl: Illegal seek
forrtl: severe (20): REWIND error, unit 5, file /proc/131434/fd/0.
. But, if I remove 'label loop' and change the input to
set i = 1
if @i .lt. 10 then incr i by 1
STOP
then no issue occured. So, problem problem probably lies in loop structrue.

I'm using em64t_M of charmm. The error occurs no matter what number of processors I use. I have no idea why it happens.


1
Chemistry at HARvard Macromolecular Mechanics
(CHARMM) - Developmental Version 42b1 August 15, 2017
Copyright(c) 1984-2014 President and Fellows of Harvard College
All Rights Reserved
Current operating system: Linux-3.10.0-693.el7.x86_64(x86_64)@node21
Created on 5/13/20 at 16:16:00 by user: yuxiang

Maximum number of ATOMS: 360720, and RESidues: 120240
RDTITL> * TEST LOOP
RDTITL> * 2020/5/12
RDTITL> *

CHARMM> set i = 1
Parameter: I <- "1"

CHARMM> label loop

CHARMM> incr i by 1
Parameter: I <- "2"

CHARMM> if @i .LT. 10 then goto loop
Parameter: I -> "2"
Comparing "2" and "10".
IF test evaluated as true. Performing command

Last edited by Allen_123; 05/13/20 09:01 AM.
Re: Issue of goto command in loop
Allen_123 #37879 05/13/20 10:38 AM
Joined: Sep 2003
Posts: 4,793
Likes: 2
Forum Member
Online Content
Forum Member
Joined: Sep 2003
Posts: 4,793
Likes: 2
You cannot use input redirect ("<") with MPI and CHARMM goto statements. The correct way to run charmm is to use the "-i" flag instead:
(mpirun -np 2) charmm -i input_file.inp


Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden

Moderated by  lennart, rmv 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 5.6.33-0+deb8u1 Page Time: 0.009s Queries: 18 (0.004s) Memory: 0.8941 MB (Peak: 0.9582 MB) Data Comp: Off Server Time: 2020-09-23 00:29:08 UTC
Valid HTML 5 and Valid CSS