Previous Thread
Next Thread
Print Thread
Fortran runtime error: Error closing file in OPEN statement
#37651 09/10/19 02:31 PM
Joined: Jan 2019
Posts: 52
P
pmj Offline OP
Forum Member
OP Offline
Forum Member
P
Joined: Jan 2019
Posts: 52
Hi!

I am trying to compile charmm on another machine. I have successfully installed it on our other machines without any major problem using:

./install.com gnu xxlarge M

Previously I have downloaded the mpirun package using:

apt-get install libopenmpi-dev

After which I compiled the charmm with:

./install.com gnu xxlarge M

However, on this machine I am able to compile it, but I receive the following error after I try to run the simulation:

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
At line 154 of file /home/paula/Software/charmm42/source/machdep/startup.src (unit = 5, file = 'stdin')
Fortran runtime error: Error closing file in OPEN statement

I am not sure if the mpirun package is causing this issue?

Thank you for your help

Re: Fortran runtime error: Error closing file in OPEN statement
pmj #37652 09/10/19 03:00 PM
Joined: Sep 2003
Posts: 4,762
Forum Member
Offline
Forum Member
Joined: Sep 2003
Posts: 4,762
Possibly. You can test by installing without mpi and see if the problem is still there.

Most mpi implementations do not allow rewinding of stdin, which can occur if your charmm input file contains a goto statement. The recommended way to run charmm is NOT to use stdin redirection, but instead do the following:

(mpirun -np 4) charmm -i yourinputfile

You should also upgrade to the most recent charmm version.


Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden
Re: Fortran runtime error: Error closing file in OPEN statement
lennart #37653 09/10/19 03:37 PM
Joined: Jan 2019
Posts: 52
P
pmj Offline OP
Forum Member
OP Offline
Forum Member
P
Joined: Jan 2019
Posts: 52
Dear Lennart,

I have changed the syntax and it seems it is working fine!

Thank you

Re: Fortran runtime error: Error closing file in OPEN statement
pmj #37654 09/10/19 03:40 PM
Joined: Sep 2003
Posts: 8,425
rmv Offline
Forum Member
Offline
Forum Member
Joined: Sep 2003
Posts: 8,425
Also, make sure you are not using UNIT 5 in an OPEN statement to read a file. For technical reasons (Fortran), unit numbers 5, 6, and 7 should be avoided.


Rick Venable
computational chemist


Moderated by  chmgr, John Legato, lennart 

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.006s Queries: 22 (0.003s) Memory: 0.9115 MB (Peak: 0.9939 MB) Data Comp: Off Server Time: 2020-04-10 06:30:24 UTC
Valid HTML 5 and Valid CSS