Subject: Question, please (fwd)

From: "Zheng, Qiang" <[email-masked]>
Date: Fri, 31 Mar 2000 09:51:01 -0500 (EST)

Hi,

Can you answer this question? Thanks.

Regards,

                                                 - Zheng, Qiang

---------- Forwarded message ----------
Date: Fri, 31 Mar 2000 08:40:45 -0600
From: "Freeman, Reed B WES" <[email-masked]>
To: "'Zheng, Qiang'" <[email-masked]>
Subject: Question, please

Qiang:

I'm trying to "OPEN" a data file from within a FORTRAN77 program on VPL.
The execution is having trouble finding the file that I'm trying to open.  I
get the message "... cannot find [file]."  

When using VPL, what must be included in the directory structure preceding
the filename?  The program worked on my PC.  

Thanks, 
Reed.

---

From: "Freeman, Reed B WES" <[email-masked]>
Date: Fri, 31 Mar 2000 10:49:18 -0600

Thanks for your time.

I have resorted to trying to implement a very simple program where I read
data and print immediately.  The program now finds the file OK.  However, it
does not seem to like the looks of the datafile.  I get the message below.
Does the datafile have to end with any syntax, like "eof"?

-------------------------------
list read: [-1] end of file
logical unit 3, named 'inputc.dat'
lately: reading sequential list external IO
part of last format: ext list io
part of last data: |
Signaled (core dumped).
-------------------------------

-----Original Message-----
From: Saleh Elmohamed [mailto:[email-masked]]
Sent: Friday, March 31, 2000 10:50 AM
To: [email-masked]
Cc: Qiang Zheng
Subject: Re: Question, please (fwd)

Openning an input data file in VPL is quite simple. You put your file
in the same directory where your source is and then in your code you'd 
have something like this, for example:

...
open (4,file='data.input',status='old',err=998)
...

and that should do it. If your data file located in a different directory
then you'd put that name in front of the file name.

-Saleh

---

From: "Freeman, Reed B WES" <[email-masked]>
Date: Fri, 31 Mar 2000 11:10:22 -0600

Saleh:

I am trying something similar to what you have suggested.  The short code is
shown below.  The datafile, 'data.input,' contains a single integer on a
single line.  It was generated within the VPL text editor.  Any additional
suggestions would be very much appreciated.

- Reed.

      program assign
      implicit none
      INTEGER Y
      OPEN (Unit=3, FILE='data.input')
      Read (Unit=3, *) Y
      Print *, Y
      Close (Unit=3) 
      end 

-----Original Message-----
From: Saleh Elmohamed [mailto:[email-masked]]
Sent: Friday, March 31, 2000 11:10 AM
To: Freeman, Reed B WES
Subject: RE: Question, please (fwd)

I really don't know of any special characters you'd need
to end your file. Start with a small file, say, couple of lines
and see. Also, it may help to end it with one or two blank
lines - no space just hit <enter> once or twice....

On Fri, 31 Mar 2000, Freeman, Reed B WES wrote:

> > The execution is having trouble finding the file that I'm trying to
open.
> I

---

From: "Zheng, Qiang" <[email-masked]>
Date: Fri, 31 Mar 2000 12:13:34 -0500 (EST)

Hi, Saleh,

I tried the code and it ran OK in my workstation. Can you tell why the
student cannot run successfully in VPL?

Regards,

                                                 - Zheng, Qiang

---------- Forwarded message ----------
Date: Fri, 31 Mar 2000 11:03:48 -0600
From: "Freeman, Reed B WES" <[email-masked]>
To: "'Zheng, Qiang'" <[email-masked]>
Subject: RE: Question, please

Qiang:

Now I'm just trying to run the short code shown below.  The datafile,
'data.input,' contains a single integer on a single line.  It was generated
within the VPL text editor.

Thanks,
Reed.

      program assign
      implicit none
      INTEGER Y

-----Original Message-----
From: Zheng, Qiang [mailto:[email-masked]]
Sent: Friday, March 31, 2000 11:02 AM
To: Freeman, Reed B WES
Subject: RE: Question, please

No, not necessary to contain "EOF" as a syntax part of the file.

Can you send me the code and your data file? How's your data file
generated?

Regards,

                                                 - Zheng, Qiang

On Fri, 31 Mar 2000, Freeman, Reed B WES wrote:

> From: Zheng, Qiang [mailto:[email-masked]]
> Sent: Friday, March 31, 2000 10:46 AM
> To: Freeman, Reed B WES
> Subject: Re: Question, please
> 
> 
> Hi,
> 
> Can you tell me where to find your code? Thanks.
> 
> Regards,
> 
>                                                  - Zheng, Qiang
> 
open.

---

From: "Freeman, Reed B WES" <[email-masked]>
Date: Fri, 31 Mar 2000 11:22:46 -0600

Saleh:

This program is "assign4c.f" within directory "freemar/assign4/."  The
datafile "data.input" is in the same directory.

Thanks for the help,
Reed.

-----Original Message-----
From: Saleh Elmohamed [mailto:[email-masked]]
Sent: Friday, March 31, 2000 11:21 AM
To: Freeman, Reed B WES
Subject: RE: Question, please (fwd)

I'm going to look at your VPL area, where did you put this file? 
I'll try to copy it to my VPL area and see if I get the same
problems.

On Fri, 31 Mar 2000, Freeman, Reed B WES wrote:

> > data and print immediately.  The program now finds the file OK.
However,
> it

---

From: "Freeman, Reed B WES" <[email-masked]>
Date: Fri, 31 Mar 2000 11:56:20 -0600

Saleh:

Thanks.  But I get the error message below when I run "assign4c.f"

- Reed.

---------------------------------
open: [1018] can't find 'old' file
logical unit 3, named 'data.input'
Signaled (core dumped).
--------------------------------

-----Original Message-----
From: Saleh Elmohamed [mailto:[email-masked]]
Sent: Friday, March 31, 2000 11:56 AM
To: Freeman, Reed B WES
Subject: RE: Question, please (fwd)

I changed few things in your code such as having 8 'blank'
chars before each source line and added status 'old' to the open...
assign4c.f works, give it a try....

On Fri, 31 Mar 2000, Freeman, Reed B WES wrote:

> > I am trying something similar to what you have suggested.  The short
code
> is

---

From: "Freeman, Reed B WES" <[email-masked]>
Date: Fri, 31 Mar 2000 12:05:31 -0600

Saleh:

Sorry for the trouble.  I exited out of the browser, when back to VPL, and
ran the program again.  I received the following error message (same as
before).

This is the first time I've tried to open a file within a program from my
VPL account.  All other homeworks were done by hard-coding data into the
programs.

I need this capability to start my project.  Any more suggestions or help
will be appreciated.

- Reed.

-----------------------------------
open: [1018] can't find 'old' file
logical unit 3, named 'data.input'
Signaled (core dumped).

-----Original Message-----
From: Saleh Elmohamed [mailto:[email-masked]]
Sent: Friday, March 31, 2000 12:02 PM
To: Freeman, Reed B WES
Subject: RE: Question, please (fwd)

This is crazy. Exit out of VPL and even out of the browser and
restart again and see. I didn't notice any such problems...

On Fri, 31 Mar 2000, Freeman, Reed B WES wrote:

> > > > > I'm trying to "OPEN" a data file from within a FORTRAN77 program
on
> > VPL.

---

From: "Freeman, Reed B WES" <[email-masked]>
Date: Fri, 31 Mar 2000 12:09:22 -0600

I am running on a single node.  The program compiles without a problem.

-----Original Message-----
From: Saleh Elmohamed [mailto:[email-masked]]
Sent: Friday, March 31, 2000 12:11 PM
To: Freeman, Reed B WES
Subject: RE: Question, please (fwd)

I don't understand why you core dummping. Do you get any error
when compiling? Are you running on a single node? 
You need to compile before your run it...

on

---

From: "Freeman, Reed B WES" <[email-masked]>
Date: Fri, 31 Mar 2000 12:13:12 -0600

Yes, I am doing as you suggest.  I just reran an old assignment and it ran
fine.  My problem did not start until trying to use the OPEN and READ
statements.

-----Original Message-----
From: Saleh Elmohamed [mailto:[email-masked]]
Sent: Friday, March 31, 2000 12:14 PM
To: Freeman, Reed B WES
Subject: RE: Question, please (fwd)

also make sure to run it with the option (fortran77+mpi) executable on
only one node since you don't have any mpi code in there...

On Fri, 31 Mar 2000, Freeman, Reed B WES wrote:

> > > > shown below.  The datafile, 'data.input,' contains a single integer
on
> a
> > > > > I have resorted to trying to implement a very simple program where
I
> > > read
> > > > > does not seem to like the looks of the datafile.  I get the
message
> > > below.

---

From: "Freeman, Reed B WES" <[email-masked]>
Date: Fri, 31 Mar 2000 13:42:27 -0600

Saleh:

It compiled fine and then I got the message shown below.  I exited the VPL
file manager, then returned and refreshed.  I checked the output file, named
"after."  It also contained the message shown below.

- Reed.

-------------------------------
list read: [-1] end of file
logical unit 11, named './data.input'
lately: reading sequential list external IO
part of last format: ext list io
part of last data: |
Signaled (core dumped).
-------------------------

-----Original Message-----
From: Saleh Elmohamed [mailto:[email-masked]]
Sent: Friday, March 31, 2000 1:28 PM
To: Freeman, Reed B WES
Subject: RE: Question, please (fwd)

Ok, try it now. got to assign4 and try compiling
and the running assign4c.f .... let me know what you get.
Try first to refresh or exit from the window manager and
then get back in.

On Fri, 31 Mar 2000, Freeman, Reed B WES wrote:

> > > > > > >                                                  - Zheng,
Qiang
> > > > > > > The execution is having trouble finding the file that I'm
trying
> > to
> > > > > > > When using VPL, what must be included in the directory
structure
> > > > > preceding