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

filesfromcmd scope

smedvedoff
Beginner
898 Views

I'm trying to confirm the scope of filesfromcmd. I have an application that links in two libraries, all in different projects. In the application and one of the library projects, filesfromcmd is set. In the second library project, it isn't. I would have thought that for routines in the application and lib #1, command line args would be used for missing filenames, and for routines in lib #2, they wouldn't. But it looks like when I run the resulting executable, routines in lib #1 don't automatically use cmd line args for filenames, as if the setting in lib #2 has somehow overridden the setting in lib #1. Is this possible?

Thanks,
Steve

0 Kudos
5 Replies
Steven_L_Intel1
Employee
898 Views
I can't reproduce this behavior. /fpscomp:filesfromcmd affects only OPEN statements in source files compiled with that option.
0 Kudos
smedvedoff
Beginner
898 Views

I'm seeing this happen in a read where the file has not been explicitly opened, e.g.,

Read( 15, IOSTAT=IST ) AnArray

where 15 has not been explicitly associated with a file through an OPEN statement.

0 Kudos
Steven_L_Intel1
Employee
898 Views
Yes, that's true. I tried my test again with READ statements and it still worked correctly. The source compiled without /fpscomp:filesfromcmd did not prompt even though the source compiled with that option, and executed first, did.
0 Kudos
smedvedoff
Beginner
898 Views
Okay, thanks for testing that. Did you happen to try with two separate libraries where one had /fpscomp:filesfromcmd and the other didn't, while the application did? For completeness it would be good to know that works as expected for you.

Thanks,
Steve
0 Kudos
Steven_L_Intel1
Employee
898 Views
I tried two separate objects - that will be the same as two libraries. What the option does is change a set of flags that is passed to the run-time library on every I/O call. There is no "global context" here.
0 Kudos
Reply