How to install OpenFOAM-Adapter and Calculix-Adapter in supercomputing platform

Hi everyone, I’ve been using Precice coupled OpenFOAM with Calculix for half a year now. But I’ve been doing it on a personal computer. Due to the recent increase in the amount of computing, personal computers cannot meet the requirements of computing, so it is necessary to install and configure PreCICE on the supercomputing platform.
However, there are some problems:
The first way to install software on supercomputing platform is using Miniconda, but there is no installation package for PreCICE, Openfoam-Adapter and Calculix-Adapter on conda website.
The second way is to compile and install in a local directory using source code, but the supercomputer platform does not provide users with access to the root directory or administrator rights. Therefore, the compiled Adapter cannot be stored under the root directory $FOAM_USER_LIBBIN. Because of this problem, I changed the directory where the adapter is stored, However, Unknown function type preciceAdapterFunctionObject mistakes is always displayed (Get the OpenFOAM adapter | preCICE - The Coupling Library Nobject).
Could you please give me some suggestions on installing Openfoam-Adapter and Calculix-Adapter on the supercomputer platform? Thank you!

I have successfully compiled OpenFOAM, Calculix, preCICE, the OpenFOAM adaptor, and the Calculix adapter on a supercomputer-accessible file system for which I don’t have root permissions. It’s all a matter of setting the proper environment variables such that the libraries and executables you need are seen.

I believe the error you’re referring to is because OpenFOAM is already installed on your file system, but the FOAM_USER_LIBBIN location is inaccessible to you. This is one of the places that OpenFOAM will look for libraries when you add them to the system/controlDict file. However, you can also add libraries to the system/controlDict file using an absolute path. See this thread.

I suggest you follow the advice from this thread and add the libpreciceAdapterFunctionObject.so file to the system/controlDict file by its absolute path.

7 Likes

Thank you for your reply. I tried it as you suggested. When calculating the Flow-over-plate-nearest-projection example of PreCICE, I used two OpenFOAM solvers, so as to test whether the Openfoam-Adapter can be used normally. But the following problem arises:

The output file looks like this:

and the error file is shown below:

I think it is possible that PreCICE is not installed correctly. Because I moved libpreciceAdapterFunctionObject.so on PC. So the file location and the corresponding path in controlDict file changes. It turns out it works fine. The complete output and error file have also been uploaded. Could you please help me find out why this problem occurs? Thank you!
err.txt (15.8 KB)
out.txt (9.2 KB)

Well, it looks like OpenFOAM is now finding the libpreciceAdapterFunctionObject.so file just fine. The preCICE adaptor gets loaded and then starts to try and read the preCICE input .xml file (precice-config.xml). It seems that somewhere in this xml parse you don’t have the properly library loaded. It also looks like the xml parsing is using a library that comes with the compiler you currently have loaded (gcc-11.2). When I compiled preCICE, OpenFOAM, Calculix, the OpenFOAM adapter and the Calculix adapter I did so using the same compiler and MPI versions. I think this is your problem. If you didn’t compile OpenFOAM yourself then you probably don’t know what compiler and / or MPI version were used to do so. If it were me, I would try and find out what versions of these were used and use the same ones to compile the OpenFOAM adapter. I think this will solve your error.

2 Likes

I’m sorry to reply you so late. Thanks for your advice. I consulted the supercomputer staff for Compiler and MPI versions, and then tried again, but the previous error still appeared (you can see my submission command in the image below). I think there may be some problems during the software installation. Maybe I should reinstall the software Precice-2.4.0. In addition, when installing precice-2.4.0 and Calculix-Adapter, the supercomputer staff told me that they were also consistently unsuccessful. Installation problems have been bothering me for a long time, and since I don’t have much experience with computer compilation, I’m not sure what to do next. So could you please tell me how you were installed on the supercomputer through source code compilation? Or can you share some of your installation suggestions? Thank you very much!

precice

@tianhk several aspects may be going wrong here, but as an alternative, have you tried installing preCICE (and OpenFOAM) via Spack? Using Spack | preCICE - The Coupling Library

Spack is designed for HPC systems with module systems and can give you, e.g., a module of preCICE with any dependency versions and optimization options you ask for.

As for Conda, there is a community-contributed package for preCICE.

1 Like