Hi Karim,
thanks a lot for getting back to me on this! As you said, it is a fragile solution to the problem and will likely break at some point when NERSC performs some major maintenance.
In the meantime, I thought I would post an alternative solution (credits go to Martina Gerbino) which worked for me on Cori:
-First of all, unload Intel 2019 and replace it with Intel 2018, and similarly unload Python 2 and replace it with Python 3. In practice what I do is to define the following alias in my .bashrc.ext:
Code: Select all
alias forplc3='module unload intel ; module load intel/18.0.3.222 ; module unload python ; module load python/3.7-anaconda-2019.07'
and after sourcing the .bashrc.ext I run forplc3
-next, inside plc-3.01/ I make the following changes. Modify waf_tools/try_icc.py by going to the function do_icc(ctx) and replacing
Code: Select all
for pth in list(rL) + ["/lib","/lib64"]:
ctx.env.append_value("LIBPATH",pth)
ctx.env.append_value("RPATH",pth)
with
Code: Select all
for pth in list(rL) + ["/lib","/lib64"]:
ctx.env.append_value("LIBPATH_cc_runtime",pth)
ctx.env.append_value("RPATH_cc_runtime",pth)
ctx.env.append_value("LIB_cc_runtime",list(rl)+["pthread"])
Similarly, modify waf_tools/try_ifort.py by going to the function ifort_conf(ctx) and replacing
Code: Select all
L = set([ll.strip() for ll in re.findall("^\s+-L(.+)\s*\\\\", re.split("^\s*ld\s*\\\\",llge,flags=re.M)[1],flags=re.M) if ("ifort" in ll.lower()) or ("intel" in ll.lower())])
l = set([ll.strip() for ll in re.findall("^\s+-l(.+)\s*\\\\", re.split("^\s*ld\s*\\\\",llge,flags=re.M)[1],flags=re.M)])
with
Code: Select all
L = set([ll.strip() for ll in re.findall("-L(.+)\s*\\\\", llge.split("ld ")[1]) if ("ifort" in ll.lower()) or ("intel" in ll.lower())])
l = set([ll.strip() for ll in re.findall("-l(.+)\s*\\\\", llge.split("ld ")[1])])
-then I compile as usual, i.e.
Code: Select all
./waf distclean
./waf configure --install_all_deps --ifort --icc --lapack_mkl=$MKLROOT
./waf install
This worked for me, although of course it relies on reloading Intel 2018, and I have the suspicion that during one of the major maintenances at NERSC in 2020, Intel 2018 will be completely removed (usually they only keep the Intel version from the current and previous year). So this solution is also quite short-term and ideally someone would come up with something better and more longer-lasting...
Cheers,
Sunny