# Compiling and running FreeFem on a HPC

**URL:** <https://community.freefem.org/t/compiling-and-running-freefem-on-a-hpc/2014>\
**Category:** FreeFEM installation\
**Created:** [September 19, 2022, 1:47pm UTC](https://community.freefem.org/t/compiling-and-running-freefem-on-a-hpc/2014 "2022-09-19T13:47:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aszaboa](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/aszaboa/32/2918_2.png) [@aszaboa](https://community.freefem.org/u/aszaboa)\
**Post date:** [September 19, 2022, 1:47pm UTC](https://community.freefem.org/t/compiling-and-running-freefem-on-a-hpc/2014/1 "2022-09-19T13:47:00Z")

</div>

Dear FreeFem users,

I am trying to use FreeFem on a HPC cluster. The compilation with PETSc/SLEPc seems to be successful - FreeFem examples seem to work on a login node. However, when I try to run FreeFem using the scheduler SLURM, neither `ff-mpirun`, nor FreeFem alone (with, e.g., a simple array.edp example, without PETSc/SLEPc or paralellism) works - I get the following error:

```auto
/home/mvgopkm/FreeFem/FreeFem-sources/src/mpi/FreeFem++-mpi: error while loading shared libraries: libblas.so.3: cannot open shared object file: No such file or directory

```

So you have any idea how to circumvent this error? I am attaching a script with the compilation commands, the PETSc and FreeFem config.log files, and also the Slurm script. Any help is appreciated.  
[configure\_petsc\_complex.log](https://community.freefem.org/uploads/short-url/7o3qrR0kCJ2uZ0FeHwz9FwkVVT6.log) (1.1 MB)  
[configure\_petsc\_real.log](https://community.freefem.org/uploads/short-url/rx3hRw8mcJQHy96AtVSsspBb0eR.log) (6.3 MB)  
[ffCompilation.log](https://community.freefem.org/uploads/short-url/ApMt6CT5zO5hjtifttdYMeVnva1.log) (5.5 KB)  
[config\_freefem.log](https://community.freefem.org/uploads/short-url/erHbsRxhRk9o7jNLc6xFBMRKbaS.log) (366.6 KB)

---

<div class="post-metadata">

**Author:** ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)\
**Post date:** [September 19, 2022, 2:14pm UTC](https://community.freefem.org/t/compiling-and-running-freefem-on-a-hpc/2014/2 "2022-09-19T14:14:07Z")

</div>

You need to add the path to your `libblas.so` in your `LD_LIBRARY_PATH`.

---

<div class="post-metadata">

**Author:** ![aszaboa](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/aszaboa/32/2918_2.png) [@aszaboa](https://community.freefem.org/u/aszaboa)\
**Post date:** [September 20, 2022, 1:19pm UTC](https://community.freefem.org/t/compiling-and-running-freefem-on-a-hpc/2014/3 "2022-09-20T13:19:11Z")

</div>

Thanks, this indeed solved the problem!
