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

Write access for .obj file

PASeeger
Beginner
2,324 Views
This is the source file:
 
      Program hello
      print *, 'hello world'
      end program
 
This is the command screen:
 
Copyright (C) 1985-2018 Intel Corporation. All rights reserved.
Intel(R) Compiler 18.0 Update 3 (package 210)
Setting environment for using Microsoft Visual Studio Shell 15.0 x86 tools.
C:\Program Files (x86)\IntelSWTools>ifort /c C:\temp\hello.f90
Intel(R) Visual Fortran Intel(R) 64 Compiler for applications running on IA-32, Version 18.0.3.210 Build 20180410
Copyright (C) 1985-2018 Intel Corporation.  All rights reserved.
error: can't open file hello.obj for write
compilation aborted for C:\temp\hello.f90 (code 1)
C:\Program Files (x86)\IntelSWTools>
 

I can turn off the "Read-only" attribute for the folder C:\temp, but when I execute ifort it gets changed back, and ifort can not generate the .obj file. 

 

0 Kudos
11 Replies
Steve_Lionel
Honored Contributor III
2,324 Views

See https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/topic/784675

0 Kudos
Baltaji__Omar
Beginner
2,324 Views

while running the compiler via the command prompt, cd to the folder containing the code before trying to compile

0 Kudos
gib
New Contributor II
2,324 Views

And as Steve already explained, you should do program development in a folder that you created, where you will have full read-write permissions.  Never work in a folder that is part of the compiler installation.

0 Kudos
jimdempseyatthecove
Honored Contributor III
2,324 Views
Copyright (C) 1985-2018 Intel Corporation. All rights reserved.
 Intel(R) Compiler 18.0 Update 3 (package 210)

Setting environment for using Microsoft Visual Studio Shell 15.0 x86 tools.

C:\Program Files (x86)\IntelSWTools>cd \temp
C:\temp>ifort /c hello.f90

Jim Dempsey

0 Kudos
Steve_Lionel
Honored Contributor III
2,324 Views

In particular, don't do development in a folder under Windows or Program Files. Unfortunately, the shortcut created by the install uses the install folder as a default. I'm not sure if the installer has the ability to change this.

0 Kudos
jimdempseyatthecove
Honored Contributor III
2,324 Views

>> I'm not sure if the installer has the ability to change this.

However, you can Right-Click on the shortcut, select properties, then in the Shortcut property tab, set the Start in property to a default folder of your preference (e.g. C:\temp or C:\workspace or ...)

Jim Dempsey

0 Kudos
Steve_Lionel
Honored Contributor III
2,324 Views

Sure, or what I do is:

  1. Copy the shortcut to my desktop
  2. Change the Start In folder
  3. Edit the path for Target to start with "%IFORT_COMPILER19%bin\"

This last means I can use the same shortcut to get the latest update and not have to find it in the Start menu. I also edit the Layout to increase the Window Size and Buffer Size.

0 Kudos
FortranFan
Honored Contributor III
2,324 Views

jimdempseyatthecove wrote:

>> I'm not sure if the installer has the ability to change this.

However, you can Right-Click on the shortcut, select properties, then in the Shortcut property tab, set the Start in property to a default folder of your preference (e.g. C:\temp or C:\workspace or ...)

Jim Dempsey

Good point by Jim, I was going to write the same.

It's rather surprising the Parallel Studio installer sets up shortcuts with a "Start in" setting to a folder under ProgFiles, a no-no from any software enterprise perspective:

lnk.png

 

Why can't someone from Intel staff take an action item from this thread to loop back to the Parallel Studio packaging team to modify the shortcut(s) with user-friendly settings such as those described in Quote #8? 

 

0 Kudos
Steve_Lionel
Honored Contributor III
2,324 Views

What would you suggest the installer select for Start In? The only thing I can think of would be My Documents. But then I looked at what Microsoft Visual Studio does, and it also sets Start In to be the install folder, so I have to think that the mechanism for adding the shortcut doesn't provide that capability.

0 Kudos
FortranFan
Honored Contributor III
2,324 Views

Steve Lionel (Ret.) wrote:

What would you suggest the installer select for Start In? ..

Why not Visual Studio XXXX folder in Documents?  Every shortcut in Intel Parallel Studio is specific to target platform (e.g., x64) but also the integration with a Visual Studio version.  And Microsoft Visual Studio installer indeed creates a folder under Documents e.g., %user profile\Documents\Visual Studio 2017.

0 Kudos
Steve_Lionel
Honored Contributor III
2,324 Views

Not a bad idea, but I do have to wonder why VS itself doesn't do this.

0 Kudos
Reply