|
[Sponsors] |
![]() |
![]() |
#1 |
Senior Member
TWB
Join Date: Mar 2009
Posts: 419
Rep Power: 20 ![]() |
Hi,
I'm following the instructions here: https://blog.nextfoam.co.kr/2024/01/...th-petsc4foam/ on how to test OpenFOAM with GPU. I got all the steps working until the installation of FOAM2CSR. When building, I got the error: Code:
base) user:foam2csr$ sudo ./Allwmake [sudo] password for user: ./Allwmake: 4: WM_PROJECT_DIR: parameter not set or null (base) user:foam2csr$ Code:
(base) user:foam2csr$ echo $WM_PROJECT_DIR /home/user/OpenFOAM/OpenFOAM-v2306 Thanks. |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
|
I imagine you already did
Code:
export CUBROOT=/root/amgx/thrust/dependencies/ export PETSC_INC=/opt/petsc/include export AMGX_INC=/opt/amgx/include export SPECTRUM_MPI_HOME=/opt/openmpi-4.0.5 export PETSC_LIB_DIR=/opt/petsc/lib export AMGX_LIB=/opt/amgx/lib git clone https://gitlab.hpc.cineca.it/openfoam/foam2csr.git cd foam2csr # Edit NVARCH in the Make/nvcc to your NVARCH ./Allwmake What files do you have inside the foam2crs directory? Can you compile these files? Can you link these files? |
|
![]() |
![]() |
![]() |
![]() |
#3 |
Senior Member
TWB
Join Date: Mar 2009
Posts: 419
Rep Power: 20 ![]() |
Hi dlahaye,
Well, almost: Code:
export CUBROOT=/root/amgx/thrust/dependencies/ export PETSC_INC=/opt/petsc/include export AMGX_INC=/opt/amgx/include export SPECTRUM_MPI_HOME=/opt/openmpi-5.0.5 export PETSC_LIB_DIR=/opt/petsc/lib export AMGX_LIB=/opt/amgx/lib export WM_PROJECT_DIR=/home/user/OpenFOAM/OpenFOAM-v2306 git clone https://gitlab.hpc.cineca.it/openfoam/foam2csr.git sudo ./Allwmake Code:
Allwclean Allwmake CLA.md LICENSE Make TODO lnInclude src The error I got when running Allwmake is: Code:
./Allwmake: 4: WM_PROJECT_DIR: parameter not set or null |
|
![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
|
You say that
Code:
export WM_PROJECT_DIR=/home/user/OpenFOAM/OpenFOAM-v2306 Can you verify using 'ls -l'? Can you try using Code:
export WM_PROJECT_DIR=~ |
|
![]() |
![]() |
![]() |
![]() |
#5 |
Senior Member
TWB
Join Date: Mar 2009
Posts: 419
Rep Power: 20 ![]() |
This is the location which I installed OF, which was done a yr ago. Must OF be in the /opt/ dir?
I run ls -l : Code:
(base) user:cfj_naca2415_c0.3072_5e-5_AoA4_165K_org_2$ ls -l /home/user/OpenFOAM/OpenFOAM-v2306 total 5140 -rwxr-xr-x 1 user user 3392 Jun 28 2023 Allwmake -rw-r--r-- 1 user user 1267 Jun 28 2023 CONTRIBUTORS.md -rw-r--r-- 1 user user 35592 Jun 28 2023 COPYING drwxr-xr-x 2 user user 4096 Aug 19 2023 META-INFO -rw-r--r-- 1 user user 9473 Jun 28 2023 README.md drwxr-xr-x 6 user user 4096 Jun 28 2023 applications drwxr-xr-x 3 user user 4096 Jun 28 2023 bin drwxr-xr-x 4 user user 4096 Aug 19 2023 build drwxr-xr-x 4 user user 4096 Jun 28 2023 doc drwxr-xr-x 8 user user 4096 Oct 31 22:55 etc -rw-r--r-- 1 user user 5154072 Aug 19 2023 log.linux64Gcc114DPInt32Opt drwxr-xr-x 9 user user 4096 Jun 28 2023 modules drwxr-xr-x 4 user user 4096 Aug 19 2023 platforms drwxr-xr-x 47 user user 4096 Jun 28 2023 src drwxr-xr-x 21 user user 4096 Dec 4 2023 tutorials drwxr-xr-x 7 user user 4096 Jun 28 2023 wmake Code:
export WM_PROJECT_DIR=~ |
|
![]() |
![]() |
![]() |
![]() |
#6 |
Senior Member
|
The location of the OF dir does *not* matter here.
What matters is whether you have the rights (priviledges) to write (edit, modify) files in the OF directory. This is easy to verify. Can you please do Code:
cd /home/user/OpenFOAM/OpenFOAM-v2306 Code:
touch my_test_file Once we see the outcome of this small test, we can further elaborate. |
|
![]() |
![]() |
![]() |
![]() |
#7 |
Senior Member
TWB
Join Date: Mar 2009
Posts: 419
Rep Power: 20 ![]() |
Yes, I have access to this folder:
Code:
-rw-r--r-- 1 user user 0 Nov 7 08:57 my_test_file drwxr-xr-x 8 user user 4.0K Oct 31 22:55 etc drwxr-xr-x 21 user user 4.0K Dec 4 2023 tutorials -rw-r--r-- 1 user user 5.0M Aug 19 2023 log.linux64Gcc114DPInt32Opt drwxr-xr-x 4 user user 4.0K Aug 19 2023 platforms drwxr-xr-x 4 user user 4.0K Aug 19 2023 build drwxr-xr-x 2 user user 4.0K Aug 19 2023 META-INFO -rwxr-xr-x 1 user user 3.4K Jun 28 2023 Allwmake -rw-r--r-- 1 user user 1.3K Jun 28 2023 CONTRIBUTORS.md -rw-r--r-- 1 user user 35K Jun 28 2023 COPYING -rw-r--r-- 1 user user 9.3K Jun 28 2023 README.md drwxr-xr-x 6 user user 4.0K Jun 28 2023 applications drwxr-xr-x 3 user user 4.0K Jun 28 2023 bin drwxr-xr-x 4 user user 4.0K Jun 28 2023 doc drwxr-xr-x 9 user user 4.0K Jun 28 2023 modules drwxr-xr-x 47 user user 4.0K Jun 28 2023 src drwxr-xr-x 7 user user 4.0K Jun 28 2023 wmake |
|
![]() |
![]() |
![]() |
![]() |
#8 |
Senior Member
|
I see.
I wonder. Is there a difference between Code:
sudo ./Allwmake # with sudo Code:
./Allwmake # without sudo Code:
sudo echo $WM_PROJECT_DIR # with sudo Code:
echo $WM_PROJECT_DIR # without sudo |
|
![]() |
![]() |
![]() |
![]() |
#9 |
Senior Member
TWB
Join Date: Mar 2009
Posts: 419
Rep Power: 20 ![]() |
Hi dlahaye, I have solved the problem. It's because I had installed AmgX to restricted folder (/opt/). So I have to use sudo to access it, which is req during the installation of foam2csr. However, it seems tt it's not possible to use sudo with Allwmake.
Once I changed AmgX is a standard installation dir, I just use Allwmake and there's no problem. |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[OpenFOAM.org] Problem in installing OpenFOAM 2.3.0 !!! | omid20110 | OpenFOAM Installation | 6 | August 1, 2016 11:20 |
[swak4Foam] foam-extend-3.2 installing problem: swak4Foam failed to install due to Bison | lxwd | OpenFOAM Community Contributions | 1 | March 20, 2016 16:03 |
Problem with installing OpenFOAM 2.0.X | mohsen.boojari | OpenFOAM Installation | 3 | February 3, 2016 11:41 |
Problem installing OpenFOAM-1.6-ext on Ubuntu 14.04 | afrotimy | OpenFOAM Installation | 4 | October 4, 2014 11:36 |
Problem in installing OpenFOAM-ParaView-0.1.1-1.x86_64 | hassan5565 | OpenFOAM Installation | 1 | August 5, 2014 13:05 |