For experienced folks just look at the bold font, it’s the cut the crap version.
Found an alternative way of linking those stuff when you can’t change the environment variable (happens when you don’t have admin access to your machine) and it’s actually much more easier than the old method, and potentially could apply to more software edition combinations. So I recommend readers to try this method first.
The gross idea is to use Fortran’s own way to setup the environment for Fortran in Abaqus.
After you install Visual studio and Fortran , you can find a shortcut for command prompt under Fortran’s folder in Windows Start Menu. This shortcut is called ”Intel 64 Visual Studio 2010 mode“ or similar to it, and it will be find in your start menu under “Intel parallel studio XE” folder or in the command Prompt sub-folder depending on your version of Windows, VS and Fortran.
Right click the shortcut to look at it’s properties. You may need to open it’s “file location” first and then look at properties if you are using Win10.
In the target text box, there will be a command looks like :
C:\Windows\SysWOW64\cmd.exe /E:ON /V:ON /K ““C:\Program Files (x86)\Intel\Composer XE 2013\bin\ipsxe-comp-vars.bat” intel64 vs2012”
Only copy the bold and underlined part above, be careful with the quotation mark, if a syntax error shows up later then it’s probably the quotation mark you messed up.
Copy those to your abaqus.bat, by default setting this file is under ”C:\SIMULIA\Abaqus\Commands\“.Those text should be put in the second line and add @Call in front of those. So your abaqus.bat looks like this
@Call ”C:\Program Files (x86)\Intel\Composer XE 2013\bin\ipsxe-comp-vars.bat” intel64 vs2012
Save the file then you are done.
Verify it using the method I mentioned in the old instruction at the end of post.
——————————-old instructions after this line————————–
I use ABAQUS with user subroutine most of the time. However when I update to ABAQUS 6.13, my VS2008+Fortran10.1 does not work anymore.
Google told me 6.13+2012+XE2013 will make a perfect combo, I tried and it did.
The install of VS2012 and Fortran Composer is easy, just install VS first, then the Fortran will fit itself to the VS. However you need to link ABAQUS with those two in order to run jobs with subroutine. If you are not experienced, sometimes this final touch could be tricky.
Here I will show you a way will surely work but I don’t know if that is the best way, after all I am only a humble engineering student and most of the time I don’t understood the instructions written by programmers
The whole picture is in fact very simple: subroutine is written in Fortran as *.f files, and ABAQUS need to compile these *.f before using it. in this case, the ifort.exe is the compiler. So (1) we need the the access to ifort.exe. Furthermore, this ifort.exe cares a lot about the working condition, he actually have an assistant to build up the working place for him. This assistant is called ifortvars.bat. So (2) we need the access to this ifortvars and (3)make it work!
to do (1) and (2), we need to add the file path of ifort.exe and ifortvars.bat into environment variables (path), so we can access those two at any folder while using command window.
Search your C:\ for ifort and ifortvars’s path first, record it in a text file. usually the ifortvars is in:
“C:\Program Files (x86)\Intel\Composer XE 2013\bin”
and the ifort is in:
“C:\Program Files (x86)\Intel\Composer XE 2013\bin\intel64”
To setup environment variables:
right click on “computer”
choose “advanced system setting” at the left upper area of the current window
click on environment variables at right lower corner of the current window.
Choose variable “path” in the upper frame titled “system variables” and click “edit”
at the end of variable value, add these paths of your “ifort” and “ifortvars” you just found at step (A), for example, mine is:
;C:\Program Files (x86)\Intel\Composer XE 2013\bin;C:\Program Files (x86)\Intel\Composer XE 2013\bin\intel64
Attention: don’t miss the ; at the start of these text and replace my file path with your file path.
To do (3), we need to add ifortvars.bat into ABAQUS command batch file, so it could setup the environment every time ABAQUS runs.
Open your ABAQUS commands folder, usually at C:\SIMULIA\Abaqus\Commands
right click on abaqus.bat, choose “edit”.
You will probably see this:
just change it to this:
@call ifortvars.bat intel64 vs2012
Remember to change the bold part(intel64 vs2012) accordingly to your system type and software version. For example if you are using visual studio 2010, then vs2012 should be vs2010. I add this note because last time my friend Clay stuck on this tiny part and pissing in the wind checking system variables and fortran compatibility for 10 mins and cried.
Another note: if you run ABAQUS and saw the composer is working, but in the next line it says file or path did not find, please check the quotation marks in the line: “C:\SIMULIA\Abaqus\Commands\abq6131.bat” %* of abaqus.bat is correct, especially after you copied this line from my blog. In this case the quotation marks had been replaced by a kind of quotation marks unrecognizable by windows.
To verify if it works:
open a command window by type cmd and enter in the start menu.
abaqus verify -all
this command will run a comprehensive test for abaqus, including the standard and explicit with subroutine mode. Just read what’s on screen and perhaps the log file, you will see what your ABAQUS is capable of.
abaqus verify -user_std
abaqus verify -user_exp
only for standard and explicit subroutine