Intel® MPI Library
Get help with building, analyzing, optimizing, and scaling high-performance computing (HPC) applications.
2153 Discussions

oneAPI 2021.1 compiler modulefiles isseue with Lmod (`is-avail` command does not exist)

dodo
Novice
1,826 Views

I noticed that Lmod 8.4.19(latest version) do not support `is-avail` for now and it makes problem at  "/opt/intel/oneapi/modulefiles/compiler/2021.1.1`

```

if { [ is-avail $cmplr_root/linux/lib/oclfpga/modulefiles/oclfpga ] } {

     module load $cmplr_root/linux/lib/oclfpga/modulefiles/oclfpga
}

```

So I use `try-load` of Lmod:

```

module try-load $cmplr_root/linux/lib/oclfpga/modulefiles/oclfpga

```

However this requires tidious job for evey oneapi update in future.  Is there any better options for it?

0 Kudos
5 Replies
PrasanthD_intel
Moderator
1,796 Views

Hi Lee,


I have checked the Lmod user guide 8.4.19 and I can see that is-avail has been mentioned as a functionality. I cannot find any reference of is-avail being removed.

But for the logic you are trying:

if { [ is-avail $cmplr_root/linux/lib/oclfpga/modulefiles/oclfpga ] } {


   module load $cmplr_root/linux/lib/oclfpga/modulefiles/oclfpga

}


where you want to replace is-avail , i have a found a similar functionality in one of OneAPI files where they have used file exists instead of is-avail:


if { [file exists $modulefileroot/init_opencl] } {

  module load $modulefileroot/init_opencl

 }


You can try this and see if it works for you. Let us know if you face any issues


Regards

Prasanth


0 Kudos
dodo
Novice
1,717 Views

Ah, by the way, I figured out default environment-modules of centos 7 is 3.2.10 which does not support `is-avail`. Since `is-avail` is supported from environment-modules  4.1.0 and above, I hope oneapi tutorial will clarify this point in future.

PrasanthD_intel
Moderator
1,749 Views

Hi Lee,

 

We haven't heard back from you.

Is the given alternative working for you? Let us know if you need any help

 

Regards

Prasanth

0 Kudos
dodo
Novice
1,721 Views

I have tested today, and it works! thank you.

0 Kudos
PrasanthD_intel
Moderator
1,687 Views

Hi Lee,


Thanks for the confirmation.

I would pass your suggestion to the internal team.

As this issue has been resolved, we will no longer respond to this thread. If you require additional assistance from Intel, please start a new thread. Any further interaction in this thread will be considered community only.


Regards

Prasanth


0 Kudos
Reply