CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Problem installing FOAM2CSR

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By quarkz

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 5, 2024, 04:36
Default Problem installing FOAM2CSR
  #1
Senior Member
 
TWB
Join Date: Mar 2009
Posts: 419
Rep Power: 20
quarkz is on a distinguished road
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$
but I already set the dir:

Code:
(base) user:foam2csr$ echo $WM_PROJECT_DIR
/home/user/OpenFOAM/OpenFOAM-v2306
Can someone help?

Thanks.
quarkz is offline   Reply With Quote

Old   November 5, 2024, 06:23
Default
  #2
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 844
Blog Entries: 1
Rep Power: 19
dlahaye is on a distinguished road
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
? Correct?

What files do you have inside the foam2crs directory? Can you compile these files? Can you link these files?
dlahaye is offline   Reply With Quote

Old   November 5, 2024, 08:43
Default
  #3
Senior Member
 
TWB
Join Date: Mar 2009
Posts: 419
Rep Power: 20
quarkz is on a distinguished road
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
These are the files inside:

Code:
Allwclean  Allwmake  CLA.md  LICENSE  Make  TODO  lnInclude  src
My NVARCH = 86 (A6000)

The error I got when running Allwmake is:
Code:
./Allwmake: 4: WM_PROJECT_DIR: parameter not set or null
Btw, I'm running under WSL.
quarkz is offline   Reply With Quote

Old   November 5, 2024, 16:43
Default
  #4
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 844
Blog Entries: 1
Rep Power: 19
dlahaye is on a distinguished road
You say that

Code:
export WM_PROJECT_DIR=/home/user/OpenFOAM/OpenFOAM-v2306
Why so? Is the directory OpenFOAM-v2306 (installation) not write protected?
Can you verify using 'ls -l'?

Can you try using
Code:
export WM_PROJECT_DIR=~
or similar instead?
dlahaye is offline   Reply With Quote

Old   November 5, 2024, 19:59
Default
  #5
Senior Member
 
TWB
Join Date: Mar 2009
Posts: 419
Rep Power: 20
quarkz is on a distinguished road
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
Running:

Code:
export WM_PROJECT_DIR=~
doesn't make any diff
quarkz is offline   Reply With Quote

Old   November 6, 2024, 03:48
Default
  #6
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 844
Blog Entries: 1
Rep Power: 19
dlahaye is on a distinguished road
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
and subsequently try

Code:
touch my_test_file
?

Once we see the outcome of this small test, we can further elaborate.
dlahaye is offline   Reply With Quote

Old   November 6, 2024, 19:58
Default
  #7
Senior Member
 
TWB
Join Date: Mar 2009
Posts: 419
Rep Power: 20
quarkz is on a distinguished road
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
This is my own ubuntu so I have sudo rights as well.
quarkz is offline   Reply With Quote

Old   November 7, 2024, 05:57
Default
  #8
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 844
Blog Entries: 1
Rep Power: 19
dlahaye is on a distinguished road
I see.

I wonder. Is there a difference between

Code:
sudo ./Allwmake # with sudo
and

Code:
./Allwmake # without sudo
? Also, it there a difference between

Code:
sudo echo $WM_PROJECT_DIR # with sudo
and

Code:
echo $WM_PROJECT_DIR # without sudo
?
dlahaye is offline   Reply With Quote

Old   November 7, 2024, 09:11
Default
  #9
Senior Member
 
TWB
Join Date: Mar 2009
Posts: 419
Rep Power: 20
quarkz is on a distinguished road
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.
dlahaye likes this.
quarkz is offline   Reply With Quote

Old   November 7, 2024, 11:14
Default
  #10
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 844
Blog Entries: 1
Rep Power: 19
dlahaye is on a distinguished road
Wonderful! Let us know how it goes.

Best, D.
dlahaye is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
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


All times are GMT -4. The time now is 10:52.