Hack of the Day: running CFD-ACE+ on Gentoo Linux

CFD-ACE+ is a multiphysics and computational fluid dynamics (CFD) simulation tool that was originally developed by CFD Research Corp. and is now distributed by ESI Software. The only platforms officially supported by CFD-ACE+ are Red Hat Enterprise Linux, SUSE Linux and Windows. Fortunately, it seems that ACE+ runs on other Linux distributions with only a little hacking. I just installed and tested CFD-ACE+ successfully (albeit not very thoroughly) on an up-to-date Gentoo Linux system.  The process will require hacking some config files to build an external library from source.

I started by downloading the files intended for Red Hat 6. Each package is a strange self-extracting executable file that unpacks itself when run. They also provide a C-shell script called install.com that automates the install process. The install script is very well behaved in that it doesn’t try to spew libraries and binaries throughout your filesystem, and you can run it as an ordinary user and install the file in your home directory.  The tricky part about the installation is that the unpacking software (which is bundled into the self-extracting executable) needs the library selinux.so.1 in order to run. That library isn’t normally installed on a Gentoo system unless you’ve specifically set up SELinux.  In order to avoid the potential problems of installing this library in my system paths,  I  created src and include directories in my home directory.  I downloaded source tarballs for libsepol and libselinux from the download page of the selinux project.  First, build libsepol using make.  Then, copy the libsepol.so.1 binary from the src directory to the lib directory you just created in your home directory. Copy the include/sepol directory with all of its contents to the include directory in your home directory.  When you are done, you should have:

include/
└── sepol
    ├── av_permissions.h
    ├── boolean_internal.h
    ├── boolean_record.h
    ├── booleans.h
    [output truncated]

Now, edit the Makefile in the src directory of libselinux. Change the INCLUDEDIR variable so that it points to include in your home directory:

 INCLUDEDIR ?= /home/yourusername/include

Now, it shouldn’t complain about finding the header files for libsepol.  Build libselinux and copy the library from src to the lib directory where you put libsepol.so.

lib/
├── libselinux.so -> libselinux.so.1
├── libselinux.so.1
├── libsepol.so -> libsepol.so.1
└── libsepol.so.1

Finally, you need to tell ACE+ installer where to find these libraries. I defined the LD_LIBRARY_PATH variable on the command line like this:

 LD_LIBRARY_PATH=/home/cfinch/lib ./install.com

These libraries are ONLY needed for the ACE+ unpacker. Once you have unpacked the files, you don’t need the libraries anymore (until the next upgrade)

Advertisements

2 thoughts on “Hack of the Day: running CFD-ACE+ on Gentoo Linux

  1. Hi after performing all the instructions in all possible kinds when I try to run any of the programs of the package i get this “./CFD-ACE-GUI: error while loading shared libraries: libpython2.7_cfd.so.1.0: cannot open shared object file: No such file or directory” any idea how to fix it?

    Like

    1. This post is very old, so I’m not surprised that you’re having trouble. I haven’t used CFD-ACE+ on Gentoo in years. It cannot find a specific library, and I am guessing that this library has been installed in a non-standard path, where the operating system cannot find it. Locate the library, and try

      LD_LIBRARY_PATH=/path/to/custom/libraries/ ./cfd_command

      That’s just a guess, and I don’t have Gentoo or CFD-ACE+ at this point.

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s