Author Topic: Adding a user macro by Microsoft Visual Studio 2010  (Read 5258 times)

Brian

  • Jr. Member
  • **
  • Posts: 33
Adding a user macro by Microsoft Visual Studio 2010
« on: October 28, 2015, 05:38:11 AM »
Please explain how a user macro can be added to FEAP by Microsoft Visual Studio 2010. I did the following steps:
1- Add umacr1 to FEAP project
2- Rebuild FEAP.

But there is no "sol1" command when I call "manual,,5" and "help" in an interactive mode of FEAP. umacr1 is in attachment. Thank you.

K.Li

  • Full Member
  • ***
  • Posts: 191
Re: Adding a user macro by Microsoft Visual Studio 2010
« Reply #1 on: October 28, 2015, 06:04:36 AM »
You also need to remove the original dummy umacr1 routine under /user.

Brian

  • Jr. Member
  • **
  • Posts: 33
Re: Adding a user macro by Microsoft Visual Studio 2010
« Reply #2 on: October 28, 2015, 08:04:28 AM »
I removed the original umacr1 from user and rebuilt FEAP but still there is no sol1 command in help. Any other idea?

Prof. R.L. Taylor

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 2649
Re: Adding a user macro by Microsoft Visual Studio 2010
« Reply #3 on: October 28, 2015, 08:21:40 AM »
After you loaded the user macro did you look to see if the command was there?

In interactive solution mode issue the commands

MANU,,5
HELP

You should see all the solution commands available.

I do notice your development is a bit non-standard.  You should have put your check on the command option 'conv' in the finals
else location.  The other locations were there for a purpose.  However, it still should work if you use the command as
  SOL1 CONV


Prof. R.L. Taylor

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 2649
Re: Adding a user macro by Microsoft Visual Studio 2010
« Reply #4 on: October 28, 2015, 08:33:45 AM »
Brian,

I downloaded your routine and is does work.  Thus, there must be something you are doing incorrectly to add the routine to your build.  Without looking back to all the previous posts -- what I do is the following.

1. Make the build again without the user macro included.

    a.) build the library
    b.) build the final version which includes only the file feapxx.f and the library (where xx is your version).

2. Test the program works and the commands are showing what is available (MANU,,5 + HELP).

3. Add the user macro to the final build.  It now includes the files feapxx.f, umacr1.f and the library.

This has always resulted in a correct build in the past without removing the umacr1.o from the library.

Is this what you did?  If so please post again the operating system you are using and the versions of the compiler and visual studio so we may be able to reproduce the error.

Brian

  • Jr. Member
  • **
  • Posts: 33
Re: Adding a user macro by Microsoft Visual Studio 2010
« Reply #5 on: October 28, 2015, 09:06:49 AM »
Prof. Taylor,

Thank you for your detailed explanation. I did your steps but still there is no sol1 command.
My operating system is Windows 7 Enterprise Service Pack 1 and my compiler is Intel Visual Fortran in Visual Studio 2010.
« Last Edit: October 29, 2015, 04:16:24 AM by Brian »

Prof. R.L. Taylor

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 2649
Re: Adding a user macro by Microsoft Visual Studio 2010
« Reply #6 on: October 28, 2015, 10:30:41 AM »
Brian,

I hope you completely recompiled the program when you did your test -- that is destroy the library routine and completely compile, not just update the compile.  If so:

Can you do the following.

1. In /user directory move umacr1.f out of the directory (save is somewhere).

2. build the library (without the umacr1.f)

3. build the program with your umacr1.f and the feapxx.f

Do the test to see if your routine is there. 

Brian

  • Jr. Member
  • **
  • Posts: 33
Re: Adding a user macro by Microsoft Visual Studio 2010
« Reply #7 on: October 29, 2015, 03:43:06 AM »
Prof. Taylor,

I did all your steps, as mentioned. However, still there is no "sol1" command in list. Output from build of FEAP project is below. Furthermore, there are solution explorers and complete command lists without and with the umacr1.f in attached figure.

1>------ Rebuild All started: Project: feap, Configuration: Release Win32 ------
1>Deleting intermediate files and output files for project 'feap', configuration 'Release|Win32'.
1>Compiling with Intel(R) Visual Fortran Compiler XE 15.0.3.208 [IA-32]...
1>feap84.f
1>umacr1.f
1>Compiling manifest to resources...
1>Microsoft (R) Windows (R) Resource Compiler Version 6.1.7600.16385
1>Copyright (C) Microsoft Corporation.  All rights reserved.
1>Linking...
1>Embedding manifest...
1>
1>Build log written to  "file://C:\Users\feap\feap\Release\BuildLog.htm"
1>feap - 0 error(s), 0 warning(s)
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
« Last Edit: October 29, 2015, 06:30:56 AM by Brian »

Prof. R.L. Taylor

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 2649
Re: Adding a user macro by Microsoft Visual Studio 2010
« Reply #8 on: October 29, 2015, 08:15:11 AM »
I should have had you do one other thing.  Can you build the final feap without the umacr1.f -- it should lead to an error when linking that umacr1 is not found -- if not then you still have a umacr1 in your library.

Brian

  • Jr. Member
  • **
  • Posts: 33
Re: Adding a user macro by Microsoft Visual Studio 2010
« Reply #9 on: November 02, 2015, 07:01:32 AM »
When I build the final feap without the umacr1.f, it leads to an error because of umacr1 is not found. However, when I build the final feap with umacr1 which does not lead to any error, there is no 'sol1' in command list. Any idea, please? I heard adding a umacr by Visual Studio 2010 needs some works to do before linking and rebuilding.

Furthermore, initially there are three umacr1.f in whole feap project; one in "feap/ver84/compile", another one in "feap/ver84/user", and the other one in "feap/ver84/packages/meshmod". Do I need to move umacr1.f out of /user directory not of /meshmod directory? Do I need to change umacr1.f in /compile directory as the new umacr1.f which is added to feap84.f in feap project?

Prof. R.L. Taylor

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 2649
Re: Adding a user macro by Microsoft Visual Studio 2010
« Reply #10 on: November 02, 2015, 08:21:46 AM »
You can only have one umacr1 in your build.  There is no reason to have any of the packages files loaded unless you want to use the routines that are there.  When you used the commands MANU,,6 and HELP possibly you would have seen 'ten8' as an option?

Brian

  • Jr. Member
  • **
  • Posts: 33
Re: Adding a user macro by Microsoft Visual Studio 2010
« Reply #11 on: November 03, 2015, 07:36:27 AM »
When I use the commands MANU,,6 (5) and HELP, there is no 'ten8' as an option.

Prof. R.L. Taylor

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 2649
Re: Adding a user macro by Microsoft Visual Studio 2010
« Reply #12 on: November 03, 2015, 10:21:58 AM »
Here is a final suggestion.

1. start from scratch, destroy all your old builds of library and code.

2. Move you umacr1.f to the ./user directory (save the one that is there now)

3. Build a new library including only the feap files (not the ones from packages).

4. Build your feap executable.

5. Run your problem


If still you do not have your macro you need someone near you to help you as you are definitely doing something wrong that is not related to feap.