# Error with SaveVec and LoadVec

**URL:** https://community.freefem.org/t/error-with-savevec-and-loadvec/3804
**Category:** FreeFEM installation
**Created:** [March 14, 2025, 12:33pm UTC](https://community.freefem.org/t/error-with-savevec-and-loadvec/3804 "2025-03-14T12:33:55Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![AlexMcSD](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/alexmcsd/32/3006_2.png) [@AlexMcSD](https://community.freefem.org/u/AlexMcSD)
#### Post date: [March 14, 2025, 12:33pm UTC](https://community.freefem.org/t/error-with-savevec-and-loadvec/3804/1 "2025-03-14T12:33:55Z")

</div>

Hello,  
I am trying to find a simple command to save my solutions, so that they can be loaded later. I am aware of the approach using ofstream and ifstream, however I was hoping there would be a high-level function to do this.

I found SaveVec and LoadVec which are included in the source code, but do not seem to work. Am I missing a load or include command?

Example:

```auto
load "lapack"

// Dummy Laplace problem
mesh Th = square(10,10);
fespace Vh(Th,P1);
Vh u,v;
solve a(u,v) = int2d(Th)(dx(u)*dx(v) + dy(u)*dy(v)) + on(1,u=x);
plot(u);

// Save vector
SaveVec(u[],"u.sol");

// Try to load vector.
Vh w;
w[] = LoadVec("u.sol");

```
