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

Problem with the "execute_command_line" intrinsec command

FlyingHermes
New Contributor I
1,017 Views
Hi,

I am trying to use the fortran 2008 "execute_command_line" intrinsec subroutine.
Although the "system" command is working, I have proble to have the 'execute_command_line" to work.
Here is a minimal example program:

[fortran]Program Test
  implicit none
  integer :: i, system
  i = system("echo 'system'; uname -ps")
  call execute_command_line("echo 'execute_command_line'; uname -ps")
End Program[/fortran]
which gives me the following:
[bash]$ ifort execute_command_line.f90; ./a.out 
/tmp/ifortkl0uFJ.o: In function `MAIN__':
execute_command_line.f90:(.text+0x55): undefined reference to `execute_command_line_'
[/bash]
What am I missing here ?
Thanks.
0 Kudos
4 Replies
TimP
Honored Contributor III
1,017 Views
Quoting from the response to premier issue 628820:
Hi Tim,
Thanks for your issue. I don't think this Fortran 2008 intrinsic is targeted for the upcoming 12.1 compiler. I will escalate to the compiler developers. That will help set priorities for future compiler releases.
As I'm sure you're aware, there are Intel-specific extensions, SYSTEM() and SYSTEMQQ(), that do something similar.
_______________________
I pointed out that gfortran released with this standard intrinsic over 6 months ago, as it is superior to the non-portable legacy intrinsics. You could write this standard intrinsic in terms of the legacy versions.
At present, there is little commonality in f2008 features among various compilers, so I have them all under
#ifdef __INTEL_COMPILER
......
#elif GCC_VERSION >= 6
....
#else
....
#endif

system happens to work with sufficient compatibility in several linux compilers.
0 Kudos
Steven_L_Intel1
Employee
1,017 Views
This is existing feature request ID DPD200169310. I'm sure we'll get to it eventually.
0 Kudos
FlyingHermes
New Contributor I
1,017 Views
Thanks.

I guess I just have to wait...
0 Kudos
Steven_L_Intel1
Employee
1,017 Views

This was implemented in version 15.0.

0 Kudos
Reply