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

Need to start separate program

mattsdad
Beginner
611 Views

I have encountered a situation where a small part of my most important program must produce formated HDF output which is dependent on a vendor librarythat is incompatible with Fortran's multithreaded libraries. I also need to use multithreaded capabilities for this program. The simple solution would be to compile this output section as a separatly linked program and push the data out to that program.

Is there a way to call a system routine from Fortran to start a separate program and specify the command line or to pass messages?

0 Kudos
4 Replies
TimP
Honored Contributor III
611 Views
Yes, ifort supports the common SYSTEM() function. Check the library doc. This function passes a command to the shell under which you started the ifort program.
I'd be surprised if you couldn't make HDF calls compatible, e.g. by compiling the source code. One of the advertised features was to make it possible for everyone to access the same data formats.
0 Kudos
mattsdad
Beginner
611 Views

Thanks for the info.

Unfortunately, HDF source code is dependent on some other libraries that do not have available a multitasking version. So the incompatibility problem is really in the other libraries.

0 Kudos
mattsdad
Beginner
611 Views
This problem surfaced again in another project. Is there an Intel tool or a Windows tool to examine the subroutine interfaces inside a .lib file?
0 Kudos
Steven_L_Intel1
Employee
611 Views
There is no information in a .lib file that will tell you the interface. The only clue possible is if the routine entry points use the STDCALL convention and have names ending ith @n - the n gives you a hint as to many arguments the routine expects (usually divide n by 4, but character arguments take two positions.)
0 Kudos
Reply