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

Using oneapi with VS2022 remote linux projects tip

MWind2
New Contributor III
682 Views

To get VS2022 remote linux project connection to verify with a .bashrc  setvars.sh use

". /opt/intel/oneapi/setvars.sh > /dev/null". It does not verify if one does not redirect output.

 

I used a makefile with fortran, but c/c++ worked icc/icpc in compiler and linker.

3 Replies
MWind2
New Contributor III
579 Views

Sadly, this is not as easy as it seemed because when I tested I was editing my ".bashrc" on hyperv host via rdp. I changed it to add ". /opt/intel/oneapi/setvars.sh > /dev/null" and VS2022 verified connection and compiled files, but I never tried to login via xrdp or from the host with that in the ".bashrc". I get "Oops, something went wrong from xrdp and please logout, and from the hyperv host, a login returns to the gnome login page. Now this will work if you have a user with such in the bashrc and is used exclusively with VS2022.

 

And I would add it took so look to find this conflict because of no power for 5days.

0 Kudos
MWind2
New Contributor III
574 Views

Also, I found the makefile fortran project would not build if the user name was changed in the remote login hostname if the project already existed. It wanted to put it in the original project user directory. The  project needed to be created new after user login change. Cursory search of project did find old user literal, but maybe it is elsewhere. 

0 Kudos
MWind2
New Contributor III
559 Views

To restate, create user with ".bashrc" containing ". /opt/intel/oneapi/setvars.sh > /dev/null". VS2022 will verifiy connection and compile files. Do not expect gnome login or xrdp to login on that user account with that ".bashrc".

Use another login, and if needed, use a common project directory like "/home/c/projects" set up with

sudo groupadd prog
sudo usermod -aG prog mwremote
sudo usermod -aG prog vs22
sudo chown -R mwremote:prog /home/c

and in VS2022 Project Properties->General->Remote Root Directory->"/home/c/projects"

0 Kudos
Reply