Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question
1

bash script and usr/bin folder debugging

asked 2015-12-10 11:03:26 -0600

Alex Vlachokostas's avatar

Hi everyone! Based on your replies of my past Unmet Hours posting (named "script for multiple simulations" link text) I wrote the following bash script that used to run with no problems on a MAC:

#!/bin/bash
END=100
while (($END >= 10)) 
do
    for i in $(seq 10 1 $END)
        do
            runenergyplus NYC_East_FL_500_${i}_${END}.idf NYC_${i}_${END}.epw
        done
END=$((END-1))
done

However, now that I tried to re-run the script the following problems appear: (a) ./coupling.sh: line 7: runenergyplus: command not found and (b) if I specify the path of runenergyplus (i.e., /Applications/EnergyPlus-8-2-0/runenergyplus), I get the following error: /Applications/EnergyPlus-8-2-0/runenergyplus: line 427: /usr/bin/ExpandObjects: No such file or directory

ln: ./Energy+.idd: File exists /Applications/EnergyPlus-8-2-0/runenergyplus: line 485: /usr/bin/EnergyPlus: No such file or directory

File 'eplusout.end' does not exist. /Applications/EnergyPlus-8-2-0/runenergyplus: line 534: /usr/bin/ReadVarsESO: No such file or directory /Applications/EnergyPlus-8-2-0/runenergyplus: line 535: /usr/bin/ReadVarsESO: No such file or directory

Any tips? FYI: Someone asked a similar question on github as well and there is no answer yet. link text

Thank you in advance!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-12-10 19:20:03 -0600

Alex Vlachokostas's avatar

updated 2016-01-11 06:39:45 -0600

At the end it worked! I followed these steps:

1) type at the MAC terminal: touch ~/.bash_profile; open ~/.bash_profile

2) add the following line at the bash profile text file that opens up:

export=ENERGYPLUS_DIR=/Applications/EnergyPlus-8-2-0/

3)

#!/bin/bash
END=100
while (($END >= 10)) 
do
    for i in $(seq 10 1 $END)
        do
            /path_to/runenergyplus /path_to/NYC_East_FL_500_${i}_${END}.idf /path_to/NYC_${i}_${END}.epw
        done
END=$((END-1))
done

4) Enjoy!

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Training Workshops

Careers

Question Tools

1 follower

Stats

Asked: 2015-12-10 11:03:26 -0600

Seen: 456 times

Last updated: Jan 11 '16