CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   [OpenFOAM.com] Compiling library and solver fails (on a cluster) - spack error (https://www.cfd-online.com/Forums/openfoam-installation/251799-compiling-library-solver-fails-cluster-spack-error.html)

mia_k September 7, 2023 09:54

Compiling library and solver fails (on a cluster) - spack error
 
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

Frensis September 22, 2023 06:28

Same spack error while compiling library on a cluster
 
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 :)


All times are GMT -4. The time now is 22:02.