Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Can't find a module that is installed

by Weebo (Novice)
on Feb 16, 2017 at 18:24 UTC ( [id://1182155]=perlquestion: print w/replies, xml ) Need Help??

Weebo has asked for the wisdom of the Perl Monks concerning the following question:

Forks.pm is giving me problems with MAKER again, you'd think I would become a Perl coder instead of jsut a Perl user by now...

I tried running MAKER on a new cluster I installed it on and got the following response for every MPI process I created

Can't locate forks.pm in @INC (you may need to install the forks modul +e) (@INC contains: /Data/Apps/maker/bin/../perl/lib /Data/Apps/maker/ +bin/../lib /Data/Apps/maker/bin/../src/inc/perl/lib /Data/Apps/CEGMA_ +v2.5/lib /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/l +ocal/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/shar +e/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr +/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .) at /Data/ +Apps/maker/bin/maker line 42.

So I went looking

locate forks.pm /home/seth/.cpan/build/forks-0.36-0/blib/lib/forks.pm /home/seth/.cpan/build/forks-0.36-0/lib/forks.pm /usr/local/lib/x86_64-linux-gnu/perl/5.22.1/forks.pm
Now, I might be crazy, but /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 seems to be in both. Why can't it find forks.pm?

Replies are listed 'Best First'.
Re: Can't find a module that is installed
by stevieb (Canon) on Feb 16, 2017 at 18:52 UTC

    Everything appears to be sane (less the mention of Forks.pm as opposed to forks.pm in the opening sentence, but that appears to be a simple typo). Can you post the output of perl -v?

    Also, does it still break if you do:

    cp /usr/local/lib/x86_64-linux-gnu/perl/5.22.1/forks.pm . perl -E 'BEGIN{unshift @INC, ".";} use forks'
      Typing habits, I capitalize the first letter, so that should be forks.pm in the first line as well
      $ perl -v This is perl 5, version 22, subversion 1 (v5.22.1) built for x86_64-li +nux-gnu-thread-multi (with 58 registered patches, see perl -V for more detail) Copyright 1987-2015, Larry Wall Perl may be copied only under the terms of either the Artistic License + or the GNU General Public License, which may be found in the Perl 5 source ki +t. Complete documentation for Perl, including FAQ lists, should be found +on this system using "man perl" or "perldoc perl". If you have access to + the Internet, point your browser at http://www.perl.org/, the Perl Home Pa +ge.
      I may be doing this part wrong;
      $ cp /usr/local/lib/x86_64-linux-gnu/perl/5.22.1/forks . cp: omitting directory '/usr/local/lib/x86_64-linux-gnu/perl/5.22.1/fo +rks' $ perl -E 'BEGIN[unshift @INC, ".";} use forks' Illegal declaration of subroutine BEGIN at -e line 1.
      but the command for MAKER is mpiexec -machinefile /Data/machinefile -n 4 maker maker_exe.ctl maker_opts.ctl maker_bopts.ctl It doesn't explicitly call Perl
        I may be doing this part wrong;
        $ cp /usr/local/lib/x86_64-linux-gnu/perl/5.22.1/forks .

        You did. The command should be:

        cp /usr/local/lib/x86_64-linux-gnu/perl/5.22.1/forks.pm .
      perl -E 'BEGIN{unshift @INC, ".";} use forks' #gross #better perl -I. -e'use forks'

        I wasn't sure if -I put the new directory at the beginning of @INC or appended it and was a bit pressed for time to go look at that moment ;)

        After a quick look at perlrun, it indeed does prepend.

Re: Can't find a module that is installed
by Weebo (Novice) on Feb 21, 2017 at 22:05 UTC
    So I found the mistake.

    Maker is an MPI application, so I have a designated machinefile, well in this file the first entry was not the main node of the cluster. As such, locate was looking on node-1, while maker was looking on node-4.

    Checking node-4, it turns out forks was not installed. CPAN fixed that and now everything is working.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1182155]
Approved by stevieb
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-03-29 15:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found