[SOLVED] Abinit 6.10.3 with g95 fails in Scientific Linux

option, parallelism,...

Moderators: fgoudreault, mcote

Forum rules
Please have a look at ~abinit/doc/config/build-config.ac in the source package for detailed and up-to-date information about the configuration of Abinit 8 builds.
For a video explanation on how to build Abinit 7.x for Linux, please go to: http://www.youtube.com/watch?v=DppLQ-KQA68.
IMPORTANT: when an answer solves your problem, please check the little green V-like button on its upper-right corner to accept it.
Locked
hwlalves
Posts: 6
Joined: Fri Apr 02, 2010 5:34 am

[SOLVED] Abinit 6.10.3 with g95 fails in Scientific Linux

Post by hwlalves » Mon Jan 02, 2012 9:32 pm

Dear abinitioners,

I am trying to install a new sequential abinit version, 6.10.3, in a acer notebook with Scientific Linux v5.4 installed. First I have run the configure as
$ ./configure --enable-mpi=no FC=g95
and everything seems to be ok, asseen in the config.log file attached. However, when I've run 'make', after a while the system have returned:
...
Making all in 51_manage_mpi
make[3]: Entering directory `/usr/local/abinit-6.10.3/src/51_manage_mpi'
g95 -DHAVE_CONFIG_H -I. -I../.. -I../../src/incs -I../../src/incs -ffree-form -fmod=/usr/local/abinit-6.10.3/src/mods -I/usr/local/abinit-6.10.3/src/mods -O2 -march=pentium4 -mmmx -msse -msse2 -g -ffree-line-length-huge -c -o initmpi_grid.o initmpi_grid.F90
Error: Can't open included file 'mpif.h'
make[3]: *** [initmpi_grid.o] Error 1
make[3]: Leaving directory `/usr/local/abinit-6.10.3/src/51_manage_mpi'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/abinit-6.10.3/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/abinit-6.10.3'
make: *** [all] Error 2

which means that even the sequential version uses the mpi. Is there any hint or trick to compile a sequential version of abinit? What can I do in this case?

greetings & Happy new year,

Horacio W. Leite Alves
Attachments
config.log
(129.65 KiB) Downloaded 246 times

User avatar
pouillon
Posts: 651
Joined: Wed Aug 19, 2009 10:08 am
Location: Spain
Contact:

Re: Abinit 6.10.3 compilation with g95 fails in Scientific L

Post by pouillon » Mon Jan 09, 2012 8:49 pm

Can you tell us whether the HAVE_MPI option is defined in config.h?
Yann Pouillon
Simune Atomistics
Donostia-San Sebastián, Spain

lumbrius
Posts: 6
Joined: Tue Jan 10, 2012 3:11 pm

Re: Abinit 6.10.3 compilation with g95 fails in Scientific L

Post by lumbrius » Tue Jan 10, 2012 3:15 pm

Try to copy files mpif.h mpif-common.h mpif-config.h mpif-mpi-io.h from /usr/include into src/incs/ subdirectory of directory where you are running make

hwlalves
Posts: 6
Joined: Fri Apr 02, 2010 5:34 am

Re: Abinit 6.10.3 compilation with g95 fails in Scientific L

Post by hwlalves » Tue Jan 10, 2012 4:23 pm

pouillon wrote:Can you tell us whether the HAVE_MPI option is defined in config.h?

Cher Yann,
At the config.h file, after running the ./configure we have:
...
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1

/* Define to 1 if you want to enable MPI support. */
/* #undef HAVE_MPI */

/* Define to 1 if you have a MPI-1 implementation. */
/* #undef HAVE_MPI1 */

/* Define to 1 if you have a MPI-2 implementation. */
/* #undef HAVE_MPI2 */

/* Define to 1 if you are using XLF. */
/* #undef HAVE_MPI_INCLUDED_ONCE */

/* Define to 1 if you want MPI I/O support. */
/* #undef HAVE_MPI_IO */

/* Define to 1 if you want MPI time tracing support. */
/* #undef HAVE_MPI_TRACE */

/* Define to 1 if your MPI library supports MPI_TYPE_CREATE_STRUCT. */
/* #undef HAVE_MPI_TYPE_CREATE_STRUCT */

/* Define to 1 if you have the <netcdf.h> header file. */
#define HAVE_NETCDF_H 1
....
which means that I have not installed MPI. Do you have any hints or tricks to avoid the calls to the MPI or I have to install MPI?
greetings,
Horacio

hwlalves
Posts: 6
Joined: Fri Apr 02, 2010 5:34 am

Re: Abinit 6.10.3 compilation with g95 fails in Scientific L

Post by hwlalves » Tue Jan 10, 2012 4:27 pm

lumbrius wrote:Try to copy files mpif.h mpif-common.h mpif-config.h mpif-mpi-io.h from /usr/include into src/incs/ subdirectory of directory where you are running make

Dear "lumbrius",
I did not found these files in /usr/include. I suppose that I have to install MPI in my machine in order to have these files.
Am I right?
greetings,
Horacio

User avatar
pouillon
Posts: 651
Joined: Wed Aug 19, 2009 10:08 am
Location: Spain
Contact:

Re: Abinit 6.10.3 compilation with g95 fails in Scientific L

Post by pouillon » Tue Jan 10, 2012 4:55 pm

I found the problem. This is a little typo in the source file involved. Just apply the following patch and everything should get fine.

Code: Select all

=== modified file 'src/51_manage_mpi/initmpi_grid.F90'
--- src/51_manage_mpi/initmpi_grid.F90   2011-12-22 14:38:36 +0000
+++ src/51_manage_mpi/initmpi_grid.F90   2012-01-10 15:44:44 +0000
@@ -60,7 +60,7 @@
 !End of the abilint section
 
  implicit none
