CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   error compiling v 2.2.2 on a Cray system (https://www.cfd-online.com/Forums/openfoam-installation/127550-error-compiling-v-2-2-2-cray-system.html)

macelee December 13, 2013 15:12

error compiling v 2.2.2 on a Cray system
 
1 Attachment(s)
Can any one suggest what might be the problem? The first sign of trouble is at line 338 of the log file, showing that the scotch library file cannot be found. But compilation before that point appears to be all successful and error-free. I've truncated the second half of the log file in order not to exceed the limit of upload file size.

The hardware is a Cray XC30 and I am using the GNU compiler v 4.8.

wyldckat December 15, 2013 12:28

Greetings macelee,

From what I can figure out, the problem is likely to be related to a problem with the parallel file system being used by the cluster/supercomputer. In other words: the library files are not being picked by the linker for linking to the applications that need those libraries, as if those library file did not exist or simply cannot be found.

If you run this command, what do you see?
Code:

ls -l /work/u001/u001/lining/openfoam/parallel/OpenFOAM/OpenFOAM-2.2.2/platforms/crayxeGccDPOpt/lib/libOpenFOAM*
You should be able to see a file named "libOpenFOAM.so". If you do not see it, then that explains why the linker is not able to see it either.
On the other hand, it could be a problem with permissions, therefore knowing the permissions that the file "libOpenFOAM.so" has got, should help ascertain what's going on.

Best regards,
Bruno

macelee December 20, 2013 04:49

This still puzzles me after a few more days work. When I check the library files such as "libOpenFOAM.so", they are indeed there in the correct directory with the correct permissions.

On the other hand, the first error in the log file suggests something wrong with the scotch library. When I check the directory where the compiled scotch library should be located,
Code:

/work/u001/u001/lining/openfoam/parallel/OpenFOAM/ThirdParty-2.2.2/platforms/crayxeGccDPOpt/lib
this directory is empty. So for some reason scotch was not properly built or installed, which I guess caused the subsequent problems with OpenFOAM, such as this:
Code:

scotchDecomp.C:132:20: fatal error: scotch.h: No such file or directory
 #include "scotch.h"
                    ^
compilation terminated.
make: *** [Make/crayxeGccDPOpt/scotchDecomp.o] Error 1

Any suggestions? Thanks

wyldckat December 25, 2013 06:51

Hi macelee,

This is one of those weird issues that without direct access to the machine, it's a bit of a guessing game... although I do like a good guessing game about installing OpenFOAM! :)

So, let's address one detail at a time:
  1. The issue about the missing "scotch.h" file is simple: the build process for Scotch that the Allwmake script does in the "ThirdParty-*" folder, requires both the libraries and the applications for scotch and ptscotch to be built with success. If not, the installation step does not occur. In this case, the binaries did not build properly, therefore there is no installation.
  2. The symptom is common to both OpenFOAM's and Scotch's applications, namely where the libraries simply don't seem to be found when building an application. There are a few possibilities that come to mind:
    1. As I mentioned before, the parallel file system on the supercomputer/cluster might be having some weird sync glitches, leading to the libraries not being found when ld tried to link the executables to the libraries.
    2. This kind of error is somewhat common when we try to build the libraries for 64 bit and then try to link 32bit applications to those libraries, or vice versa. In other words, there might be some missing build option for the libraries or application, in order for them to be on the same architectural page ;).
      • Associated to this previous architectural issue, I suggest that you try building an example library and application on your Cray machine, to understand what build options are necessary for a successful build.
    3. Some supercomputers use a very complex architecture, which requires that applications are built as a single monolithic binary. Ask your systems administrator for more information about this.
    4. Last but not least, some POSIX systems use the environment variables "LD_LIBRARY_PATH64" and "LIBRARY_PATH_32", instead of the more common "LD_LIBRARY_PATH". You can ask your systems administrator for more information about this and/or run this command:
      Code:

      export | grep LD_LIBRARY_PATH
Best regards,
Bruno

macelee January 8, 2014 07:31

Hi Bruno,

Thanks for your very detailed explanation and sorry for the long delay!

I followed your advise to first try to build some applications and libraries on my hardware in order to learn the correct options. I then managed to build the 'scotch' library outside OpenFOAM. I used the 'Makefile.inc' file as supplied in the OpenFOAM ThirdParty download package and did not have to change anything.

Now I can see a way to move forward. Is that possible to use this external scotch installation to build OpenFOAM?

If that is not possible, I will try to 'make install' scotch into the required location (ThirdParty-2.2.x/platforms/...) before invoking OpenFOAM's Allwmake script. But I guess there might be an easier way.

Thanks again for your help.

macelee

wyldckat January 10, 2014 14:06

Hi macelee,

If you look at the file "etc/config/scotch.sh" - online link: https://github.com/OpenFOAM/OpenFOAM...nfig/scotch.sh - you'll see that it can be configured to point to your installation of the Scotch toolbox.

To get a sense of where it's currently pointing to, run:
Code:

echo $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$SCOTCH_VERSION
Which means that you can actually move or create a symbolic link to your current Scotch installation!

Best regards,
Bruno


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