Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28750 Discussions

System command in Intel Fortran 10.1

Bibek
Beginner
690 Views

Hello,

I am using Intel fortran compiler 10.1 to develop user defined feature in LS-DYNA (LS-DYNA still doesn't support the newer versions) with Microsoft Visual Studio 2008 on a Windows 7 Intel Xeon workstation. I was wondering if I could call an external .exe file (this .exe file will perform some numerical computation) from my fortran code in LS-DYNA. If so, could you please let me know appropriate command / function for this purpose, as for example, https://software.intel.com/en-us/fortran-compiler-developer-guide-and-reference-system? I didn't find documentation for Intel Fortran 10.1 unfortunately. If anyone could share it, I would appreciate that.

0 Kudos
1 Reply
Steve_Lionel
Honored Contributor III
690 Views

You almost certainly can use newer versions of the compiler with LS-DYNA. Often these third-party library developers never bother to update their documentation or test with newer versions.

You can use SYSTEM, but should add USE IFPORT to make it available. Here's an example from the manual:

   USE IFPORT
   INTEGER(4) I, errnum
   I = SYSTEM("dir > file.lst")
   If (I .eq. -1) then
     errnum = ierrno( )
     print *, 'Error ', errnum
   end if
   END

The call will not return until the program you specify finishes.

0 Kudos
Reply