# Freefem 4.5 installation on Linux-based cluster (not a sudoer)

**URL:** https://community.freefem.org/t/freefem-4-5-installation-on-linux-based-cluster-not-a-sudoer/1723
**Category:** FreeFEM installation
**Created:** [May 6, 2022, 3:37pm UTC](https://community.freefem.org/t/freefem-4-5-installation-on-linux-based-cluster-not-a-sudoer/1723 "2022-05-06T15:37:49Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Flavio](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/flavio/32/1178_2.png) [@Flavio](https://community.freefem.org/u/Flavio)
#### Post date: [May 6, 2022, 3:37pm UTC](https://community.freefem.org/t/freefem-4-5-installation-on-linux-based-cluster-not-a-sudoer/1723/1 "2022-05-06T15:37:49Z")

</div>

Hello all,

I would like to install and compile the Freefem 4.5 version on a cluster, while (as typically is) not being a _sudoer_. If I naively follow the installation and compilation guide for Ubuntu ([Installation guide](https://doc.freefem.org/introduction/installation.html)) I stumble upon sudo commands for which I have no permission in the cluster environment.

An example is:

```auto
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install cpp freeglut3-dev g++ gcc gfortran \
     m4 make patch pkg-config wget python unzip \
     liblapack-dev libhdf5-dev libgsl-dev \
     autoconf automake autotools-dev bison flex gdb git cmake
 
# mpich is required for the FreeFEM parallel computing version
sudo apt-get install mpich

```

Now, is there an alternative way to skip the above mentioned step and still ensure that the necessary packages are installed locally in my user account within the cluster system?

Any help would be very appreciated.  
Thanks.

---

<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: [May 6, 2022, 3:55pm UTC](https://community.freefem.org/t/freefem-4-5-installation-on-linux-based-cluster-not-a-sudoer/1723/2 "2022-05-06T15:55:19Z")

</div>

These instructions are out-dated, and so is FreeFEM 4.5  
Simply use the instructions from [GitHub - FreeFem/FreeFem-sources: FreeFEM source code](https://github.com/FreeFem/FreeFem-sources#freefem), with the `--prefix` option, and `make petsc-slepc` step. It will fetch and install everything you need.

---

<div class="post-metadata">

### Author: ![Flavio](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/flavio/32/1178_2.png) [@Flavio](https://community.freefem.org/u/Flavio)
#### Post date: [May 6, 2022, 5:46pm UTC](https://community.freefem.org/t/freefem-4-5-installation-on-linux-based-cluster-not-a-sudoer/1723/3 "2022-05-06T17:46:40Z")

</div>

Dear prj,

thank you for your reply. Your advice led me to some progress and I appreciate that, but the compilation of PETSc failed. The error message is attached, however not very helpful.  
 ![error](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/2X/b/ba01737cde03e7cb5bdfe22a3f2f0e8c6786124e.png)

The step from [GitHub - FreeFem/FreeFem-sources: FreeFEM source code](https://github.com/FreeFem/FreeFem-sources#freefem) that led to failure was:

```auto
make petsc-slepc

```

---

<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: [May 6, 2022, 5:48pm UTC](https://community.freefem.org/t/freefem-4-5-installation-on-linux-based-cluster-not-a-sudoer/1723/4 "2022-05-06T17:48:32Z")

</div>

Please send `3rdparty/ff-petsc/petsc-3.XY.Z/fr/lib/petsc/conf/make.log` and `3rdparty/ff-petsc/petsc-3.XY.Z/fr/lib/petsc/conf/configure.log` (you’ll need to adapt `3.XY.Z`).

---

<div class="post-metadata">

### Author: ![Flavio](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/flavio/32/1178_2.png) [@Flavio](https://community.freefem.org/u/Flavio)
#### Post date: [May 6, 2022, 10:58pm UTC](https://community.freefem.org/t/freefem-4-5-installation-on-linux-based-cluster-not-a-sudoer/1723/5 "2022-05-06T22:58:51Z")

</div>

The path you said reads as below in my case:

```auto
3rdparty/ff-petsc/petsc-3.17.0/fr/lib/petsc/conf

```

In this folder I indeed find the files you have mentioned, but because I am a new user, I am not able to send attachments as it seems from the message I get when trying to load attachments here.  
Alternatively, you can access the .log files requested from this link: [WeTransfer - Send Large Files & Share Photos Online - Up to 2GB Free](https://we.tl/t-iORcy9r3cn)

Thank you

---

<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: [May 7, 2022, 6:09am UTC](https://community.freefem.org/t/freefem-4-5-installation-on-linux-based-cluster-not-a-sudoer/1723/6 "2022-05-07T06:09:24Z")

</div>

I believe this is the same problem as in [Install FreeFem on cluster](https://community.freefem.org/t/install-freefem-on-cluster/1645). Please edit `3rdparty/ff-petsc/Makefile` and add the flag `--with-make_np=10` to the `COMMON_FLAGS` variable.

---

<div class="post-metadata">

### Author: ![Flavio](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/flavio/32/1178_2.png) [@Flavio](https://community.freefem.org/u/Flavio)
#### Post date: [May 7, 2022, 12:18pm UTC](https://community.freefem.org/t/freefem-4-5-installation-on-linux-based-cluster-not-a-sudoer/1723/7 "2022-05-07T12:18:26Z")

</div>

I have edited the `3rdparty/ff-petsc/Makefile` adding the flag `--with-make-np=10` to the `COMMON_FLAGS` variable. You can see it appearing at line 60 of the `Makefile` downloadable from here:

> **[Makefile.txt and 1 more file](https://wetransfer.com/downloads/c22d1275ddd6430305d2be5b2268650f20220507121303/2207ec)**
>
> 2 files sent via WeTransfer, the simplest way to send your files around the world

I also attach to the same link the screen messages resulting from the operation `make petsc-slepc`.  
The error seems to be the same as before.

I might have misinterpreted the location of the `--with-make-np=10` option in the `Makefile`. Please advise if that is the case.

Thank you for your continued support on this issue.

---

<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: [May 7, 2022, 3:18pm UTC](https://community.freefem.org/t/freefem-4-5-installation-on-linux-based-cluster-not-a-sudoer/1723/8 "2022-05-07T15:18:59Z")

</div>

Are you compiling on a login node or on a compute node?  
Could you please try the following?

```auto
$ cd /rds/general/user/fs2317/home/local/FreeFem-sources/3rdparty/ff-petsc/petsc-3.17.0/
$ make PETSC_ARCH=fr PETSC_DIR=/rds/general/user/fs2317/home/local/FreeFem-sources/3rdparty/ff-petsc/petsc-3.17.0 MAKE_NP=1 MAKE_LOAD=1

```

---

<div class="post-metadata">

### Author: ![Flavio](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/flavio/32/1178_2.png) [@Flavio](https://community.freefem.org/u/Flavio)
#### Post date: [May 9, 2022, 9:59am UTC](https://community.freefem.org/t/freefem-4-5-installation-on-linux-based-cluster-not-a-sudoer/1723/9 "2022-05-09T09:59:48Z")

</div>

Hi @prj,

I am using a login node to compile the PETSc library as well as the other software packages.

The 2 command lines suggested lead to the same error, as seen from the attached .log file.  
[make.log](https://community.freefem.org/uploads/short-url/kptwc2l9c4hJ1CwbsKpwHr3wN1W.log) (14.1 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: [May 9, 2022, 12:51pm UTC](https://community.freefem.org/t/freefem-4-5-installation-on-linux-based-cluster-not-a-sudoer/1723/10 "2022-05-09T12:51:43Z")

</div>

Could you please try to compile on a compute node instead?
