...
Install Required Perl Module
These steps will create a interactive session and install the XML::LibXML package into a local directory for Perl 5.28.1. One might notice we have two extra steps where we create a directory and create a symbolic link to where perl5 will typically place libraries. The reason for this, is due to how the home file system on Mana acts and will work around these oddities. All that we are doing is utilize a different mount that points to your home directory, but access your home space in a slightly different manner.
Code Block | ||||
---|---|---|---|---|
| ||||
[user@login001 ~]$ srun -p sandbox --mem=6G -c 2 -t 60 --pty /bin/bash
[user@node-0005 ~]$ module load lang/Perl/5.28.1-GCCcore-6.3.0
[user@node-0005 ~]$ mkdir .perl5
[user@node-0005 ~]$ ln -s /mnt/home/noac/${USER}/.perl5 perl5
[user@node-0005 ~]$ cpan install XML::LibXML
|
...
install XML::LibXML
|
Add Personal Perl Library Paths to .bash_profile
These steps above are needed once you have installed the XML::LibXML for perl 5. As we are depending on a local library, the above steps will make it so that perl knows where to look for your local libraries. We add it to the .bash_profile so these variables are added to your environment on connecting to Mana. If you did not want to have this added to your environment every time, these variables could potentially be added to the job submission script itself, prior to utilize perl.
Code Block | ||||
---|---|---|---|---|
| ||||
#!/bin/bash echo -e "\nPATH=\"${HOME}/perl5/bin/"\${PATH:+:\${PATH}}"\"" >> ~/.bash_profile echo -e "\nPERL5LIB=\"${HOME}/perl5/lib/perl5"\${PERL5LIB:+:\${PERL5LIB}}"\"" >> ~/.bash_profile echo -e "\nPERL_LOCAL_LIB_ROOT=\"${HOME}/perl5"\${PERL_LOCAL_LIB_ROOT:+:\${PERL_LOCAL_LIB_ROOT}}"\"" >> ~/.bash_profile echo -e "\nPERL_MB_OPT=\"--install_base \"${HOME}/perl5\"\"" >> ~/.bash_profile echo -e "\nPERL_MM_OPT=\"INSTALL_BASE=${HOME}/perl5\"" >> ~/.bash_profile echo -e "\n" >> ~/.bash_profile echo -e 'export\nexport ${PATH}' >> ~/.bash_profile echo -e 'export\nexport ${PERL5LIB}' >> ~/.bash_profile echo -e 'export\nexport ${PERL_LOCAL_LIB_ROOT}' >> ~/.bash_profile echo -e 'export\nexport ${PERL_MB_OPT}' >> ~/.bash_profile echo -e 'export\nexport ${PERL_MM_OPT}' >> ~/.bash_profile |
...