CNS errors before/after recompilation


#7

indeed - will make a note of this.


#8

Dear Eiso,

if you fixed the problem, could you please let me know more in detail that how you fix same error as follows ?. how to remove the -fast-math as a compiler option ?.
Because i am getting same error. I am trying to compile with gcc and gfortan !
%SETFPEPS Machine epsilon determined to be 0.494-323
%SETFPEPS error encountered: Machine epsilon value is too small
(CNS is in mode: SET ABORT=NORMal END)

Thanking you !

I am using OS X EI Captain
version 10.11.3
Mac Pro (Early 2009)


#9

Dear Dr. Alexandre Bonvin,

could you please let me know that how to issue the command for Removing -fast-math as a compiler option ?. Because i am getting following error. while cns installation.

%SETFPEPS Machine epsilon determined to be 0.494-323
%SETFPEPS error encountered: Machine epsilon value is too small

Thanking you !


#10

this worked for me

I set MXRTP to 4000 and now there’s no error

E

Srinivas Penumutchu wrote:


#11

simply edit the Makefile you are using and remove that option


#12

Dear Eiso,

Where did you edit the MXRTP ?. Could you please let me know file name and location ?

Thanking you !


#13

in rtf.inc in the source directory


#14

Thanks you Dr. Alexandre Bonvin, , finally it is working after i did four modifications ! I hope it will be helpful to someone :slight_smile:

first modification
set MXFPEPS2 value to 8192 in machvar.inc

second modification
removed flag -fastm in make file

third modification
MXRTP to 4000 in rtf.inc in the source directory

fourth modification

add the below line in the machvar.f
WRITE (6,’(I6,E10.3,E10.3)’) I, ONEP, ONEM
just above line 67, which looks like this:
IF (ONE .EQ. ONEP .OR. ONE .EQ. ONEM) THEN


#15

These are two unrelated errors:

What @eiso was dealing with is a problem of the number of parameters and the ‘dynamic’ memory allocation of CNS.

What @srinivas_penumutchu found happens quite often in Mac OSX and for some reason is only solved with the solution you posted, which just adds a print statement… This will add a bunch of unnecessary output to the CNS initialization headers though… Would be great if someone with more FORTRAN skills could take a look at it!


#16

Suggestion for a proper solution to this problem:

Replace the SETFPEPS subroutine as follows

C ==========================================================================
C
SUBROUTINE SETFPEPS
C
IMPLICIT NONE
C I/O
INCLUDE ‘numbers.inc’
INCLUDE ‘machvar.inc’
C
C Determine the machine epsilon i.e. the smallest FPEPS such that both
C 1+FPEPS and 1-FPEPS are different from 1.
C
C local
DOUBLE PRECISION ONEDP
DOUBLE COMPLEX DBCOMP
C
C external
C NONE
C
C begin
C
C ONEDP doesn’t really need to be defined - EPSILON() only needs to know
C the type
ONEDP=(1.00)
FPEPS = EPSILON(ONEDP)
DBCOMP = DCMPLX(ZERO,ZERO)
CALL DECLAR(‘FP_EPSILON’, ‘DP’, ’ ', DBCOMP, FPEPS)
RETURN
END


#17

Thanks Brian - is this generic for any OS? Or OSX-specific?


#18

Hi Alexandre,

This should be a generic solution. I see the issue on LINUX (CentOS 7) with gcc 4.8.5.

Brian


#19

Hi Srinivas sir,
Can you please explain how to remove flag -fastm in the makefile?


#20

After replacing subrotines in machvar.f file
and then recompile cns_solve
shows error:

make[3]: Target '../bin/cns_solve' not remade because of errors.
Makefile:58: recipe for target 'cns_solve' failed
make[2]: *** [cns_solve] Error 2
Makefile:64: recipe for target 'cns_solve' failed
make[1]: *** [cns_solve] Error 2

#21

Garima,
We need to see more of the compiler log to see what your error might be.


#22

After compiling CNS with make install and then source cns_solve_env after entering into C-shell tcsh
I was trying to run cns after typing cns
drriturajpurohit-CELSIUS-M740Bpower:~/Downloads/cns_solve_1.3> cns
Program will stop immediately.
============================================================
Maximum dynamic memory allocation: 0 bytes
Maximum dynamic memory overhead: 0 bytes
Program started at: on
Program stopped at: 08:12:32 on 16-Dec-2017
CPU time used: 0.0040 seconds
============================================================
drriturajpurohit-CELSIUS-M740Bpower:~/Downloads/cns_solve_1.3>


#23

Hello everyone,
I also got these errors and was able to resolve them.
Just take care of installation steps of CNS:
-> After registration, download xyz.tar.gz file “xyz = cns_solve downloaded version”
-> Enter the command in terminal: gunzip xyz.tar.gz
-> Then enter: tar xvf xyz.tar
-> This will create a new cns_solve directory. Now enter into this directory and copy the path.
-> Now open the file cns_solve_env and paste the copied path in place of ‘location of CNSsolve directory’
-> Then open the terminal in this directory, and enter the command:tcsh
-> Then you entered into C-shell, now enter the command: source cns_solve_env
->Then enter: cns
-> Your software will definitely run without any error.


#24

Dear Dr. Bonvin,

I am having the same problem with CNS installation, but I cannot figure out how should I remove -fast-math flag. In my Makefile I don’t have such flag. I tried to run make no-fastm after make clean but it looks like compilation still runs with fortran -ffast-math option.

Thank you


#25

Depending on your operating system, when installing CNS a directory specific for your OS will be created, e.g. intel-x86_64bit-linux/source on a Linux 64bits system.

Go into that directory and edit the Makefile script.

Then in that dir try: make cns_solve


#26

Thank you very much! I think it’s fine now