Closed mpbl closed 7 years ago
Where are the system
calls in the 2D code?
I know the 3D code has system
for VTK stuff.
They have been removed for portability reasons ('call system' is not part of the Fortran standard). In any case, in modern Fortran 'call system' should be replaced with 'call EXECUTE_COMMAND_LINE'
http://gcc.gnu.org/onlinedocs/gfortran/SYSTEM.html
Dimitri.
On 12/18/2013 07:43 AM, Elliott Sales de Andrade wrote:
Where are the |system| calls in the 2D code? I know the 3D code has |system| for VTK stuff.
— Reply to this email directly or view it on GitHub https://github.com/geodynamics/specfem3d/issues/10#issuecomment-30820458.
Dimitri Komatitsch CNRS Research Director (DR CNRS), Laboratory of Mechanics and Acoustics, UPR 7051, Marseille, France http://komatitsch.free.fr
They have been removed for portability reasons ('call system' is not part of the Fortran standard).
Yes, I have found them in the 3D code (VTK stuff), but I'm unsure where it is in the 2D code. I think the VTK stuff can be re-written to avoid system calls altogether, but if there are other uses of system
, then I would have to take a look at them.
It seems all the system calls have been removed, since
grep -i "call system" src//
returns nothing; thus closing this issue.
To make the three codes (2D, 3D_Cartesian, 3D_GLOBE) conform strictly to the Fortran standard, we should replace all "call system(...)" statements with "call execute_command_line(...)", which is the new standard way in Fortran2008. However, this intrinsic subroutine is currently (July 2013) not supported for instance by Intel ifort and thus we purposely do not do it yet, but around 2015 or so we should do it.