Software Archive
Read-only legacy content
17061 Discussions

only root user can run mic_samples

wei_l_
Beginner
510 Views

Hi,

What I should do to make non root user can run code on mic? 

I copy the mic_samples to my home compile it and run:

source /opt/intel/parallel_studio_xe_2015/bin/psxevars.sh intel64 
./leoF_intro.out

System configuration pre-check
    Checking for Intel(R) Xeon Phi(TM) (Target CPU) devices...

    Number of Target devices installed:      0
    Offload sections will execute on:     Host CPU (fallback mode)

LEO_Fortran_intro samples started
    PASS leoF01_scalar
    PASS leoF02_global (Case #1)
    PASS leoF02_global (Case #2)
    PASS leoF03_various_clauses (Case #1)
    PASS leoF03_various_clauses (Case #2)
    PASS leoF04_explicit_shape_array
    PASS leoF05_assumed_shape_array (Case #1 - [dim=3])
    PASS leoF05_assumed_shape_array (Case #2 - [dim=3])
    PASS leoF05_assumed_shape_array (Case #3 - [dim=3])
    PASS leoF05_assumed_shape_array (Case #1 - [dim=6])
    PASS leoF05_assumed_shape_array (Case #2 - [dim=6])
    PASS leoF05_assumed_shape_array (Case #3 - [dim=6])
    PASS leoF05_assumed_shape_array (Case #1 - [dim=9])
    PASS leoF05_assumed_shape_array (Case #2 - [dim=9])
    PASS leoF05_assumed_shape_array (Case #3 - [dim=9])
    PASS leoF06_assumed_size_array (Case #1 - [dim=300])
    PASS leoF06_assumed_size_array (Case #2 - [dim=300])
    PASS leoF06_assumed_size_array (Case #3 - [dim=300])
    PASS leoF06_assumed_size_array (Case #1 - [dim=600])
    PASS leoF06_assumed_size_array (Case #2 - [dim=600])
    PASS leoF06_assumed_size_array (Case #3 - [dim=600])
    PASS leoF06_assumed_size_array (Case #1 - [dim=900])
    PASS leoF06_assumed_size_array (Case #2 - [dim=900])
    PASS leoF06_assumed_size_array (Case #3 - [dim=900])
    PASS leoF07_deferred_shape_array (Case #1)
    PASS leoF07_deferred_shape_array (Case #2)
    PASS leoF07_deferred_shape_array (Case #3)
    PASS leoF08_multi_target (Case #1)
    PASS leoF08_multi_target (Case #2)
    PASS leoF08_multi_target (Case #3)
    PASS leoF09_subprograms (Case #1)
    PASS leoF09_subprograms (Case #2)
    PASS leoF09_subprograms (Case #3)
    PASS leoF10_alloc_into (Case #1)
    *** FAIL leoF10_alloc_into (Case #2) : offload failure
    PASS leoF10_alloc_into (Case #3)
    PASS leoF11_async (Case #1)
    PASS leoF11_async (Case #2)
    PASS leoF11_async (Case #3)
    PASS leoF11_async (Case #4)
LEO_Fortran_intro samples complete

but I can run with root:

 

sudo bash
source /opt/intel/parallel_studio_xe_2015/bin/psxevars.sh intel64
./leoF_intro.out
System configuration pre-check
    Checking for Intel(R) Xeon Phi(TM) (Target CPU) devices...

    Number of Target devices installed:      1
    Offload sections will execute on:     Target CPU (offload mode)

LEO_Fortran_intro samples started
    PASS leoF01_scalar
    PASS leoF02_global (Case #1)
    PASS leoF02_global (Case #2)
    PASS leoF03_various_clauses (Case #1)
    PASS leoF03_various_clauses (Case #2)
    PASS leoF04_explicit_shape_array
    PASS leoF05_assumed_shape_array (Case #1 - [dim=3])
    PASS leoF05_assumed_shape_array (Case #2 - [dim=3])
    PASS leoF05_assumed_shape_array (Case #3 - [dim=3])
    PASS leoF05_assumed_shape_array (Case #1 - [dim=6])
    PASS leoF05_assumed_shape_array (Case #2 - [dim=6])
    PASS leoF05_assumed_shape_array (Case #3 - [dim=6])
    PASS leoF05_assumed_shape_array (Case #1 - [dim=9])
    PASS leoF05_assumed_shape_array (Case #2 - [dim=9])
    PASS leoF05_assumed_shape_array (Case #3 - [dim=9])
    PASS leoF06_assumed_size_array (Case #1 - [dim=300])
    PASS leoF06_assumed_size_array (Case #2 - [dim=300])
    PASS leoF06_assumed_size_array (Case #3 - [dim=300])
    PASS leoF06_assumed_size_array (Case #1 - [dim=600])
    PASS leoF06_assumed_size_array (Case #2 - [dim=600])
    PASS leoF06_assumed_size_array (Case #3 - [dim=600])
    PASS leoF06_assumed_size_array (Case #1 - [dim=900])
    PASS leoF06_assumed_size_array (Case #2 - [dim=900])
    PASS leoF06_assumed_size_array (Case #3 - [dim=900])
    PASS leoF07_deferred_shape_array (Case #1)
    PASS leoF07_deferred_shape_array (Case #2)
    PASS leoF07_deferred_shape_array (Case #3)
    PASS leoF08_multi_target (Case #1)
    PASS leoF08_multi_target (Case #2)
    PASS leoF08_multi_target (Case #3)
    PASS leoF09_subprograms (Case #1)
    PASS leoF09_subprograms (Case #2)
    PASS leoF09_subprograms (Case #3)
    PASS leoF10_alloc_into (Case #1)
    PASS leoF10_alloc_into (Case #2)
    PASS leoF10_alloc_into (Case #3)
    PASS leoF11_async (Case #1)
    PASS leoF11_async (Case #2)
    PASS leoF11_async (Case #3)
    PASS leoF11_async (Case #4)
LEO_Fortran_intro samples complete

Thanks!

0 Kudos
7 Replies
Kevin_D_Intel
Employee
510 Views

I'm not sure whether I'm following all your steps leading up to this issue. From what's shown it appears you may have built the sample under the root user, copied that build to your home directory, and then ran that executable under the non-root user but the sample did not offload as evidence by the 0 number of target devices installed. I'll check if that results in the failure you showed.

I note you indicated compiling under the non-root user but did not show that so just to double check, did you re-compile it under the non-root account?

 

0 Kudos
wei_l_
Beginner
510 Views

Hi,

yes, I only compile with my account (non root), I have checked it again. (ubuntu 14.04.)

Thank you for your replay~

0 Kudos
Kevin_D_Intel
Employee
510 Views

Ok, thank you for confirming. The failure might relate to the micuser account on the coprocessor which the offload runs under.

  • When setting up your system, was there anything unique done regarding user accounts on the coprocessor?
  • Did you follow/complete all the setup steps for the MPSS installation?
  • What is your version of MPSS?

This may not help much but try setting the environment variable OFFLOAD_REPORT=3 and running the sample under your account again. It probably will just show card initialization failing.

0 Kudos
wei_l_
Beginner
510 Views

Hi, 

 I use "export OFFLOAD_REPORT=3" not show any extra information during the run. I use MPSS 3.4.5.

I did not doing anything with user account on the coprocessor, except use micctrl to load the root sshkey to make the root also can login the mic.

I will read carefully the documents: 

"System_Administration_Guide_Intel(R)XeonPhi(TM)Coprocessor"

and 

Intel_Xeon_Phi_Quick_Start_Developers_Guide-MPSS-3.4

of course, If you can give me some cues, it will be much easier for me. thanks! 

I find something in the "mpss_users_guide" about it, 

7.14 Offload User Options

I try different --coiuser=[micuser/_Dynamic/_Authorized], it only affect on the root user of host.   

find the reason

/dev/mic/scif

 need have rw access as 

https://software.intel.com/en-us/forums/topic/532329

discussed special for ubuntu.

Thanks your help !

0 Kudos
Kevin_D_Intel
Employee
510 Views

So you are on an Ubuntu installation?  If I am reading your reply correctly, you are saying the issue has been resolved by changing the permissions on /dev/mic/scif, correct?

0 Kudos
wei_l_
Beginner
510 Views

Hi, Kevin

Yes, it works after change the permissions on /dev/mic/scif on ubuntu. 

Kevin Davis (Intel) wrote:

So you are on an Ubuntu installation?  If I am reading your reply correctly, you are saying the issue has been resolved by changing the permissions on /dev/mic/scif, correct?

0 Kudos
Kevin_D_Intel
Employee
510 Views

Thank you. I'm glad you were able to find that resolution. I'll make a note of this behavior for future reference. Wish you all the best going forward.

0 Kudos
Reply