Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.

Notice

The forum is in read only mode.

Can we run Ngsolve on Google Colab?

More
2 years 6 months ago #3991 by dong
I run my Ngsolve code on my computer, but it looks very slow.
I wonder if we can run it on Google Colaboratory or something like that?
If so, how could we install it online?
Thank you so much.
More
2 years 6 months ago #3992 by joachim
Hi Dong,

we are pushing now for NGSolve cloud installations, which is particularly useful for teaching.

Yes, you can install NGSolve also on google colab, like on Ubuntu. Execute in a code cell:

!apt-add-repository universe
!add-apt-repository ppa:ngsolve/ngsolve -y
!apt-get install ngsolve

However, the new webgui is not supported on google colab.



What do you mean with so slow on your notebook ? Are you running out of memory ?
Can you provide some example with timings ?
The common free cloud environments are typically not faster than recent desktop computers or notebooks..

Joachim
More
2 years 6 months ago #3995 by dong
Thank you so much for your reply.

Yes, I'm running out of memory and it was frozen. My computer configuration is not strong enough.

My notebook below took me about 10 minutes of running on my laptop while it took 2 minutes on the computers in my school. Maybe I should get a new computer. So I think using cloud computer is better for me.

I did as you suggested. It run smoothly when installing, but I had a error when importing Ngsolve
Code:
ImportError: Python version mismatch: module was compiled for Python 3.6, but the interpreter version is incompatible: 3.7.12 (default, Sep 10 2021, 00:21:48) [GCC 7.5.0].
.

Could you please tell me how to solve this error?

Here is my Colab Notebook with that error.

The same error appeared when I tried with this example on Ngsolve Tutorial website .
Time to create page: 0.149 seconds