- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is it possible to have different coarrays work on different working directories?
For example I have a variable WorkingDIR
[fortran]
IERR=SYSTEM('cd '//TRIM(WorkingDIR))
[/fortran]
I am assuming because it opens a new cmd window and then imediately closes it while keeping the main program running in the original location.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I just found the command CHANGEDIRQQ that seems to be working. Are there any standard FORTRAN commands that can do the same?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The Fortran language doesn't know about the concept of directories.
I tend to just prefix all filenames in OPEN statements and the like with your equivalent of WorkingDir.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Scott,
An "Image" is run as a seperate process. Each process can have its own "current directory" and/or "current drive" and/or "PATH", ... "environment variables", ... resources.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank so much, thats great to know. How would you set an environmental variable for different images?
My program is working great by having each image use CHANGEDIRQQ to operate in different folders.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is no support for changing environment variables for specific images. I would say it is a bad idea to do this and would suggest putting the path you want as DEFAULTFILE in an OPEN statement. SYSTEM doesn't work because all that does is change the directory of the subprocess that SYSTEM creates - and then it goes away.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page