compiling Openmpi-4.1.x for 64-bit integers

271 views
Skip to first unread message

Peterson, Kirk

unread,
Apr 7, 2022, 5:29:05 PM4/7/22
to dirac-users

Dear Dirac experts,

 

has any one successfully built a 64-bit integer version of Openmpi-4.1.x  (x=0,1,2, or 3) ?  Use the usual procedure as outlined on the Dirac website, which always worked fine for Openmpi-4.0.x, but now I get the following use the gnu compilers (v10.2 or v11.2):

 

./configure  CXX=g++ CC=gcc F77=gfortran FC=gfortran FFLAGS="-m64 -fdefault-integer-8" FCFLAGS="-m64 -fdefault-integer-8" CFLAGS=-m64 CXXFLAGS=-m64

 

Configure has detected that the size of a C integer (4 bytes) is

different than the size of a Fortran INTEGER (8 bytes).

 

best,

 

-Kirk

Juan Jose Aucar

unread,
Apr 7, 2022, 6:55:23 PM4/7/22
to dirac...@googlegroups.com
Dear Peterson Kirk,

I'm not a Dirac expert but I could successfully built a 64-bit integer version of Openmpi-4.1.1
I did it much time ago so I now revised some notes and I see that I got some help from https://www.open-mpi.org/faq/?category=openfabrics

I used Intel Compilers and configured it with:
./configure CXX=icpc CC=icc F77=ifort FC=ifort FFLAGS=-i8  FCFLAGS=-i8  CFLAGS=-m64  CXXFLAGS=-m64 --without-verbs --enable-mpi-fortran=usempi --prefix=(...)/openmpi-4.1.1
make install

If you don't have Intel Compilers I may try with GNU ones to reproduce the error you are getting.

Best regards,
Juan José


--
You received this message because you are subscribed to the Google Groups "dirac-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dirac-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dirac-users/MWHPR01MB3231D7A859A4ED4A6B22FEB2D6E69%40MWHPR01MB3231.prod.exchangelabs.com.

Peterson, Kirk

unread,
Apr 7, 2022, 7:36:26 PM4/7/22
to dirac...@googlegroups.com

Thanks Juan, I could try Intel if I continue to be stuck. I'm a little nervous to have Intel-compiled Openmpi linked to Gnu-compiled Dirac, but maybe that would be fine. I'd certainly be interested to hear your experience with gcc if you get some time to test that.

 

best,  -Kirk

Juan Jose Aucar

unread,
Apr 8, 2022, 7:09:49 AM4/8/22
to dirac...@googlegroups.com
Dear Kirk,

I was able to reproduce the same error.

I downloaded openmpi 4.1.1 from https://www-lb.open-mpi.org/software/ompi/v4.1/ and tried to build it in 3 different ways:

  1. Using gcc 10.2.0 and with these parameters:
    ./configure  CXX=g++ CC=gcc F77=gfortran FC=gfortran FFLAGS="-m64 -fdefault-integer-8" FCFLAGS="-m64 -fdefault-integer-8" CFLAGS=-m64 CXXFLAGS=-m64 --prefix=(...)/OPENMPI-64

    I get the same error that you described:

    image.png

    and as you can see in the screenshot it suggests to disable certain module

  2. Using gcc 10.2.0 and with these parameters:
    ./configure  CXX=g++ CC=gcc F77=gfortran FC=gfortran FFLAGS="-m64 -fdefault-integer-8" FCFLAGS="-m64 -fdefault-integer-8" CFLAGS=-m64 CXXFLAGS=-m64 --without-verbs --enable-mpi-fortran=usempi --prefix=(..)/OPENMPI-64
    make -j
    N install


    This way everything goes ok. And I founded no error when used by DIRAC

  3. Using Intel Compilers with these parameters:
    ./configure CXX=icpc CC=icc F77=ifort FC=ifort FFLAGS=-i8  FCFLAGS=-i8  CFLAGS=-m64  CXXFLAGS=-m64 --without-verbs --enable-mpi-fortran=usempi --prefix=(...)/OPENMPI-64
    make -jN install

    This way everything goes ok. And I founded no error when used by DIRAC


I hope you find this useful
Best regards,
Juan José


Peterson, Kirk

unread,
Apr 8, 2022, 10:31:38 AM4/8/22
to dirac...@googlegroups.com

Dear Juan,

 

thank you very much, this is very helpful.  Yesterday I found that even more recent 4.0.x versions have the same problem. I was able to build 4.0.2 using gcc 11.2 without problems, but I believe I need 4.1.x if I want to use the ExaTensor library.  I had thought about using the usempi option you note below, but wasn't sure if that was compatible or not with Dirac. Great to know that this works ok.

 

best regards,

 

-Kirk

 

From: dirac...@googlegroups.com <dirac...@googlegroups.com> on behalf of Juan Jose Aucar <juan...@gmail.com>
Date: Friday, April 8, 2022 at 4:09 AM
To: dirac...@googlegroups.com <dirac...@googlegroups.com>
Subject: Re: [dirac-users] compiling Openmpi-4.1.x for 64-bit integers

Dear Kirk,

I was able to reproduce the same error.

I downloaded openmpi 4.1.1 from https://www-lb.open-mpi.org/software/ompi/v4.1/ and tried to build it in 3 different ways:

  1. Using gcc 10.2.0 and with these parameters:
    ./configure  CXX=g++ CC=gcc F77=gfortran FC=gfortran FFLAGS="-m64 -fdefault-integer-8" FCFLAGS="-m64 -fdefault-integer-8" CFLAGS=-m64 CXXFLAGS=-m64 --prefix=(...)/OPENMPI-64

    I get the same error that you described:

Andre Gomes

unread,
Apr 8, 2022, 11:07:11 AM4/8/22
to dirac...@googlegroups.com
Dear Kirk,

As far as I recall it is not possible to have exacorr built in 64-bit mode.

So, even though it will be good to get to the bottom of this, you'd not have to jump through these hoops and could stick to 4.0.x if you do need 64-bit integers elsewhere.

Finally, I can say that MPICH also works fine with Dirac, perhaps this is something for you to have a look at ?

Best,

Andre



Peterson, Kirk

unread,
Apr 8, 2022, 12:16:14 PM4/8/22
to dirac...@googlegroups.com

Dear Andre,

 

I was thinking of ExaTensor and not Exacorr but perhaps the former is only useful for the latter?  I admit I haven't looked too much into it yet.  You're right, MPICH is an option.  I used to use it all the time, but switched to Openmpi quite a long time ago for reasons I can't quite remember any more :^)

 

best,

 

-Kirk

Andre Gomes

unread,
Apr 9, 2022, 10:06:21 AM4/9/22
to dirac...@googlegroups.com
hi kirk,

exacorr is the electronic structure module using both exatensor and tal-sh (the underlying distributed and single-node tensor operation libraries, respectively)

one can still use exacorr even if exatensor itself cannot be compiled, provided tal-sh can. right now  i am not completely sure whether tal-sh only can be compiled in 64-bit mode, will get back to you on that asap.

but unlike other modules in dirac, you can do pretty large calculations with exacorr without the need for 64-bit integers.

what was easy before the latest dirac release was to run, say, scf calculations with 64-bit integers (if the system is large enough that you need a work array larger than 16gb, for example at the scf step, today you don't have a choice but to use 64-bit integers...), and then use a utility program (utils/convert_dfcoef.c) to convert the DFCOEF file to 32-bit. now, after labels have been introduced, this utility code doesn't work anymore (it needs an update).

in any case, on our local cluster and on my laptop i tend to use mpich with dirac - you should have no problems with versions 3.4 or higher.

best,

andre

Reply all
Reply to author
Forward
0 new messages