- Thank you received: 0
installing ngsxfem
5 years 9 months ago #1455
by noname
installing ngsxfem was created by noname
Hello there,
I have been using Ngsolve for a while now and I have decided to install xfem extension to it. I am following the steps explained under downloads but when I do
cmake ../ -DCMAKE_INSTALL_PREFIX=INSTLOCATION -DBUILD_NGSOLVE=ON
I keep getting
CMake Error: The source directory "/home" does not appear to contain CMakeLists.txt.
anyone has experienced this before?
Thanks...
I have been using Ngsolve for a while now and I have decided to install xfem extension to it. I am following the steps explained under downloads but when I do
cmake ../ -DCMAKE_INSTALL_PREFIX=INSTLOCATION -DBUILD_NGSOLVE=ON
I keep getting
CMake Error: The source directory "/home" does not appear to contain CMakeLists.txt.
anyone has experienced this before?
Thanks...
5 years 9 months ago #1456
by schruste
Replied by schruste on topic installing ngsxfem
Hello noname,
It seems that you call that command in your home directory while the sources are not in /home but somewhere else.
In the installation instructions it says that you should do
before executing the cmake-command. Note that you are in a build directory then and ../ refers to the source of ngsxfem so that cmake can find the CMakeLists.txt file.
Please check where you downloaded ngsxfem and make sure that you refer to the correct source directory. Then try again.
Best,
Christoph
It seems that you call that command in your home directory while the sources are not in /home but somewhere else.
In the installation instructions it says that you should do
Code:
git clone https://github.com/ngsxfem/ngsxfem.git
cd ngsxfem
mkdir build
cd build
before executing the cmake-command. Note that you are in a build directory then and ../ refers to the source of ngsxfem so that cmake can find the CMakeLists.txt file.
Please check where you downloaded ngsxfem and make sure that you refer to the correct source directory. Then try again.
Best,
Christoph
5 years 9 months ago - 5 years 9 months ago #1457
by noname
Replied by noname on topic installing ngsxfem
Hello again, thanks for the fast reply. Followed your advice and advanced a bit, now when I do
make
I got
/usr/include/netgen/nginterface.h:315:5: error: ‘string’ does not name a type; did you mean ‘stdin’?
string name; // name of gridfunction
make
I got
/usr/include/netgen/nginterface.h:315:5: error: ‘string’ does not name a type; did you mean ‘stdin’?
string name; // name of gridfunction
Last edit: 5 years 9 months ago by noname.
5 years 9 months ago #1459
by schruste
Replied by schruste on topic installing ngsxfem
You are using BUILD_NGSOLVE=ON, right? That means that NGSolve and netgen etc. are also installed. For that you need to make sure that you do a
Did you do that?
It is also advisable to uninstall NGSolve beforehand (or make invisible for CMake) so that the NGSolve versions (one that you have installed through binaries as it seems and one that ngsxfem tries to install himself) don't mix up.
If you still have problems can you post a chain of commands that you applied so that I can try to understand what is going on on your machine?
Best,
Christoph
Code:
git submodule update --init
Did you do that?
It is also advisable to uninstall NGSolve beforehand (or make invisible for CMake) so that the NGSolve versions (one that you have installed through binaries as it seems and one that ngsxfem tries to install himself) don't mix up.
If you still have problems can you post a chain of commands that you applied so that I can try to understand what is going on on your machine?
Best,
Christoph
5 years 9 months ago #1460
by noname
Replied by noname on topic installing ngsxfem
Hello,
I am quite new to this so if the answers to my questions are obvious, excuse me.
Since I already have Ngsolve installed , I run
( after cloning the xfem library, but I am not sure where to clone this, it can be anywhere? it needs to be where NGsolve is?? )
cmake ../ -DCMAKE_INSTALL_PREFIX=INSTLOCATION -DBUILD_NGSOLVE=OFF
make
make install
but after running the "cmake ../ -DCMAKE_INSTALL_PREFIX=INSTLOCATION -DBUILD_NGSOLVE=OFF" I run "make", and that is where I get the error
/usr/include/netgen/nginterface.h:315:5: error: ‘string’ does not name a type; did you mean ‘stdin’?
string name; // name of gridfunction
My suspicion is that I am setting the INSTLOCATION wrong, it needs to be where NGsolve is installed and I searched for it in my computer but not sure if I found the right place.
I am quite new to this so if the answers to my questions are obvious, excuse me.
Since I already have Ngsolve installed , I run
( after cloning the xfem library, but I am not sure where to clone this, it can be anywhere? it needs to be where NGsolve is?? )
cmake ../ -DCMAKE_INSTALL_PREFIX=INSTLOCATION -DBUILD_NGSOLVE=OFF
make
make install
but after running the "cmake ../ -DCMAKE_INSTALL_PREFIX=INSTLOCATION -DBUILD_NGSOLVE=OFF" I run "make", and that is where I get the error
/usr/include/netgen/nginterface.h:315:5: error: ‘string’ does not name a type; did you mean ‘stdin’?
string name; // name of gridfunction
My suspicion is that I am setting the INSTLOCATION wrong, it needs to be where NGsolve is installed and I searched for it in my computer but not sure if I found the right place.
5 years 9 months ago #1461
by schruste
Replied by schruste on topic installing ngsxfem
Hi,
1. It depends on the versions of ngsxfem that you check out and the version of NGSolve that you have installed if they are compatible at all. The save way to do it, is to update the submodules (see post before) use -DBUILD_NGSOLVE=ON in the cmake-options and deinstall ngsolve beforehand. Then the submodule of a compatible NGSolve-version is taken. The price you pay is that it will probably take quite long to compile through everything. What is your NGSolve version? What is your ngsxfem version (date)?
2. Where you put the sources of ngsxfem to is up to you. The location where it is installed to is set by the INSTLOCATION which you can decide on, but you have to make sure that the environment variables are set so that the installed files can be found by your OS.
3. If the INSTLOCATION is set wrongly this is only to be noticed after the installation. The installation should go through also with a wrong INSTLOCATION.
1. It depends on the versions of ngsxfem that you check out and the version of NGSolve that you have installed if they are compatible at all. The save way to do it, is to update the submodules (see post before) use -DBUILD_NGSOLVE=ON in the cmake-options and deinstall ngsolve beforehand. Then the submodule of a compatible NGSolve-version is taken. The price you pay is that it will probably take quite long to compile through everything. What is your NGSolve version? What is your ngsxfem version (date)?
2. Where you put the sources of ngsxfem to is up to you. The location where it is installed to is set by the INSTLOCATION which you can decide on, but you have to make sure that the environment variables are set so that the installed files can be found by your OS.
3. If the INSTLOCATION is set wrongly this is only to be noticed after the installation. The installation should go through also with a wrong INSTLOCATION.
Time to create page: 0.107 seconds