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

[OpenFOAM.com] Compiling library and solver fails (on a cluster) - spack error

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By mia_k
  • 1 Post By Frensis

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 7, 2023, 09:54
Question Compiling library and solver fails (on a cluster) - spack error
  #1
New Member
 
Sabrina
Join Date: Sep 2023
Posts: 1
Rep Power: 0
mia_k is on a distinguished road
Hello all.



I'm new to Linux and OpenFOAM and I am working on a cluster for the first time. OpenFOAM (v2112) has been installed as a module by an admin via the package manager.
I work in my work directory /work/user/username. I have also cloned a repository into this directory. Now I want to compile the library and the solver and I get the following error message:


make: *** No rule to make target 'Spack', needed by '[spack'. Stop.
wmake error: file 'Make/linux64GccDPInt32-spack/sourceFiles' could not be created in /work/user/username/hydrology/src/hydrology

I put the $WM_PROJECT_DIR directory in my bashrc file (bashrc under $HOME/username/.bashrc).



Furthermore, I created my $WM_PROJECT_USER_DIR at the beginning of my work:
export WM_PROJECT_USER_DIR=$HOME/username/OpenFOAM/$USER-$WM_PROJECT_VERSION
mkdir $WM_PROJECT_USER_DIR --parent


Unfortunately, after that, I was told that I'd better store/run all things like my simulations in /work/user/username. I have now looked at the individual files inside the cloned repository - Allwmake (top-level) as well as files and options (under cluster/work/user/username/hydrology/src/hydrology/Make). However, I have not found anything that helps me.


And the query echo $FOAM_USER_APPBIN and echo $FOAM_USER_LIBBIN outputs:
/cluster/home/username/OpenFOAM/username-v2112/platforms/linux64GccDPInt32-spack/bin and /cluster/home/username/OpenFOAM/username-v2112/platforms/linux64GccDPInt32-spack/lib respectively.


In cluster/work/user/username/hydrology/src/hydrology/Make there is also the directory linux64GccDPInt32-spack. It contains the file options - when this file is opened, the following message is displayed:


[spack cc] ERROR: Spack compiler must be run from Spack! Input 'SPACK_ENV_PATH' is missing.


Unfortunately, I don't know what the errors mean or what I did wrong so far. I don't make any further progress, especially not with the message/error about the Spack compiler. My research into this issue did not help me. I don't know if the problem is that everything is in different directories or outside the directory where OpenFOAM is installed? Or is it because OpenFOAM is perhaps already pre-compiled (Here I read that I then need the dev/develop package?)?


I apologize for any possibly incorrect Linux/OpenFOAM-related terms and contexts. I am still new and currently working my way into the nomenclature. 😊


Would be really happy if someone could help me. 😊
Thanks in advance
Sabrina
thorstencoordes likes this.
mia_k is offline   Reply With Quote

Old   September 22, 2023, 06:28
Default Same spack error while compiling library on a cluster
  #2
New Member
 
Francesca
Join Date: Jul 2023
Location: Milan, Italy
Posts: 2
Rep Power: 0
Frensis is on a distinguished road
Hello,

I am facing an issue which is very similar to yours. When trying to compile my library on a cluster (same OpenFOAM version) with wmake libso I get the same error message as you:

[spack cc] ERROR: Spack compiler must be run from Spack! Input 'SPACK_ENV_PATH' is missing.

However, in the file options contained inside linux64GccDPInt32-spack (located in the same path as yours), I don't have the error message, but instead it says:

Code:
EXE_INC = -I$(LIB_SRC)/finiteVolume/lnInclude -I$(LIB_SRC)/fileFormats/lnInclude -I$(LIB_SRC)/meshTools/lnInclude -I$(LIB_SRC)/functionObjects/forces/lnInclude -I$(LIB_SRC)/dynamicMesh/lnInclude

LIB_LIBS = -lfiniteVolume -lmeshTools -lforces -ldynamicMesh
I am also new, to both OpenFOAM and clusters, so I really don't know how to solve this issue, and I don't find much information online about it.

By any chance, have you found a solution, or understood where this error comes from?
Or does anybody else reading know how to solve this issue?

Thanks,
Francesca
thorstencoordes likes this.
Frensis is offline   Reply With Quote

Reply

Tags
cluster, compile, solver, spack


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
Duplicate library entries when running a solver with custom library francescomarra OpenFOAM Programming & Development 3 May 17, 2022 08:37
[OpenFOAM.com] Compiling Scotch library error fedez91 OpenFOAM Installation 6 March 2, 2022 23:25
[OpenFOAM.org] Error compiling VOF HARDT Solver on OpenFoam 2.4.0 saddy OpenFOAM Installation 4 December 1, 2020 02:36
ERROR: unable to find library HJH CFX 6 February 26, 2019 06:52
Running UDF with Supercomputer roi247 FLUENT 4 October 15, 2015 13:41


All times are GMT -4. The time now is 11:19.