Dev Environments
/usr/share/FIDASIM
and the default bash environment is configured in the following way:function fprod() {
export FIDASIM_DIR=/usr/share/FIDASIM
export FC=gfortran #use 'ifort' for Intel Fortran compiler or 'gfortran' for GNU fortran or 'flang' for aocc compiler
export CC=gcc #use 'icc' for Intel C compiler or 'gcc' for GNU cc or 'clang' for aocc compiler
export CXX=g++ #use 'icpc' for Intel C++ compiler or 'g++' for GNU ++ or 'clang++' for aocc compiler
#For using helper routines
export PATH=$FIDASIM_DIR/deps/hdf5/bin:$FIDASIM_DIR/lib/scripts:$PATH
export PATH=$FIDASIM_DIR/deps/efit:$FIDASIM_DIR/test:$PATH
export IDL_PATH="+$FIDASIM_DIR:$IDL_PATH:<IDL_DEFAULT>"
export PYTHONPATH=/usr/bin/python3.12:/usr/share/FIDASIM/lib/python
ulimit -s unlimited #Omit this if you like segfaults
}
Logging into dawson with a default environment allows the user to immediately run FIDASIM in interactive mode (we recommend opening tmux so you can do other work while FIDASIM runs)
If you want to do your own development on FIDASIM, you should pull down your own copy from github. In this case, install it into your home directory and switch development environments.
function fdev() {
export FIDASIM_DIR=$HOME/FIDASIM
export FC=gfortran #use 'ifort' for Intel Fortran compiler or 'gfortran' for GNU fortran or 'flang' for aocc compiler
export CC=gcc #use 'icc' for Intel C compiler or 'gcc' for GNU cc or 'clang' for aocc compiler
export CXX=g++ #use 'icpc' for Intel C++ compiler or 'g++' for GNU ++ or 'clang++' for aocc compiler
#For using helper routines
export PATH=$FIDASIM_DIR/deps/hdf5/bin:$FIDASIM_DIR/lib/scripts:$PATH
export PATH=$FIDASIM_DIR/deps/efit:$FIDASIM_DIR/test:$PATH
export IDL_PATH="+$FIDASIM_DIR:$IDL_PATH:<IDL_DEFAULT>"
export PYTHONPATH=/usr/bin/python3.12:/usr/share/FIDASIM/lib/python
ulimit -s unlimited #Omit this if you like segfaults
}
The big difference here is that the FIDASIM directory is now set to your home dir instead of /usr/share/
You can easily switch between these two environments by simply typing fdev
and fprod
in a bash shell. Remember that on login fprod
is selected by default unless you modify your .bashrc
file (note that you'll need to make sure which shell tmux is loading if you use tmux!).
If you need another environment, please let an administrator know.
Additionally, if you wish to switch compilers, you will need to tell the system that's what you want for your shell session. For the intel ifort compiler:
source /opt/intel/oneapi/setvars.sh
And for the AMD compiler:
source /opt/AMD/aocc-compiler-<version>/setenv_AOCC.sh
The default shell uses the gnu variety, rather than the Intel or AMD ones.
Python Environments
There is also an up-to-date python3 environment on Dawson.
The python3
command must stay pointed at python3.12 for the gnomeshell to continue functioning normally, so using a different instance of python requires a virtual environment. To create that, navigate to your home directory, create the virtual environment and then enter it.
cd
python3.12 -m venv env
source env/bin/activate
FIDASIM points to the system default version of python in all environments.