×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

call system command fotran 77

call system command fotran 77

call system command fotran 77

(OP)
I want a program to call gnuplot a plot data that the program produces, but i don't know exactly how the call system comand works. Ideally i want something like

call system(gnuplot plot 'blabla.dat')

Thank you!

(i'm using fotran77 and the compiler f77)

RE: call system command fotran 77

call system("gnuplot plot blabla.dat")  

RE: call system command fotran 77

(OP)
doing that i get this error:

Cannot open load file 'plot'
line 0: util.c: No such file or directory
 

RE: call system command fotran 77

You are probably running from the wrong directory.  Two options

1) Change directory before making the system call.  If you're using GFortran, the call is chdir.  Other implemntations may have similar calls.
2) Use system to call a batch file which will go to the correct directory and call gnuplot.

RE: call system command fotran 77

Or, pass full path names for your files...I have found this to be the safest thing to do. This way, you can always leave the re-usable plot file in one place, and, depending on your run, pick up the blabla.dat file from the working directory, etc.

 

RE: call system command fotran 77

(OP)
Ok, two things:

1.- The file i'm trying to plot can't be in another directory because it's produced by the same program in the same one.

2.- I understand from the error message that system tries to load a file called 'plot' instead of entering the command plot to gnuplot.

I think that the syntax ("gnuplot plot blabla.dat") is wrong. I had already tried adding quotes like that or

Call system("gnuplot plot 'blabla.dat'")

and none of them work..

 

RE: call system command fotran 77

So, does the command "gnuplot plot blabla.dat" works from outside the Fortran program?  directly from the command line?

 

RE: call system command fotran 77

Looks like it is trying to call "gnuplot plot xxx.dat".

Write the command into a batch file and then call the batch file.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Resources

Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Design for Additive Manufacturing (DfAM)
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a part’s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close