1

I am working on a research project that requires me to utilize data from NASA's Fermi Large Area Telescope. NASA provides users with a package of tools to manipulate and utilize the data they'd be encountering but is accompanied with a poor installation guide.

I have installed these tools(modules) successfully but for some reason they seem to work within one terminal only. If I were to open another terminal and tried to use a module, example: gtselect, it would not recognize the command while the other terminal I originally installed the package on would.

Also whenever I close the terminal such as shutting down my computer for the evening the next day I must reinstall the software. (There is no hard-drive protection software on this PC that may be restoring the HDD to a previous state)

That all being said I decided to write a bash shell script to do the install for me each time I need to in order to remove the hassle of typing long path names over and over again. For some reason, however, the bash script does not work and the tools I try to use remain unrecognised.

Here are the commands that, if I enter manually one at a time in this order, install both packages correctly for me to utilize:

cd /home/dwoodson/FermiScienceTools/ScienceTools/Ubuntu/BUILD_DIR
./configure
export FERMI_DIR=/home/dwoodson/FermiScienceTools/ScienceTools/Ubuntu
source $FERMI_DIR/fermi-init.sh
cd /home/dwoodson/HEASoft/heasoft-6.16/x86_64-unknown-linux-gnu-libc2.5/BUILD_DIR
./configure
export HEADAS=/home/dwoodson/HEASoft/heasoft-6.16/x86_64-unknown-linux-gnu-libc2.5
source $HEADAS/headas-init.sh

These lines were given to me specifically from the NASA installation guide. I did not devise these on my own.

I put these lines exactly into a bash shell script:

#!/bin/bash
cd /home/dwoodson/FermiScienceTools/ScienceTools/Ubuntu/BUILD_DIR
./configure
export FERMI_DIR=/home/dwoodson/FermiScienceTools/ScienceTools/Ubuntu
source $FERMI_DIR/fermi-init.sh
cd /home/dwoodson/HEASoft/heasoft-6.16/x86_64-unknown-linux-gnu-libc2.5/BUILD_DIR
./configure
export HEADAS=/home/dwoodson/HEASoft/heasoft-6.16/x86_64-unknown-linux-gnu-libc2.5
source $HEADAS/headas-init.sh

One installs correctly, the other does not. Please let me know if anyone can be of assistance.

Thank you

5
  • As far as another terminal goes, my guess is that it's because of the export statements. If I'm not mistaken they exist for duration of the session in one terminal only. Try placing those FERMI_DIR=... and HEADAS=... lines into your .bashrc or whatever config file for the shell you are using. Jun 9, 2015 at 19:36
  • "One installs correctly, the other does not" doesn't give us much to go on: what part of the second installation fails, exactly? Jun 9, 2015 at 19:53
  • steeldriver - Everything about the second installation fails. No modules from the tool set are accessible or even recognized by the terminal. Jun 9, 2015 at 20:00
  • Serg - I have each of those statements in my bash file already, perhaps I can try removing export? Jun 9, 2015 at 20:01
  • Reviewers: This isn't no-repro. This is correctly self-answered. People produce this problem all the time. Furthermore, there was actually enough information in here that someone else could have given that answer even without requesting information. Aside from there only being a very small number of explanations for the described behavior, when someone doesn't say they're sourcing a script and they have a hashbang line in it, that means either (a) they intend that the script be run, not sourced, or (b) they haven't turned their attention to the distinction between running and sourcing it. Dec 10, 2017 at 7:17

1 Answer 1

1

Turns out there is a simple solution, the kind worthy of face palms. I was trying to run the command:

bash LoadTools.sh 

Where LoadToals is the name of my script. This was causing all the changes that were being made to remain in the child shell and was leaving the parent shell unaffected, meaning all changes made by the configure files were neither permanent or even made to the parent shell.

Used the command: source LoadTools.sh instead and it worked perfectly.

1
  • Used the command: source LoadTools.sh instead and it worked perfectly. Jun 9, 2015 at 20:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .