HPE GreenLake Administration
- Community Home
 - >
 - Servers and Operating Systems
 - >
 - Operating Systems
 - >
 - Operating System - Linux
 - >
 - FORTRAN file handling question
 
Operating System - Linux
        1840125
        Members
    
    
        2200
        Online
    
    
        110161
        Solutions
    
Forums
        Categories
Company
Local Language
                
                  
                  back
                
        
                
        
                
        
                
        
        
        
                
        
                
        
        
        
                
        
              
              Forums
Discussions
Forums
- Data Protection and Retention
 - Entry Storage Systems
 - Legacy
 - Midrange and Enterprise Storage
 - Storage Networking
 - HPE Nimble Storage
 
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
                
                  
                  back
                
            
                
            
                
            
                
            
                
            
                
            
                
            
                
            
                
            
                
            
                
            
                
            
                
            
                
            
                
            
                
            
                
            
            
                
            
                
            
                
            
                
            
            
                
            
                
            
            
                
            
                
              
            Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
 - Appliance Servers
 - Alpha Servers
 - BackOffice Products
 - Internet Products
 - HPE 9000 and HPE e3000 Servers
 - Networking
 - Netservers
 - Secure OS Software for Linux
 - Server Management (Insight Manager 7)
 - Windows Server 2003
 - Operating System - Tru64 Unix
 - ProLiant Deployment and Provisioning
 - Linux-Based Community / Regional
 - Microsoft System Center Integration
 
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
        Information
        Community
Resources
Community Language
        Language
        Forums
Blogs
	
		
			
            
                
            Go to solution
        
            
		
		
			
            	
	
		
        
		
	
	
		Topic Options
			
				
					
	
			
		
	- Subscribe to RSS Feed
 - Mark Topic as New
 - Mark Topic as Read
 - Float this Topic for Current User
 - Bookmark
 - Subscribe
 - Printer Friendly Page
 
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
01-05-2006 12:45 AM
01-05-2006 12:45 AM
			
				
					
					
						Hello.
I have an interesting problem, but I seems to be complicated to explain so bear with me.
I have a FORTRAN program (to which I cannot access the source and can only execute from a remote directory). This program creates output files as part of its execution. If you run this program using a path from another directory (for example: /var/tmp > /A/B/MyProgram) the output files will be created in the directory the program is called from (in this case /var/tmp).
My question is, is there any way to direct the output to another directory, different to the one I am calling it from?
The problem is that I am calling this program from another program that runs in a directory and I want the output to go into another directory, without having to copy the files after the program runs (there is lots of output > 10GB) an I would like to keep this program as fast as possible.
Thanks for any help you can give.
	
			
				
		
			
			
			
			
			
			
		
		
		
	
	
	
I have an interesting problem, but I seems to be complicated to explain so bear with me.
I have a FORTRAN program (to which I cannot access the source and can only execute from a remote directory). This program creates output files as part of its execution. If you run this program using a path from another directory (for example: /var/tmp > /A/B/MyProgram) the output files will be created in the directory the program is called from (in this case /var/tmp).
My question is, is there any way to direct the output to another directory, different to the one I am calling it from?
The problem is that I am calling this program from another program that runs in a directory and I want the output to go into another directory, without having to copy the files after the program runs (there is lots of output > 10GB) an I would like to keep this program as fast as possible.
Thanks for any help you can give.
Solved! Go to Solution.
- Tags:
 - f90
 
		3 REPLIES 3
	
	            
            
		
		
			
            
                - Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
01-05-2006 12:53 AM
01-05-2006 12:53 AM
Solution
			
				
					
					
						Alex,
pretty tricky if you have not got access to source code.
I'd try
1. target directory as a parameter
2. create a link in the target directory pointing to the directory where the program is called from. So no copying of data !!
Let us know if it works.
		
		
	
	
	
pretty tricky if you have not got access to source code.
I'd try
1. target directory as a parameter
2. create a link in the target directory pointing to the directory where the program is called from. So no copying of data !!
Let us know if it works.
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
01-05-2006 01:00 AM
01-05-2006 01:00 AM
			
				
					
						
							Re: FORTRAN file handling question
						
					
					
				
			
		
	
			
	
	
	
	
	
			
				
					
					
						Thanks but there's a potential problem that I didn't explain.
My programs runs many cases so the problem arises that if I link the directories, all of my output directories will just be the last run case, right?
		
		
	
	
	
My programs runs many cases so the problem arises that if I link the directories, all of my output directories will just be the last run case, right?
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
01-05-2006 01:22 AM
01-05-2006 01:22 AM
			
				
					
						
							Re: FORTRAN file handling question
						
					
					
				
			
		
	
			
	
	
	
	
	
			
				
					
					
						Alex,
in that case:
1. Run the program from dir A
2. Rename the output file with the rename command, which will just chnage the name (nice and quick)
3. Create the link in the target output directory back to the newly renamed file
You can now run your program again and go throught the same loop.
Have you had any success with supplying the output dir as a parameter.
Another idea may be to cd to the intended output dir and then run your command
along the lines:
cd outputdir
/A/B/MyProgram
cd -
					
				
			
			
				
			
			
				
			
			
			
			
			
			
		
		
		
	
	
	
in that case:
1. Run the program from dir A
2. Rename the output file with the rename command, which will just chnage the name (nice and quick)
3. Create the link in the target output directory back to the newly renamed file
You can now run your program again and go throught the same loop.
Have you had any success with supplying the output dir as a parameter.
Another idea may be to cd to the intended output dir and then run your command
along the lines:
cd outputdir
/A/B/MyProgram
cd -
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
		
	
	
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP