Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Astryl_S_
Beginner
201 Views

Linking Calculix with Intel Compilers

Hi,

I am trying to link Calculix v2.7 with Intel Compilers on Windows 64-bit, which requires Spooles and ARPack. Using msys and ming compilers I can combine the libraries using the 'make lib' command. What is the equivalent to the 'make lib' command using the Intel compilers (Intel Parallel Studio 2015)? 

If anyone has any more information regarding what I need to do to compile Calculix with the Intel Compilers it would be great. Please keep in mind   that I have no past experience working with compilers like these.

Any help would be greatly appreciated.

0 Kudos
12 Replies
201 Views

Astryl,

Hmm...Are you experienced on "make" and "makefile"? Basically, "make" is the command to parse "makefile" and execute the "rules"/"commands" in it. In these "commands", it will invoke compiler to build the source code.

Now, for your questions, first of all, there is no equivalent commands for "make lib" for a specific compiler. All these depends on how the "makefile" is written", if it is written like:

cl xxx.c

It is hardcoded to use MS compiler and you will need to change the makefile manually to change to other compilers (like Intel's, using "icl").

If the "makefile" is written like (a better makefile) -> below is pseudo-code only:

if not defined CC

CC=cl

endif

$(CC) xxx.c

Then, a possible usage is "make lib" (use cl as default), or "make lib CC=icl" (use intel compiler)....

A even better open source project will have something like "configure", which provides options like "CC", "CXX", "LD", "AR" and so on, and you can use these environment variables to configure your build system/process.

So, all depends on the project, different project use different build system and how these makefiles are written.

For your specific project (Calculix), I will take a look on its source code and build scripts, to understand how to achieve that. Please stay tuned.

Thanks,

Shenghong

 

201 Views

Astryl,

Is it possible that you provide a instruction about how to buildCalculix v2.7 first (where to download packages, what kind of settings of msys required, what commands to enter)? And it will save me some time about the setup stuff.

Or, you may zip all you have, and I can build directly....

Thanks,

Shenghong

201 Views

Hi Astryl,

I have set up the environment already...referring to:

https://mechanicalhacks.wordpress.com/2011/03/29/building-calculix-to-run-native-on-64-bit-windows/

I have already make it built with ifort for ARPACK, and am working on SPOOLES , which has some issues (There are no sys/time.h header on windows, it is part of MinGW, Intel compiler will not search it, if I force Intel compliler to search there, the other standard libraries like "stdlib.h" will raise some errors".)

Whatever, I will explore the possibility to build with icl+ifort under msys. This is not officially supported, but I suppose it can work with some changes. Stay tuned.

Thanks,

Shenghong

Astryl_S_
Beginner
201 Views

Hey Shenghong,

Thank you for the quick response. No I am not experienced in make and makefiles, however I do understand the basics. Let me provide you with a bit more information.

My goal is to compile calculix v2.7 with the Pardiso compiler. Calculix comes with some internal solvers like spooles, cholesky, etc. However  I am required to link Calculix with an external compiler called Pardiso. 

Following the guide in your last post I could compile Calculix 2.7 on Windows using msys, however I could not link Calculix with Pardiso (the program kept crashing when I tried to use the Pardiso solver). 

I have attached the make file for Calculix v2.7 and Pardiso library files. If you can get these linked using the Intel compilers it would be great.

Thanks,

Astryl 

201 Views

Hi Astryl,

Looks like there are some confusing here....

compiler: the tools like gcc, gfortran

Intel compilers: icc/icl, ifort

Libraries: something like *.so (on linux) or *.dll (on windows). 

From what you provided, Pardiso  is a library, not a "compiler". I am not expert on this library, I have searched around and looks like this is a licensed library. If you are using gcc/gfortran to build your  calculix 2.7 in msys, and link to Pardiso, you may need to contact Pardiso support on the crash (by the way, I also see Intel MKL has this library too? If you are using MKL, you may consult at MKL forum in https://software.intel.com/en-us/forums/intel-math-kernel-library). I have no source on this library and may not be able to debug the crash.

If you want to build your calculix with Intel compilers (like icl/ifort), I may be able to have some exploration in msys there (Note: it is not officially supported in msys).

Let me know what you expect and see how I can help. :)

Thanks,

Shenghong

Astryl_S_
Beginner
201 Views

Hi Shenghong,

Thank-you for the response. That clarified the difference between compilers and libraries for me. I think I made a mistake earlier. What I meant is Pardiso is a solver. 

 I have already run Pardiso using Intel MKL but I am looking to link Calculix and Pardiso.

For now, I just wish to compile Calculix v2.7 using Intel compilers. Is it possible for you to help me do this?

Thanks a lot,

Astryl

201 Views

Hi Astryl, 

Thank you for clarification. It is clear for me now.

I have already run Pardiso using Intel MKL but I am looking to link Calculix and Pardiso.

>> If you have runtime errors (crash as you said) to link Calculix with Intel MKL's Pardiso, you may ask it in MKL forum. I have no experiences on this specific library.

For now, I just wish to compile Calculix v2.7 using Intel compilers. Is it possible for you to help me do this?

>> I'll do some exploration on it, it is technically possible, but may need some kind of hacks to get the MinGW headers working for Intel compiler. I will update you if I make some progresses, I am able to build ARPACK with ifort already.

Thanks,

Shenghong

Astryl_S_
Beginner
201 Views

Thanks, I will post it on the MKL forum as well and see if anyone can provide help.

Astryl_S_
Beginner
201 Views

Hi Shenghong,

Did you manage to make any progress with compiling Calculix using Intel compilers.

Astryl

201 Views

Hi Astryl,

Sorry for delay, but I was actually looking at this in past days...

I've built all these with Intel compilers in MSYS succesfully. You really need to re-write the Makefiles, the Makefile is really written for Linux (example: obj file is *.o, not *.obj), and there are some issues to make it work for Intel compilers (which is a windows compiler, and compatible with MS compiler on windows). Also, this project contains both C and Fortran code, and there are some issues too (on windows, Intel compiler use upper case for symbols in Fortran and its C code assume the symbols are lower cases...)

Whatever, in one word, I've applied lots of patches (or say, I've re-write the makefile) and it finally builds. It is just for your reference, and some of my updates may be ugly, I just tried to make everything works as my expectation. See attached msys (I'll provide you my msys as I have some scripts to set up the environment and some libs to workaround some issues) and all the code are provided in it, I cannot explain you one by one (I planned to record these but later I found there are too many places to update...)

Now, how to build?

1. Get attached 7z file and extract it somewhere (which is <root> in below description).

2. Go to "code" folder, and take a look at "readme.txt".

3. Build with GCC:

In "code" folder, extract src_gcc.7z as "gcc" first.

In "<root>", double click "msys_mingw64.bat" and then run below command inside MSYS: cd /code && ./build_gcc.sh

4. Build with ICC:

In "code" folder, extract src_icc.7z as "icc" first.

In "<root>", double click "msys_icl64.bat" and then run below command inside MSYS: cd /code && ./build_icc.sh

Hope it works for you...and you may have to change makefile by yourselves if there are other issues...

Thanks,

Shenghong

201 Views

Hi Astryl,

uploaded as below:

https://my.syncplicity.com/share/tajfvvklugijjum/my_msys

password: 123456

Hope it works...

Thanks,

Shenghong

ZongyaoLi
Beginner
201 Views

shenghong-geng (Intel) wrote:

Hi Astryl,

uploaded as below:

https://my.syncplicity.com/share/tajfvvklugijjum/my_msys

password: 123456

Hope it works...

Thanks,

Shenghong

Dear Shenghong,

Sorry for my late reply.

I met the same problem. And the shared file not found. Could you please send me a copy?

hjxy2012@gmail.com

Thank you very much.

Reply