FreeFem++

Software Category
Version
4.7

FreeFem++

FreeFem++ is a powerful software package for solving partial differential equations using finite element methods. It comes equipped with its own scripting language as well as some visualization tools.

Using FreeFem++ on RCC Resources

FreeFem++ can be run in either serial or parallel, but different executable files are used. Additionally, FreeFem++ can be used interactively or via job submission.

If you want to use the software interactively, you must first tunnel X in your ssh command by using the -Y flag. For example, to log into Spear, use the format:

$ ssh -Y [username]@spear-login.hpc.fsu.edu

Replace [username] with your username. Tunneling X is required since the solution for the following examples will require a window or two to be displayed.

FreeFem++  also requires the gnu module to be loaded. Type the command:

$ module load gnu

If you want to use FreeFem++ in parallel, you will also need to load a parallel module, such as gnu openmpi or gnu mvapich2.

Note that only two official example files are available on the HPC, located in the /gpfs/research/software/userfiles/freefem/ directory.  Other official examples are available in the source code download, located here.

Below are two simple examples of running FreeFem++, one in serial and one in parallel.

Running FreeFem++ in Serial

Use the executable FreeFem++ to run your program. Below is an example with the file  aaa-adp.edp :

$ FreeFem++ /gpfs/research/software/userfiles/freefem/aaa-adp.edp 

Successful execution should display two pop-up windows.

Running FreeFem++ in Parallel

For this example, first load the GNU Open MPI compiler:

$ module load gnu openmpi

The executable FreeFem++-mpi will become available upon loading the gnu module.

Run FreeFem++ in parallel using the format:

$ srun -np PROCESSORS FreeFem++-mpi FILE 

Replace PROCESSORS with the number of cores required and FILE with the name of your file. The following example uses 2 cores and the file schwarz-c.edp :

$ srun -np 2 FreeFem++-mpi /gpfs/research/software/userfiles/freefem/schwarz-c.edp 

Successful execution should display a pop-up window. To suppress the pop-up window, type -np at the end of the command.

To submit your parallel program as a job on the HPC, include the above command inside of a Slurm submission script. An introductory guide to submitting a job on the HPC can be found here.

For more information about FreeFem++, please refer to the official documentation.