-#if defined HAVE_MPI1 || defined FC_G95
+#if defined HAVE_MPI1 || (defined HAVE_MPI && defined FC_G95)
  include 'mpif.h'
 #endif
 

=== modified file 'src/59_io_mpi/rwwf.F90'
--- src/59_io_mpi/rwwf.F90   2011-12-22 14:38:36 +0000
+++ src/59_io_mpi/rwwf.F90   2012-01-10 15:58:00 +0000
@@ -122,7 +122,7 @@
 !End of the abilint section
 
  implicit none
-#if defined HAVE_MPI1 || defined FC_G95
+#if defined HAVE_MPI1 || (defined HAVE_MPI && defined FC_G95)
  include 'mpif.h'
 #endif
 


This fix will be released with Abinit 6.12.1.
Yann Pouillon
Simune Atomistics
Donostia-San Sebastián, Spain

lumbrius
Posts: 6
Joined: Tue Jan 10, 2012 3:11 pm

Re: Abinit 6.10.3 compilation with g95 fails in Scientific L

Post by lumbrius » Wed Jan 11, 2012 12:48 pm

hwlalves wrote:
lumbrius wrote:Try to copy files mpif.h mpif-common.h mpif-config.h mpif-mpi-io.h from /usr/include into src/incs/ subdirectory of directory where you are running make

Dear "lumbrius",
I did not found these files in /usr/include. I suppose that I have to install MPI in my machine in order to have these files.
Am I right?
greetings,
Horacio


Dear Horatio,
Sorry I havent realised that you might be lacking openmpi package. I have openmpi-1.4.2 so If you'd install that these should appear.
I was able to successfully compile abinit-6.10.3 on my gentoo system, with these configuration options
CC=mpicc CXX=mpicxx FC=mpif90 ./configure --program-prefix=/usr/local/abinit --enable-mpi --enable-mpi-io --with-mpi-incs="-I/usr/include -I/usr/include/openmpi/ompi/mpi/cxx/"
Also you dont have to move files mentioned above if you put -I/usr/include into options, just make sure to install openmpi-1.4.2 and check its include/lib dir

hwlalves
Posts: 6
Joined: Fri Apr 02, 2010 5:34 am

Re: Abinit 6.10.3 compilation with g95 fails in Scientific L

Post by hwlalves » Wed Jan 11, 2012 4:06 pm

pouillon wrote:I found the problem. This is a little typo in the source file involved. Just apply the following patch and everything should get fine.

Code: Select all

=== modified file 'src/51_manage_mpi/initmpi_grid.F90'
--- src/51_manage_mpi/initmpi_grid.F90   2011-12-22 14:38:36 +0000
+++ src/51_manage_mpi/initmpi_grid.F90   2012-01-10 15:44:44 +0000
@@ -60,7 +60,7 @@
 !End of the abilint section
 
  implicit none
-#if defined HAVE_MPI1 || defined FC_G95
+#if defined HAVE_MPI1 || (defined HAVE_MPI && defined FC_G95)
  include 'mpif.h'
 #endif
 

=== modified file 'src/59_io_mpi/rwwf.F90'
--- src/59_io_mpi/rwwf.F90   2011-12-22 14:38:36 +0000
+++ src/59_io_mpi/rwwf.F90   2012-01-10 15:58:00 +0000
@@ -122,7 +122,7 @@
 !End of the abilint section
 
  implicit none
-#if defined HAVE_MPI1 || defined FC_G95
+#if defined HAVE_MPI1 || (defined HAVE_MPI && defined FC_G95)
  include 'mpif.h'
 #endif
 


This fix will be released with Abinit 6.12.1.

Dear Yann,
With the above typos, it was all ok, the compilation have run till the end with no problem(only a few warnings concerning most to the different variable types through the subroutine calls). I am now testing the executables with my old runs, but I have been notice in the first test, that the _STATUS and log files did not change after 1 minute, somewhat different when I ran with previous abinit version. I will run more tests and, if I found any other differences(or problems), I'll post my impressions in another post.
greetings,
Horacio

hwlalves
Posts: 6
Joined: Fri Apr 02, 2010 5:34 am

Re: Abinit 6.10.3 compilation with g95 fails in Scientific L

Post by hwlalves » Wed Jan 11, 2012 4:18 pm

lumbrius wrote:
hwlalves wrote:
lumbrius wrote:Try to copy files mpif.h mpif-common.h mpif-config.h mpif-mpi-io.h from /usr/include into src/incs/ subdirectory of directory where you are running make

Dear "lumbrius",
I did not found these files in /usr/include. I suppose that I have to install MPI in my machine in order to have these files.
Am I right?
greetings,
Horacio


Dear Horatio,
Sorry I havent realised that you might be lacking openmpi package. I have openmpi-1.4.2 so If you'd install that these should appear.
I was able to successfully compile abinit-6.10.3 on my gentoo system, with these configuration options
CC=mpicc CXX=mpicxx FC=mpif90 ./configure --program-prefix=/usr/local/abinit --enable-mpi --enable-mpi-io --with-mpi-incs="-I/usr/include -I/usr/include/openmpi/ompi/mpi/cxx/"
Also you dont have to move files mentioned above if you put -I/usr/include into options, just make sure to install openmpi-1.4.2 and check its include/lib dir


Dear lumbrius,
In this specific case, I am installing abinit in a notebook, which it has not a dual(or quadri-)core processor. That's the reason that I look for hints for the compilation of a sequential executable. Anyway, you have given me some important hints that will be necessary in my next step, which I will repeat the abinit compilation in other two parallel machines with 16 nodes.
Thank you very much for the attention,
greetings,
Horacio

Locked