in reply to Re^3: How can I convert my script for submitting SLURM jobs from Bash to Perl?
in thread How can I convert my script for submitting SLURM jobs from Bash to Perl?

I run the following code:
#!/usr/bin/perl #SBATCH -A 1234 #SBATCH -t 2-00:00 #SBATCH -n 24 use warnings; use strict; system("module add gaussian"); system("srun resp.com")
It gave this error: Can't exec "gaussian": No such file or directory at...
  • Comment on Re^4: How can I convert my script for submitting SLURM jobs from Bash to Perl?
  • Download Code

Replies are listed 'Best First'.
Re^5: How can I convert my script for submitting SLURM jobs from Bash to Perl?
by Anonymous Monk on Feb 18, 2015 at 23:28 UTC
    It gave this error: Can't exec "gaussian": No such file or directory at...

    Please give exact error messages, you've cut off the most important part: where the error occurs! That's the code you need to be debugging, and that's the code we need to see to be able to help you with it. Again, How do I post a question effectively?

    AFAIK the module command typically modifies the environment, which isn't shared between system calls. Try system("module add gaussian && srun resp.com");.