- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear all,
I would like to ask you something I am trying to do in fortran. I am trying to compiling a fortran code from another frotran code. I am doing this using call system command as follows,
call system (" newfile/abaqus job=analisis user=Juan_Reaccion_Difusion_Poro_1 ")
where newfile is the file where is located the second fortran code and abaqus job=analisis user=Juan_Reaccion_Difusion_Poro_1 is the command to compile the code located in that file.
I have had problems because it does not work.
I apprecciate you collaboration whit this
Sincerely
Juan
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How does it "not work"? Is "newfile" a directory in your current directory? Maybe try "./newfile" instead - I often find I need to add the dot.
Also, note that Intel Fortran supports the Fortran standard EXECUTE_COMMAND_LINE intrinsic procedure, so you could write:
call EXECUTE_COMMAND_LINE(" ./newfile/abaqus job=analisis user=Juan_Reaccion_Difusion_Poro_1 ")
There are optional arguments to get a status and whether or not to wait.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Lionel,
I did your recomendadtion but did not work. If I use EXECUTE_COMMAND_LINE, it says that the command is not recognized. I did the same with call system but it says that the dot is not recognized as a command.
Now I'm trying to do another thing that consist in create a .bat file that contains the next secuence.
@echo off
cd newfile
call C:\SIMULIA\Abaqus\Commands\abaqus job=analisis user=Juan_Reaccion_Difusion_Poro_1.for
exit
If I open this file it will run the code that is located in the file "newfile". It is working manually. But now I'm trying to include a routine in the main fortran code to execute this .bat file and I ahve not find a solution yet.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Now you're on Windows? Your original question showed Linux file path syntax and this is the Linux forum. If you are on Windows then you would want:
call EXECUTE_COMMAND_LINE("newfile\abaqus job=analisis user=Juan_Reaccion_Difusion_Poro_1 ")
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, I am on Windows, and the comand call EXECUTE_COMMAND_LINE is not recognized by the fortran I'm using
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Then go back to using SYSTEM. But this tells me you're using a version older than 15.0 (16.0 is current and 17.0 will be released soon), so I recommend you try to get more up to date.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page