CHARMM Development Project
Posted By: Allen_123 Issue of goto command in loop - 05/13/20 08:38 AM
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
Posted By: lennart Re: Issue of goto command in loop - 05/13/20 10:38 AM
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
© CHARMM forums