#ifdef __INTEL moved inside clib/stack.c .The C code used to be compiled

in all cases, causing problems in at least one obscure software configuration


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@5482 c92efa57-630b-4861-b058-cf58834340f0
This commit is contained in:
giannozz 2009-03-25 15:11:41 +00:00
parent 7986e7c716
commit 3675de688a
8 changed files with 9 additions and 15 deletions

View File

@ -40,11 +40,9 @@ PROGRAM main
!
program_name = 'CP90'
!
#if defined __INTEL
! ... Intel compilers v .ge.8 allocate a lot of stack space
! ... Stack limit is often small, thus causing SIGSEGV and crash
CALL remove_stack_limit ( )
#endif
!
! ... initialize MPI (parallel processing handling)
!

View File

@ -74,11 +74,9 @@ PROGRAM fpmd_postproc
dunit = 14
#if defined __INTEL
! ... Intel compilers v .ge.8 allocate a lot of stack space
! ... Stack limit is often small, thus causing SIGSEGV and crash
CALL remove_stack_limit ( )
#endif
! see cprstart.f90 for the meaning of the following 4 calls
CALL mp_start()

View File

@ -45,11 +45,9 @@ PROGRAM gipaw_main
CHARACTER (LEN=9) :: code = 'GIPAW'
!------------------------------------------------------------------------
#if defined __INTEL
! ... Intel compilers v .ge.8 allocate a lot of stack space
! ... Stack limit is often small, thus causing SIGSEGV and crash
CALL remove_stack_limit ( )
#endif
CALL init_clocks( .TRUE. )

View File

@ -28,11 +28,9 @@ PROGRAM phcg
LOGICAL :: exst
INTEGER :: i
!
#if defined __INTEL
! ... Intel compilers v .ge.8 allocate a lot of stack space
! ... Stack limit is often small, thus causing SIGSEGV and crash
CALL remove_stack_limit ( )
#endif
!
CALL check_stop_init ()
!

View File

@ -56,11 +56,9 @@ PROGRAM phonon
CHARACTER (LEN=256) :: auxdyn
CHARACTER(LEN=6), EXTERNAL :: int_to_char
!
#if defined __INTEL
! ... Intel compilers v .ge.8 allocate a lot of stack space
! ... Stack limit is often small, thus causing SIGSEGV and crash
CALL remove_stack_limit ( )
#endif
!
CALL init_clocks( .TRUE. )
!

View File

@ -16,11 +16,10 @@ subroutine start_postproc (nodenumber)
character(len=3) :: nodenumber
character(len=9) :: code = 'POST-PROC'
!
#if defined __INTEL
! ... Intel compilers v .ge.8 allocate a lot of stack space
! ... Stack limit is often small, thus causing SIGSEGV and crash
CALL remove_stack_limit ( )
#endif
!
call startup (nodenumber, code, version_number)
return
end subroutine start_postproc

View File

@ -32,11 +32,9 @@ PROGRAM pwscf
!
CHARACTER (LEN=9) :: code = 'PWSCF'
!
#if defined __INTEL
! ... Intel compilers v .ge.8 allocate a lot of stack space
! ... Stack limit is often small, thus causing SIGSEGV and crash
CALL remove_stack_limit ( )
#endif
!
! ... use ".FALSE." to disable all clocks except the total cpu time clock
! ... use ".TRUE." to enable clocks

View File

@ -6,10 +6,12 @@
or http://www.gnu.org/copyleft/gpl.txt .
*/
#include "c_defs.h"
#include <stdio.h>
#include <stdlib.h>
#ifdef __INTEL
#include <sys/resource.h>
#include "c_defs.h"
void F77_FUNC_(remove_stack_limit,REMOVE_STACK_LIMIT) (void) {
@ -27,3 +29,8 @@ void F77_FUNC_(remove_stack_limit,REMOVE_STACK_LIMIT) (void) {
}
}
}
#else
void F77_FUNC_(remove_stack_limit,REMOVE_STACK_LIMIT) (void) {
}
#endif