FireDynamics / fdsreader

Python reader for FDS data
GNU General Public License v3.0
44 stars 18 forks source link

how to install fdsreader on linux cluster #74

Closed AlanZandie closed 5 months ago

AlanZandie commented 5 months ago

Good day,

I have been engaged with writing a code to optimise FDS simulations, but I need fdsreader to analyse the FDS results. The system I'm using in University of Birmingham, is a linux cluster, I want to clone or install fdsreader on it, but couldnt find a way. Could you please help me with this? thank you

JanVogelsang commented 5 months ago

The fdsreader is conform to standards, which makes it easy to install is in several ways. The most convenient way would be to just run pip install fdsreader in your own virtual environment or run pip install --user fdsreader to install it using the global interpreter, but in your local home-directory.
You can also clone the repository git clone https://github.com/FireDynamics/fdsreader.git and run pip install ./fdsreader. This is equivalent to running pip install git+https://github.com/FireDynamics/fdsreader.git.
The fdsreader was tested on both Windows and Linux-based operating systems and works equally well in both scenarios! Please tell me if I was able to help you already or if there are limitations on your cluster which cause the above solutions to not work in your case.

AlanZandie commented 5 months ago

thank you for your swift reply, I believe I installed it on our HPC, but upon recalling in my python code, it still gives the error that it can't find fdsreader. I have attached a draft of the code. Python code.txt


the output file gives me this: GCCcore/12.2.0 zlib/1.2.12-GCCcore-12.2.0 binutils/2.39-GCCcore-12.2.0 GCC/12.2.0 numactl/2.0.16-GCCcore-12.2.0 XZ/5.2.7-GCCcore-12.2.0 libxml2/2.10.3-GCCcore-12.2.0 libpciaccess/0.17-GCCcore-12.2.0 hwloc/2.8.0-GCCcore-12.2.0 OpenSSL/1.1 libevent/2.1.12-GCCcore-12.2.0 UCX/1.13.1-GCCcore-12.2.0 libfabric/1.16.1-GCCcore-12.2.0 PMIx/4.2.2-GCCcore-12.2.0 UCC/1.1.0-GCCcore-12.2.0 OpenMPI/4.1.4-GCC-12.2.0 OpenBLAS/0.3.21-GCC-12.2.0 FlexiBLAS/3.2.1-GCC-12.2.0 FFTW/3.3.10-GCC-12.2.0 gompi/2022b FFTW.MPI/3.3.10-gompi-2022b ScaLAPACK/2.2.0-gompi-2022b-fb foss/2022b bzip2/1.0.8-GCCcore-12.2.0 ncurses/6.3-GCCcore-12.2.0 libreadline/8.2-GCCcore-12.2.0 ncurses/6.3-GCCcore-12.2.0 Tcl/8.6.12-GCCcore-12.2.0 SQLite/3.39.4-GCCcore-12.2.0 GMP/6.2.1-GCCcore-12.2.0 libffi/3.4.4-GCCcore-12.2.0 Python/3.10.8-GCCcore-12.2.0 gfbf/2022b pybind11/2.10.3-GCCcore-12.2.0 SciPy-bundle/2023.02-gfbf-2022b libpng/1.6.38-GCCcore-12.2.0 Brotli/1.0.9-GCCcore-12.2.0 freetype/2.12.1-GCCcore-12.2.0 expat/2.4.9-GCCcore-12.2.0 util-linux/2.38.1-GCCcore-12.2.0 fontconfig/2.14.1-GCCcore-12.2.0 xorg-macros/1.19.3-GCCcore-12.2.0 X11/20221110-GCCcore-12.2.0 Tk/8.6.12-GCCcore-12.2.0 Tkinter/3.10.8-GCCcore-12.2.0 NASM/2.15.05-GCCcore-12.2.0 libjpeg-turbo/2.1.4-GCCcore-12.2.0 jbigkit/2.1-GCCcore-12.2.0 gzip/1.12-GCCcore-12.2.0 lz4/1.9.4-GCCcore-12.2.0 zstd/1.5.2-GCCcore-12.2.0 libdeflate/1.15-GCCcore-12.2.0 LibTIFF/4.4.0-GCCcore-12.2.0 Pillow/9.4.0-GCCcore-12.2.0 Qhull/2020.2-GCCcore-12.2.0 matplotlib/3.7.0-gfbf-2022b cma/3.3.0-foss-2022b plotly.py/5.13.1-GCCcore-12.2.0 tqdm/4.64.1-GCCcore-12.2.0 coexist/0.3.2-foss-2022b Traceback (most recent call last): File "/rds/projects/j/jangim-fire-smoke-safety/allen/runCases/ACCES/access_seed42/access_script.py", line 50, in import fdsreader ModuleNotFoundError: No module named 'fdsreader'


AlanZandie commented 5 months ago

Also, I checked installing it again, but it seems it is already installed as I get:

Requirement already satisfied: fdsreader in /rds/homes/z/zandiem/.local/lib/python3.6/site-packages Requirement already satisfied: incremental in /rds/homes/z/zandiem/.local/lib/python3.6/site-packages (from fdsreader) Requirement already satisfied: numpy in /rds/homes/z/zandiem/.local/lib/python3.6/site-packages (from fdsreader) Requirement already satisfied: typing_extensions in /rds/homes/z/zandiem/.local/lib/python3.6/site-packages (from fdsreader)

JanVogelsang commented 5 months ago

I'm afraid I can't help you with this issue, you might want to contact your system administrator instead. If you installed the fdsreader, your python interpreter should find it.
How do you invoke the script? Do you just run python access_script.py? The python interpreter doesn't seem to look in the site-packages directory you listed (/rds/homes/z/zandiem/.local/lib/python3.6/site-packages).

AlanZandie commented 5 months ago

Thank you for your comments, I believe I took care of, the issue was that there were two versions of Python installed on our cluster, and it was searching through wrong module library. Also, given that I was not allowed to make changes on the cluster, I had to make my own repository and specify it using PATH, I did the same for PYTHONPATH, to look into the directory I saved my modules in, particularly fdsreader. Thank you,