alirezayazdani1 / HFM

GNU General Public License v3.0
15 stars 5 forks source link

Error "gen_bndry: Illegal B.C. function definition" when trying to run the benchmark problems included in the repository. #1

Open jeanschuster opened 3 years ago

jeanschuster commented 3 years ago

Hi.

My name is Jean and i'm initiating my studies in machine learning, and have special interest in applying it to fluid mechanics. So I found this very nice paper called HFM, where the author kindly supply the framework and codes to reproduce their results.

First off all I would like to express my gratitude to the author for make available all the means to reproduce this impressive work.

It took me a while till I get the Nektar3d compiled in a Ubuntu 18.04.5 LTS x64 machine. After modifying the Linux.inc file in the Flag directory an the Makefile in the SourceCode directory according to my system, as suggested, it generated an compiling error saying:

analyser.o: file not recognized: File format not recognized
collect2: error: ld returned 1 exit status
Reaping losing child 0x558b3e5d8070 PID 12502 
MakeNek:30: recipe for target 'nektar' failed
make[2]: *** [nektar] Error 1

So, I run the "file" command to see what are the type of the files in the "/SourceCode/Nektar3d/Linux" folder, and it appears to be Mac Os files, as the command returns me:

$file analyser.o
analyser.o: Mach-O 64-bit x86_64 object, flags:<|SUBSECTIONS_VIA_SYMBOLS>

To over come this situation, I pointed the Nektar compilation folder to /Nektar3d/LinuxP in the Makefile in the SourceCode folder as follows:

default:
    cd gs && make ARCH=Linux mopt
    cd Veclib && make ARCH=Linux OPTM=1
    cd metis-4.0.3 && make
    cd Hlib/Linux && make ARCH=Linux PARALLEL=1 mopt && \
    cp ../../gs/libgs.a . && \
    cp ../../Veclib/libvec.a . && \
    cp ../../metis-4.0.3/libmetis.a .
    cd Nektar3d/LinuxP && make ARCH=Linux ADR=1 mopt
    cp Nektar3d/LinuxP/nektar* .

clean:
    cd gs && rm -f *.a
    cd Veclib && rm -f *.a
    cd metis-4.0.3 && make clean
    cd Hlib/Linux && rm libgs.a libvec.a libmetis.a libhybridmopt.a *.tab.c
    cd Nektar3d/LinuxP && make clean

And then it compiled fine and I get a nektar executable in the SourceCode folder. Compiling log, flag file Linux.inc and /SourceCode/Makefile follows attached: Linux.inc.txt Makefile.txt log_compiling.txt

Now, when trying to run any of the 3d cases supplied in the /BenchmarkProblems whit the command:

mpirun -np 4 ./nektar -V -chk -S -n4 RUN/Aneurysm3D/ICA.rea 2>&1 | tee log_run_ica.txt

I get an error related to boundary conditions:

gen_bndry: Illegal B.C. function definition

Run log files for the ICA an flow over a cylinder in 2d problems goes attached: log_run_cyl2d.txt log_run_ica.txt

I could not resolve this issue, probably because of my lack of knowledge in the Nektar code. I would appreciate any tips to get around this problem, so I could generate the synthetic data to run the deep learning code provided.

Thanks in advance.

Best regards, Jean Schuster.

alirezayazdani1 commented 3 years ago

Hi Jean, I would like to help, but this code has always been a problem with compiling. I will need to find some free time to figure it out for you.

On Sat, May 22, 2021 at 11:35 AM Jean Schuster @.***> wrote:

Hi.

My name is Jean and i'm initiating my studies in machine learning, and have special interest in applying it to fluid mechanics. So I found this very nice paper called HFM, where the author kindly supply the framework and codes to reproduce their results.

First off all I would like to express my gratitude to the author for make available all the means to reproduce this impressive work.

It took me a while till I get the Nektar3d compiled in a Ubuntu 18.04.5 LTS x64 machine. After modifying the Linux.inc file in the Flag directory an the Makefile in the SourceCode directory according to my system, as suggested, it generated an compiling error saying:

analyser.o: file not recognized: File format not recognized collect2: error: ld returned 1 exit status Reaping losing child 0x558b3e5d8070 PID 12502 MakeNek:30: recipe for target 'nektar' failed make[2]: *** [nektar] Error 1

So, I run the "file" command to see what are the type of the files in the "/SourceCode/Nektar3d/Linux" folder, and it appears to be Mac Os files, as the command returns me:

$file analyser.o analyser.o: Mach-O 64-bit x86_64 object, flags:<|SUBSECTIONS_VIA_SYMBOLS>

To over come this situation, I pointed the Nektar compilation folder to /Nektar3d/LinuxP in the Makefile in the SourceCode folder as follows:

default: cd gs && make ARCH=Linux mopt cd Veclib && make ARCH=Linux OPTM=1 cd metis-4.0.3 && make cd Hlib/Linux && make ARCH=Linux PARALLEL=1 mopt && \ cp ../../gs/libgs.a . && \ cp ../../Veclib/libvec.a . && \ cp ../../metis-4.0.3/libmetis.a . cd Nektar3d/LinuxP && make ARCH=Linux ADR=1 mopt cp Nektar3d/LinuxP/nektar* .

clean: cd gs && rm -f .a cd Veclib && rm -f .a cd metis-4.0.3 && make clean cd Hlib/Linux && rm libgs.a libvec.a libmetis.a libhybridmopt.a *.tab.c cd Nektar3d/LinuxP && make clean

And then it compiled fine and I get a nektar executable in the SourceCode folder. Compiling log, flag file Linux.inc and /SourceCode/Makefile follows attached: Linux.inc.txt https://github.com/alirezayazdani1/HFM/files/6526676/Linux.inc.txt Makefile.txt https://github.com/alirezayazdani1/HFM/files/6526677/Makefile.txt log_compiling.txt https://github.com/alirezayazdani1/HFM/files/6526678/log_compiling.txt

Now, when trying to run any of the 3d cases supplied in the /BenchmarkProblems whit the command:

mpirun -np 4 ./nektar -V -chk -S -n4 RUN/Aneurysm3D/ICA.rea 2>&1 | tee log_run_ica.txt

I get an error related to boundary conditions:

gen_bndry: Illegal B.C. function definition

Run log files for the ICA an flow over a cylinder in 2d problems goes attached: log_run_cyl2d.txt https://github.com/alirezayazdani1/HFM/files/6526689/log_run_cyl2d.txt log_run_ica.txt https://github.com/alirezayazdani1/HFM/files/6526690/log_run_ica.txt

I could not resolve this issue, probably because of my lack of knowledge in the Nektar code. I would appreciate any tips to get around this problem, so I could generate the synthetic data to run the deep learning code provided.

Thanks in advance.

Best regards, Jean Schuster.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/alirezayazdani1/HFM/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHZFIYDB2B4WMN4D5RJJ3EDTO7FNJANCNFSM45KX7CHA .

jeanschuster commented 3 years ago

Hi Dr. Yazdani. Thank you for your reply, and ok, any help would be appreciated. Best regards, Jean.

Hi Jean, I would like to help, but this code has always been a problem with compiling. I will need to find some free time to figure it out for you.

alirezayazdani1 commented 3 years ago

The first error you got was because you didn't make clean the old *.o files before compiling. The second error is because you were in the wrong LinuxP directory. I cleaned up the build directories a lot and pushed the updated code into the repo. I have explained in details in InstallationGuide.md how to compile the code. Hope you can compile the code this time.