Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation using Intel OneAPI #112

Open
davidscn opened this issue Dec 17, 2022 · 2 comments
Open

Installation using Intel OneAPI #112

davidscn opened this issue Dec 17, 2022 · 2 comments

Comments

@davidscn
Copy link
Member

While trying to install CalculiX and the adapter on the computer cluster ITO using Intel's OneAPI, we faced some issues I would like to summarize here. We used the GCC standard library v9.2 and the Intel OneAPI v2021.3.

  • First of all, the adapter was only compatible with libyaml-cpp-0.7.0. Our documentation proposes to download and install version 0.6.2, which lead to link-time errors. Installing v0.7.0 worked fine.
  • After installing the dependencies, building the adapter lead to a link-time error undefined reference to MAIN__. As described in this Intel forum post the solution was to add an additional flag to the Fortran compiler
    FFLAGS = -Wall -O3 -fopenmp $(INCLUDES) ${ADDITIONAL_FFLAGS}
-FFLAGS = -Wall -O3 -fopenmp $(INCLUDES) ${ADDITIONAL_FFLAGS}
+FFLAGS = -Wall -O3 -fopenmp $(INCLUDES) ${ADDITIONAL_FFLAGS} -nofor-main

in order to " link Fortran objects with a C main program".

  • Lastly, we ended up with issues originating from the multi-threading of SPOOLES (similar to the one described on Discourse). We tried a few things to get the multi-threading module work, but eventually disabled the multi-threading (enabled by default) in CalculiX by removing the USE_MT flag.
-CFLAGS = -Wall -O3 -fopenmp $(INCLUDES) -DARCH="Linux" -DSPOOLES -DARPACK -DMATRIXSTORAGE -DUSE_MT
+CFLAGS = -Wall -O3 -fopenmp $(INCLUDES) -DARCH="Linux" -DSPOOLES -DARPACK -DMATRIXSTORAGE

Maybe reading a bit more in detail through the SPOOLES documentation might help to resolve this issue in the future.

@boris-martin
Copy link
Collaborator

The CI script has always been reliant on libyaml-cpp-0.7.0, so I guess we should update the documentation to recommend building that one from source.

Now there are quite a few flags that might be optional: USE_MT, -fallow-argument-mismatch (for GCC >= 10) and this -no-for-main. Maybe we should update the doc with a list of useful flags instead of putting them (or not) by default and hoping for the best

@davidscn
Copy link
Member Author

davidscn commented Dec 19, 2022

@yagi was able to install the CalculiX-adapter using multi-threading:

The path to the spoolesMT library has to be added in the LIBS specification before the actual spooles library. Example:

SPOOLES_LIBS_MT = /path/to/SPOOLES.2.2/MT/src/spoolesMT.a
SPOOLES_LIBS = /path/to/SPOOLES.2.2/spooles.a


LIBS = \
$(SPOOLES_LIBS_MT) \
$(SPOOLES_LIBS) \
...

Specifying the SPOOLES_LIBS first lead to the linking issues described above (on discourse).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants